@ebrains/components 0.7.0-alpha.0 → 0.8.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +370 -0
- package/dist/cjs/color-primary-palette_6.cjs.entry.js +14 -14
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/eds-accordion_17.cjs.entry.js +1468 -0
- package/dist/cjs/eds-alert.cjs.entry.js +11 -4
- package/dist/cjs/eds-app-root.cjs.entry.js +1 -1
- package/dist/cjs/eds-breadcrumb.cjs.entry.js +6 -2
- package/dist/cjs/{eds-avatar_4.cjs.entry.js → eds-card-desc_3.cjs.entry.js} +3 -70
- package/dist/cjs/eds-card-generic.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-project.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +1 -1
- package/dist/cjs/eds-components-section.cjs.entry.js +34 -20
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +1 -1
- package/dist/cjs/eds-docs-palettes.cjs.entry.js +1 -1
- package/dist/cjs/eds-docs-tokens.cjs.entry.js +1 -1
- package/dist/cjs/eds-feedback.cjs.entry.js +1 -1
- package/dist/cjs/eds-form.cjs.entry.js +211 -146
- package/dist/cjs/eds-frame.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-close.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-copy.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-eu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-loader.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-menu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-more.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-search.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-star.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-success.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-thumbs-down.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-thumbs-up.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-user.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-input_7.cjs.entry.js +357 -0
- package/dist/cjs/eds-login_2.cjs.entry.js +1 -1
- package/dist/cjs/eds-logo-variations.cjs.entry.js +1 -1
- package/dist/cjs/eds-modal.cjs.entry.js +2 -2
- package/dist/cjs/eds-pagination_2.cjs.entry.js +403 -0
- package/dist/cjs/eds-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/eds-rating.cjs.entry.js +1 -1
- package/dist/cjs/eds-section-core_2.cjs.entry.js +4 -4
- package/dist/cjs/eds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/eds-svg-repository.cjs.entry.js +5 -1
- package/dist/cjs/eds-switch.cjs.entry.js +2 -2
- package/dist/cjs/eds-tabs.cjs.entry.js +2 -2
- package/dist/cjs/eds-timeline.cjs.entry.js +5 -1
- package/dist/cjs/eds-toast-manager.cjs.entry.js +1 -1
- package/dist/cjs/eds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/eds-trl.cjs.entry.js +1 -1
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/index-2f63169d.js +14 -22
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-space.cjs.entry.js +1 -1
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +2 -2
- package/dist/cjs/logo-wrong-usage.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 +1 -1
- package/dist/collection/collection-manifest.json +3 -4
- package/dist/collection/components/eds-accordion/eds-accordion.css +12 -8
- package/dist/collection/components/eds-accordion/eds-accordion.js +9 -24
- package/dist/collection/components/eds-accordion/eds-accordion.stories.js +2 -2
- package/dist/collection/components/eds-alert/eds-alert.css +223 -91
- package/dist/collection/components/eds-alert/eds-alert.js +28 -3
- package/dist/collection/components/eds-alert/eds-alert.stories.js +10 -2
- package/dist/collection/components/eds-avatar/eds-avatar.css +38 -0
- package/dist/collection/components/eds-avatar/eds-avatar.js +11 -40
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +19 -46
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrumb.css +1 -0
- package/dist/collection/components/eds-breadcrump/eds-breadcrumb.stories.js +14 -6
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +6 -2
- package/dist/collection/components/eds-button/eds-button.css +8420 -6638
- package/dist/collection/components/eds-button/eds-button.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +4 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.css +133 -102
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.stories.js +10 -1
- package/dist/collection/components/eds-cards/eds-card-project/eds-card-project.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-tool/eds-card-tool.js +1 -1
- package/dist/collection/components/eds-code-block/eds-code-block.css +30 -3
- package/dist/collection/components/eds-code-block/eds-code-block.js +1 -1
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +4 -3
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-down/eds-icon-chevron-down.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-left/eds-icon-chevron-left.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-right/eds-icon-chevron-right.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-up/eds-icon-chevron-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.js +4 -4
- package/dist/collection/components/eds-icons/eds-icon-arrow-right/eds-icon-arrow-right.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-close/eds-icon-close.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-copy/eds-icon-copy.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-loader/eds-icon-loader.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-menu/eds-icon-menu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-more/eds-icon-more.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-search/eds-icon-search.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-star/eds-icon-star.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-success/eds-icon-success.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-down/eds-icon-thumbs-down.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-up/eds-icon-thumbs-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-user/eds-icon-user.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-bluesky/eds-icon-bluesky.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-facebook/eds-icon-facebook.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-linkedin/eds-icon-linkedin.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-mastodon/eds-icon-mastodon.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-twitter/eds-icon-twitter.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-youtube/eds-icon-youtube.js +1 -1
- package/dist/collection/components/eds-img/eds-img.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.js +5 -5
- package/dist/collection/components/eds-input-elements/eds-input-range/eds-input-range.js +8 -10
- package/dist/collection/components/eds-input-elements/eds-input-search/eds-input-search.js +49 -10
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +1 -1
- package/dist/collection/components/eds-input-field/eds-input-field.css +651 -52
- package/dist/collection/components/eds-input-field/eds-input-field.js +2 -2
- package/dist/collection/components/eds-link/eds-link.css +12 -204
- package/dist/collection/components/eds-link/eds-link.js +5 -5
- package/dist/collection/components/eds-logo/eds-logo.js +1 -1
- package/dist/collection/components/eds-modal/eds-modal.js +2 -2
- package/dist/collection/components/eds-pagination/eds-pagination.css +137 -109
- package/dist/collection/components/eds-pagination/eds-pagination.js +1 -1
- package/dist/collection/components/eds-pagination/eds-pagination.stories.js +0 -6
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- package/dist/collection/components/eds-rating/eds-rating.js +1 -1
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +1 -1
- package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +3 -3
- package/dist/collection/components/eds-spinner/eds-spinner.js +1 -1
- package/dist/collection/components/eds-steps/eds-steps.js +48 -1
- package/dist/collection/components/eds-switch/eds-switch.js +2 -2
- package/dist/collection/components/eds-table/eds-table.js +42 -27
- package/dist/collection/components/eds-table/eds-table.stories.js +1 -1
- package/dist/collection/components/eds-tag/eds-tag.js +1 -1
- package/dist/collection/components/eds-timeline/eds-timeline.css +7758 -0
- package/dist/collection/components/eds-timeline/eds-timeline.js +12 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +1 -1
- package/dist/collection/components/eds-trl/eds-trl.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/secondary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/support.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/secondary.js +7 -7
- package/dist/collection/eds-docs-ui/colors/gradient-palette/support.js +3 -3
- package/dist/collection/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +1 -1
- package/dist/collection/eds-docs-ui/eds-components-section/eds-components-section.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-palettes/eds-docs-palettes.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-tokens/eds-docs-tokens.js +1 -1
- package/dist/collection/eds-docs-ui/eds-logo-variations/eds-logo-variations.js +1 -1
- package/dist/collection/eds-docs-ui/eds-svg-repository/eds-svg-repository.css +5 -0
- package/dist/collection/eds-docs-ui/eds-svg-repository/eds-svg-repository.js +11 -1
- package/dist/collection/eds-docs-ui/functional/angular.js +1 -1
- package/dist/collection/eds-docs-ui/functional/overview.js +18 -1
- package/dist/collection/eds-docs-ui/functional/react.js +1 -1
- package/dist/collection/eds-docs-ui/functional/vue.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-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-wrong-usage/logo-wrong-usage.js +1 -1
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +1 -6
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.js +1 -2
- package/dist/collection/shared-ui/eds-feedback/eds-feedback.js +1 -1
- package/dist/collection/shared-ui/eds-footer/eds-footer.css +226 -0
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +44 -23
- package/dist/collection/shared-ui/eds-footer/eds-footer.stories.js +10 -16
- package/dist/collection/shared-ui/eds-form/eds-form.css +3 -0
- package/dist/collection/{components/eds-form-v2/eds-form-v2.js → shared-ui/eds-form/eds-form.js} +7 -6
- package/dist/collection/{components/eds-form-v2/eds-form-v2.stories.js → shared-ui/eds-form/eds-form.stories.js} +4 -4
- package/dist/collection/{eds-docs-ui → shared-ui}/eds-frame/eds-frame.css +3 -0
- package/dist/collection/{eds-docs-ui → shared-ui}/eds-frame/eds-frame.js +2 -2
- package/dist/collection/{eds-docs-ui → shared-ui}/eds-frame/eds-frame.stories.js +1 -1
- package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.css +120 -0
- package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.js +2 -1
- package/dist/collection/shared-ui/eds-header/eds-header.css +138 -0
- package/dist/collection/shared-ui/eds-header/eds-header.js +3 -2
- package/dist/collection/shared-ui/eds-login/eds-login.js +1 -1
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.css +4 -0
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +57 -3
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.css +361 -0
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.js +219 -0
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.css +32 -48
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +1 -1
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/shared-ui/eds-user/eds-user.css +7758 -0
- package/dist/collection/shared-ui/eds-user/eds-user.js +44 -14
- package/dist/collection/shared-ui/eds-user/eds-user.stories.js +1 -1
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/components/components.css +32 -48
- package/dist/components/components.esm.js +1 -1
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/eds-accordion2.js +10 -8
- package/dist/components/eds-alert2.js +12 -4
- package/dist/components/eds-app-root.js +1 -1
- package/dist/components/eds-avatar2.js +13 -8
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +6 -2
- package/dist/components/eds-button2.js +2 -2
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-generic2.js +1 -1
- package/dist/components/eds-card-project.js +1 -1
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-tool.js +1 -1
- package/dist/components/eds-card-wrapper.js +1 -1
- package/dist/components/eds-code-block2.js +1 -1
- package/dist/components/eds-components-section.js +58 -32
- package/dist/components/eds-cookies-preference.js +2 -3
- package/dist/components/eds-docs-palettes.js +1 -1
- package/dist/components/eds-docs-tokens.js +1 -1
- package/dist/components/eds-dropdown2.js +4 -3
- package/dist/components/eds-feedback.js +1 -1
- package/dist/components/eds-footer2.js +13 -6
- package/dist/components/eds-form.js +234 -189
- package/dist/components/eds-frame.js +3 -3
- package/dist/components/eds-fullscreen-menu.js +4 -3
- package/dist/components/eds-header.js +5 -4
- package/dist/components/eds-icon-arrow-diagonal.js +3 -3
- package/dist/components/eds-icon-arrow-right.js +1 -1
- package/dist/components/eds-icon-bluesky.js +1 -1
- package/dist/components/eds-icon-chevron-down.js +1 -1
- package/dist/components/eds-icon-chevron-left.js +1 -1
- package/dist/components/eds-icon-chevron-right.js +1 -1
- package/dist/components/eds-icon-chevron-up.js +1 -1
- package/dist/components/eds-icon-close.js +1 -1
- package/dist/components/eds-icon-copy.js +1 -1
- package/dist/components/eds-icon-eu.js +1 -1
- package/dist/components/eds-icon-facebook.js +1 -1
- package/dist/components/eds-icon-gitlab.js +1 -1
- package/dist/components/eds-icon-linkedin.js +1 -1
- package/dist/components/eds-icon-loader.js +1 -1
- package/dist/components/eds-icon-mastodon.js +1 -1
- package/dist/components/eds-icon-menu.js +1 -1
- package/dist/components/eds-icon-more.js +1 -1
- package/dist/components/eds-icon-search.js +1 -1
- package/dist/components/eds-icon-star.js +1 -1
- package/dist/components/eds-icon-success.js +1 -1
- package/dist/components/eds-icon-thumbs-down.js +1 -1
- package/dist/components/eds-icon-thumbs-up.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-user.js +1 -1
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +2 -2
- package/dist/components/eds-input-field2.js +3 -3
- package/dist/components/eds-input-footer2.js +1 -1
- package/dist/components/eds-input-label2.js +1 -1
- package/dist/components/eds-input-range2.js +1 -3
- package/dist/components/eds-input-search2.js +24 -2
- package/dist/components/eds-input-select2.js +1 -1
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-link2.js +6 -6
- package/dist/components/eds-login2.js +1 -1
- package/dist/components/eds-logo-variations.js +1 -1
- package/dist/components/eds-logo2.js +1 -1
- package/dist/components/eds-matomo-notice2.js +32 -4
- package/dist/components/eds-modal.js +2 -2
- package/dist/components/eds-pagination2.js +1 -1
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating2.js +1 -1
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +3 -3
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/{eds-form-v2.d.ts → eds-steps-v2.d.ts} +4 -4
- package/dist/components/eds-steps-v2.js +137 -0
- package/dist/components/eds-steps.js +1 -92
- package/dist/{esm/eds-steps.entry.js → components/eds-steps2.js} +86 -9
- package/dist/components/eds-svg-repository.js +5 -1
- package/dist/components/eds-switch.js +2 -2
- package/dist/components/eds-table2.js +41 -26
- package/dist/components/eds-tabs.js +2 -2
- package/dist/components/eds-tag2.js +1 -1
- package/dist/components/eds-timeline.js +7 -2
- package/dist/components/eds-toast-manager.js +1 -1
- package/dist/components/eds-tooltip.js +1 -1
- package/dist/components/eds-trl.js +1 -1
- package/dist/components/eds-user.js +26 -9
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +1 -1
- package/dist/components/logo-variations-horizontal2.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-62f2f274.entry.js → p-01cb7ceb.entry.js} +1 -1
- package/dist/components/p-03a38eab.entry.js +1 -0
- package/dist/components/p-05d8fdc3.entry.js +1 -0
- package/dist/components/{p-8b70a350.entry.js → p-07ba7c89.entry.js} +1 -1
- package/dist/components/p-0918a2e2.entry.js +1 -0
- package/dist/components/p-096d3274.entry.js +1 -0
- package/dist/components/{p-ad746789.entry.js → p-0f73391d.entry.js} +1 -1
- package/dist/components/p-10a318e0.entry.js +1 -0
- package/dist/components/p-16e0b902.entry.js +1 -0
- package/dist/components/{p-5e63e8a5.entry.js → p-18e10983.entry.js} +1 -1
- package/dist/components/p-215f3b21.entry.js +1 -0
- package/dist/components/{p-43350dff.entry.js → p-21a746a4.entry.js} +1 -1
- package/dist/components/{p-c935aa46.entry.js → p-24507e71.entry.js} +1 -1
- package/dist/components/p-30075622.entry.js +1 -0
- package/dist/components/p-32a7f571.entry.js +1 -0
- package/dist/components/p-376b706b.entry.js +1 -0
- package/dist/components/{p-fba4080d.entry.js → p-3f0fd469.entry.js} +1 -1
- package/dist/components/{p-5e2216ae.entry.js → p-3f480c3c.entry.js} +1 -1
- package/dist/components/p-4675ac16.entry.js +1 -0
- package/dist/components/p-46c9a35e.entry.js +1 -0
- package/dist/components/{p-2354daeb.entry.js → p-4aefc66e.entry.js} +1 -1
- package/dist/components/p-4bcf6077.entry.js +1 -0
- package/dist/components/{p-56ec190f.entry.js → p-4d295eb7.entry.js} +1 -1
- package/dist/components/{p-9eb2e870.entry.js → p-4df00ba5.entry.js} +1 -1
- package/dist/components/p-5cf480a8.entry.js +1 -0
- package/dist/components/p-5d26f527.entry.js +1 -0
- package/dist/components/{p-0443ac40.entry.js → p-622dd2a1.entry.js} +1 -1
- package/dist/components/p-64f6f07e.entry.js +1 -0
- package/dist/components/p-69e5af42.entry.js +1 -0
- package/dist/components/p-6a73ac42.entry.js +1 -0
- package/dist/components/p-70201ae6.entry.js +1 -0
- package/dist/components/p-7ba154c5.entry.js +1 -0
- package/dist/components/p-7ba4ca15.entry.js +1 -0
- package/dist/components/p-84faf1b3.entry.js +1 -0
- package/dist/components/p-8527ef5f.entry.js +1 -0
- package/dist/components/{p-066f6d27.entry.js → p-8803ecf9.entry.js} +1 -1
- package/dist/components/p-8baa7e01.entry.js +1 -0
- package/dist/components/p-8cf4ee6e.entry.js +1 -0
- package/dist/components/{p-f905ac92.entry.js → p-91440d2f.entry.js} +1 -1
- package/dist/components/p-9873ebec.entry.js +1 -0
- package/dist/components/{p-0e0106fc.entry.js → p-9cbcccf8.entry.js} +1 -1
- package/dist/components/p-9e2a0f5a.entry.js +1 -0
- package/dist/components/p-9f4ad4e4.entry.js +1 -0
- package/dist/components/{p-a91ab66e.entry.js → p-a02c5c4a.entry.js} +1 -1
- package/dist/components/p-a0abe772.entry.js +1 -0
- package/dist/components/p-a1d55013.entry.js +1 -0
- package/dist/components/{p-4cd69983.entry.js → p-a6bf9bf8.entry.js} +1 -1
- package/dist/components/p-abaf04e1.entry.js +1 -0
- package/dist/components/p-ae60f98b.entry.js +1 -0
- package/dist/components/p-b299b89a.entry.js +1 -0
- package/dist/components/p-b2f0f40b.entry.js +1 -0
- package/dist/components/p-b4332c34.entry.js +1 -0
- package/dist/components/p-b47d115d.entry.js +1 -0
- package/dist/components/p-c86243a3.entry.js +1 -0
- package/dist/components/p-cdc36ea8.entry.js +1 -0
- package/dist/components/p-ceac6200.entry.js +1 -0
- package/dist/components/{p-5520a3b6.entry.js → p-cee891dc.entry.js} +1 -1
- package/dist/components/p-d06faa08.entry.js +1 -0
- package/dist/components/{p-a5c61d1c.entry.js → p-d17ea8af.entry.js} +1 -1
- package/dist/components/p-d2159cc9.entry.js +1 -0
- package/dist/components/p-d895d036.entry.js +1 -0
- package/dist/components/{p-b80a9020.entry.js → p-db970de6.entry.js} +1 -1
- package/dist/components/p-e343cd31.entry.js +1 -0
- package/dist/components/{p-c06d4f14.entry.js → p-e3811d4b.entry.js} +1 -1
- package/dist/components/p-e8bd6106.entry.js +1 -0
- package/dist/components/p-e96a5c8e.entry.js +1 -0
- package/dist/components/{p-ff7acb55.entry.js → p-f223a835.entry.js} +1 -1
- package/dist/components/{p-e64cd6f7.entry.js → p-f2e66c82.entry.js} +1 -1
- package/dist/components/p-fec4cba7.entry.js +1 -0
- package/dist/components/primary.js +1 -1
- package/dist/components/primary2.js +1 -1
- package/dist/components/secondary.js +1 -1
- package/dist/components/secondary2.js +7 -7
- package/dist/components/support.js +1 -1
- package/dist/components/support2.js +3 -3
- package/dist/components/token-list2.js +1 -1
- package/dist/components/token-radii2.js +1 -1
- package/dist/components/token-ratios.js +1 -1
- package/dist/components/token-shadows2.js +1 -1
- package/dist/components/token-spacing.js +1 -1
- package/dist/components/token-typography.js +1 -1
- package/dist/esm/color-primary-palette_6.entry.js +14 -14
- package/dist/esm/components.js +1 -1
- package/dist/esm/correct-use-of-colors.entry.js +1 -1
- package/dist/esm/eds-accordion_17.entry.js +1448 -0
- package/dist/esm/eds-alert.entry.js +11 -4
- package/dist/esm/eds-app-root.entry.js +1 -1
- package/dist/esm/eds-breadcrumb.entry.js +6 -2
- package/dist/esm/{eds-avatar_4.entry.js → eds-card-desc_3.entry.js} +4 -70
- package/dist/esm/eds-card-generic.entry.js +1 -1
- package/dist/esm/eds-card-project.entry.js +1 -1
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +1 -1
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +1 -1
- package/dist/esm/eds-components-section.entry.js +34 -20
- package/dist/esm/eds-cookies-preference.entry.js +1 -1
- package/dist/esm/eds-docs-palettes.entry.js +1 -1
- package/dist/esm/eds-docs-tokens.entry.js +1 -1
- package/dist/esm/eds-feedback.entry.js +1 -1
- package/dist/esm/eds-form.entry.js +209 -144
- package/dist/esm/eds-frame.entry.js +3 -3
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +2 -2
- package/dist/esm/eds-icon-arrow-right.entry.js +1 -1
- package/dist/esm/eds-icon-bluesky.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-down.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-left.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-right.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-up.entry.js +1 -1
- package/dist/esm/eds-icon-close.entry.js +1 -1
- package/dist/esm/eds-icon-copy.entry.js +1 -1
- package/dist/esm/eds-icon-eu.entry.js +1 -1
- package/dist/esm/eds-icon-facebook.entry.js +1 -1
- package/dist/esm/eds-icon-gitlab.entry.js +1 -1
- package/dist/esm/eds-icon-linkedin.entry.js +1 -1
- package/dist/esm/eds-icon-loader.entry.js +1 -1
- package/dist/esm/eds-icon-mastodon.entry.js +1 -1
- package/dist/esm/eds-icon-menu.entry.js +1 -1
- package/dist/esm/eds-icon-more.entry.js +1 -1
- package/dist/esm/eds-icon-search.entry.js +1 -1
- package/dist/esm/eds-icon-star.entry.js +1 -1
- package/dist/esm/eds-icon-success.entry.js +1 -1
- package/dist/esm/eds-icon-thumbs-down.entry.js +1 -1
- package/dist/esm/eds-icon-thumbs-up.entry.js +1 -1
- package/dist/esm/eds-icon-twitter.entry.js +1 -1
- package/dist/esm/eds-icon-user.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/esm/eds-input_7.entry.js +347 -0
- package/dist/esm/eds-login_2.entry.js +1 -1
- package/dist/esm/eds-logo-variations.entry.js +1 -1
- package/dist/esm/eds-modal.entry.js +2 -2
- package/dist/esm/eds-pagination_2.entry.js +398 -0
- package/dist/esm/eds-progress-bar.entry.js +1 -1
- package/dist/esm/eds-rating.entry.js +1 -1
- package/dist/esm/eds-section-core_2.entry.js +4 -4
- package/dist/esm/eds-spinner.entry.js +1 -1
- package/dist/esm/eds-svg-repository.entry.js +5 -1
- package/dist/esm/eds-switch.entry.js +2 -2
- package/dist/esm/eds-tabs.entry.js +2 -2
- package/dist/esm/eds-timeline.entry.js +5 -1
- package/dist/esm/eds-toast-manager.entry.js +1 -1
- package/dist/esm/eds-tooltip.entry.js +1 -1
- package/dist/esm/eds-trl.entry.js +1 -1
- package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
- package/dist/esm/index-8a71b9a7.js +14 -22
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-space.entry.js +1 -1
- package/dist/esm/logo-variations-horizontal_2.entry.js +2 -2
- package/dist/esm/logo-wrong-usage.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 +1 -1
- package/dist/hydrate/index.js +551 -748
- package/dist/hydrate/index.mjs +551 -748
- package/dist/stencil.config.js +2 -7
- package/dist/types/components/eds-accordion/eds-accordion.d.ts +4 -2
- package/dist/types/components/eds-accordion/eds-accordion.stories.d.ts +1 -1
- package/dist/types/components/eds-alert/eds-alert.d.ts +5 -0
- package/dist/types/components/eds-alert/eds-alert.stories.d.ts +7 -0
- package/dist/types/components/eds-avatar/eds-avatar.d.ts +0 -2
- package/dist/types/components/eds-avatar/eds-avatar.stories.d.ts +0 -9
- package/dist/types/components/eds-breadcrump/eds-breadcrumb.stories.d.ts +8 -3
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.d.ts +3 -0
- package/dist/types/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.d.ts +1 -1
- package/dist/types/components/eds-input-elements/eds-input-label/eds-input-label.d.ts +13 -0
- package/dist/types/components/eds-input-elements/eds-input-range/eds-input-range.d.ts +21 -0
- package/dist/types/components/eds-input-elements/eds-input-search/eds-input-search.d.ts +39 -0
- package/dist/types/components/eds-pagination/eds-pagination.stories.d.ts +0 -8
- package/dist/types/components/eds-steps/eds-steps.d.ts +17 -0
- package/dist/types/components/eds-table/eds-table.d.ts +5 -1
- package/dist/types/components.d.ts +234 -301
- package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +1 -6
- package/dist/types/shared-ui/eds-footer/eds-footer.d.ts +4 -5
- package/dist/types/shared-ui/eds-footer/eds-footer.stories.d.ts +4 -9
- package/dist/types/{components/eds-form-v2/eds-form-v2.d.ts → shared-ui/eds-form/eds-form.d.ts} +1 -1
- package/dist/types/shared-ui/eds-matomo-notice/eds-matomo-notice.d.ts +11 -0
- package/dist/types/shared-ui/eds-steps-v2/eds-steps-v2.d.ts +57 -0
- package/dist/types/shared-ui/eds-user/eds-user.d.ts +13 -11
- package/package.json +3 -3
- package/dist/cjs/eds-accordion_22.cjs.entry.js +0 -1959
- package/dist/cjs/eds-dropdown.cjs.entry.js +0 -125
- package/dist/cjs/eds-steps.cjs.entry.js +0 -55
- package/dist/cjs/eds-user.cjs.entry.js +0 -29
- package/dist/cjs/eds-vertical-stepper.cjs.entry.js +0 -45
- package/dist/cjs/formUtils-4315a99c.js +0 -228
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.stories.js +0 -31
- package/dist/collection/components/eds-form/eds-form.css +0 -7153
- package/dist/collection/components/eds-form/eds-form.js +0 -609
- package/dist/collection/components/eds-form/eds-form.stories.js +0 -86
- package/dist/collection/components/eds-form-v2/eds-form-v2.css +0 -7153
- package/dist/collection/components/eds-steps/eds-vertical-stepper.css +0 -78
- package/dist/collection/components/eds-steps/eds-vertical-stepper.js +0 -72
- package/dist/components/eds-form-v2.js +0 -317
- package/dist/components/eds-vertical-stepper.d.ts +0 -11
- package/dist/components/eds-vertical-stepper.js +0 -86
- package/dist/components/formUtils.js +0 -223
- package/dist/components/p-033480b2.entry.js +0 -1
- package/dist/components/p-117d180f.entry.js +0 -1
- package/dist/components/p-20e9ae7f.entry.js +0 -1
- package/dist/components/p-2b31ca60.entry.js +0 -1
- package/dist/components/p-3368cfd5.entry.js +0 -1
- package/dist/components/p-33c5b937.entry.js +0 -1
- package/dist/components/p-3af94671.entry.js +0 -1
- package/dist/components/p-43b3579a.entry.js +0 -1
- package/dist/components/p-467fe746.entry.js +0 -1
- package/dist/components/p-46a6042d.entry.js +0 -1
- package/dist/components/p-4a860d5b.entry.js +0 -1
- package/dist/components/p-4ac27fe7.entry.js +0 -1
- package/dist/components/p-4b2e6f03.entry.js +0 -1
- package/dist/components/p-552b6a50.entry.js +0 -1
- package/dist/components/p-56b4e0fe.entry.js +0 -1
- package/dist/components/p-5aff1ea0.entry.js +0 -1
- package/dist/components/p-5c12a0df.entry.js +0 -1
- package/dist/components/p-60e7e745.entry.js +0 -1
- package/dist/components/p-6404e157.entry.js +0 -1
- package/dist/components/p-6fd0c3b3.entry.js +0 -1
- package/dist/components/p-77cc7c02.entry.js +0 -1
- package/dist/components/p-79c14cf1.entry.js +0 -1
- package/dist/components/p-7dd81017.entry.js +0 -1
- package/dist/components/p-7e0dd5d8.entry.js +0 -1
- package/dist/components/p-80dba155.js +0 -1
- package/dist/components/p-8154d013.entry.js +0 -1
- package/dist/components/p-86eed1b7.entry.js +0 -1
- package/dist/components/p-8e548691.entry.js +0 -1
- package/dist/components/p-90503a64.entry.js +0 -1
- package/dist/components/p-90f85604.entry.js +0 -1
- package/dist/components/p-94698510.entry.js +0 -1
- package/dist/components/p-950ecb1c.entry.js +0 -1
- package/dist/components/p-9b9fba38.entry.js +0 -1
- package/dist/components/p-9dc879c9.entry.js +0 -1
- package/dist/components/p-9ebc84d6.entry.js +0 -1
- package/dist/components/p-a56f0579.entry.js +0 -1
- package/dist/components/p-a6cd418e.entry.js +0 -1
- package/dist/components/p-a8dd1953.entry.js +0 -1
- package/dist/components/p-ab292dd5.entry.js +0 -1
- package/dist/components/p-c12d9350.entry.js +0 -1
- package/dist/components/p-c3dda942.entry.js +0 -1
- package/dist/components/p-c6b32753.entry.js +0 -1
- package/dist/components/p-dbcf1f0e.entry.js +0 -1
- package/dist/components/p-dcc08064.entry.js +0 -1
- package/dist/components/p-e9a533e0.entry.js +0 -1
- package/dist/components/p-eac63c82.entry.js +0 -1
- package/dist/components/p-f5959676.entry.js +0 -1
- package/dist/components/p-fc619588.entry.js +0 -1
- package/dist/components/p-fcc32210.entry.js +0 -1
- package/dist/esm/eds-accordion_22.entry.js +0 -1934
- package/dist/esm/eds-dropdown.entry.js +0 -121
- package/dist/esm/eds-user.entry.js +0 -25
- package/dist/esm/eds-vertical-stepper.entry.js +0 -41
- package/dist/esm/formUtils-ac68474d.js +0 -223
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.stories.d.ts +0 -32
- package/dist/types/components/eds-form/eds-form.d.ts +0 -148
- package/dist/types/components/eds-form/eds-form.stories.d.ts +0 -42
- package/dist/types/components/eds-steps/eds-vertical-stepper.d.ts +0 -22
- /package/dist/types/{components/eds-form-v2/eds-form-v2.stories.d.ts → shared-ui/eds-form/eds-form.stories.d.ts} +0 -0
- /package/dist/types/{eds-docs-ui → shared-ui}/eds-frame/eds-frame.d.ts +0 -0
- /package/dist/types/{eds-docs-ui → shared-ui}/eds-frame/eds-frame.stories.d.ts +0 -0
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-8a71b9a7.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-44b1416b.js';
|
|
3
|
-
|
|
4
|
-
const edsDropdownCss = ".z-focus{z-index:99}.relative{position:relative}.shadow-small{--tw-shadow:0px 1.5px 2px rgba(0, 0, 0, 0.1);--tw-shadow-colored:0px 1.5px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.bg-inverse{background-color:var(--white)}.border-softest{border:2px solid rgba(0, 0, 0, .05)}.z-10{z-index:10}.z-on-top{z-index:99999}.absolute{position:absolute}.top-full{top:100%}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.gap-y-4{row-gap:0.25rem}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-8{padding:0.5rem}.left-0{left:0rem}.left-1\\/2{left:50%}.left-4{left:0.25rem}.left-\\[4px\\]{left:4px}.right-0{right:0rem}.right-4{right:0.25rem}.right-8{right:0.5rem}";
|
|
5
|
-
const EdsDropdownStyle0 = edsDropdownCss;
|
|
6
|
-
|
|
7
|
-
const EdsDropdown = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.dropdown = createEvent(this, "dropdown", 7);
|
|
11
|
-
this.focusableItems = [];
|
|
12
|
-
/**
|
|
13
|
-
* Toggles the visibility of the dropdown and manages focus.
|
|
14
|
-
*/
|
|
15
|
-
this.handleClick = () => {
|
|
16
|
-
var _a;
|
|
17
|
-
this.isOpen = !this.isOpen;
|
|
18
|
-
if (this.isOpen) {
|
|
19
|
-
this.focusIndex = 0;
|
|
20
|
-
this.focusItem();
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.closeDropdown();
|
|
24
|
-
}
|
|
25
|
-
this.dropdown.emit({ expanded: this.isOpen });
|
|
26
|
-
sendAnalytics({
|
|
27
|
-
category: 'ui-component',
|
|
28
|
-
parentContext: null,
|
|
29
|
-
tag: this.host.tagName.toLowerCase(),
|
|
30
|
-
name: ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
31
|
-
action: this.isOpen ? 'expanded' : 'collapsed'
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
this.icon = 'chevron-down';
|
|
35
|
-
this.label = undefined;
|
|
36
|
-
this.rounded = false;
|
|
37
|
-
this.ariaLabel = 'Open dropdown';
|
|
38
|
-
this.asNav = true;
|
|
39
|
-
this.dropdownPos = 'left';
|
|
40
|
-
this.dropdownOffset = true;
|
|
41
|
-
this.intent = 'tertiary';
|
|
42
|
-
this.isOpen = false;
|
|
43
|
-
this.focusIndex = -1;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Closes the dropdown when a click occurs outside of it.
|
|
47
|
-
* @param {Event} e - The click event.
|
|
48
|
-
*/
|
|
49
|
-
handleWindowClick(e) {
|
|
50
|
-
if (!this.host.contains(e.target)) {
|
|
51
|
-
this.closeDropdown();
|
|
52
|
-
this.dropdown.emit({ expanded: false });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Handles keyboard navigation and accessibility within the dropdown.
|
|
57
|
-
* @param {KeyboardEvent} event - The keyboard event.
|
|
58
|
-
*/
|
|
59
|
-
handleKeyDown(event) {
|
|
60
|
-
if (this.isOpen) {
|
|
61
|
-
const key = event.key;
|
|
62
|
-
switch (key) {
|
|
63
|
-
case 'Tab':
|
|
64
|
-
this.closeDropdown();
|
|
65
|
-
this.dropdown.emit({ expanded: false });
|
|
66
|
-
break;
|
|
67
|
-
case 'ArrowUp':
|
|
68
|
-
event.preventDefault();
|
|
69
|
-
this.focusIndex = (this.focusIndex - 1 + this.focusableItems.length) % this.focusableItems.length;
|
|
70
|
-
this.focusItem();
|
|
71
|
-
break;
|
|
72
|
-
case 'ArrowDown':
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
this.focusIndex = (this.focusIndex + 1) % this.focusableItems.length;
|
|
75
|
-
this.focusItem();
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Closes the dropdown and resets focus.
|
|
82
|
-
*/
|
|
83
|
-
closeDropdown() {
|
|
84
|
-
this.isOpen = false;
|
|
85
|
-
this.focusIndex = -1;
|
|
86
|
-
this.dropdown.emit({ expanded: false });
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Sets focus on the currently selected item in the dropdown.
|
|
90
|
-
*/
|
|
91
|
-
focusItem() {
|
|
92
|
-
var _a;
|
|
93
|
-
(_a = this.focusableItems[this.focusIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Lifecycle method that runs after the component has been added to the DOM.
|
|
97
|
-
* Initializes focusable items within the dropdown.
|
|
98
|
-
*/
|
|
99
|
-
componentDidLoad() {
|
|
100
|
-
var _a;
|
|
101
|
-
this.focusableItems = Array.from(((_a = this.dropdownContent) === null || _a === void 0 ? void 0 : _a.querySelectorAll('a, button')) || []);
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Renders the dropdown component and displays its content when open.
|
|
105
|
-
* @returns {JSX.Element} The rendered dropdown component.
|
|
106
|
-
*/
|
|
107
|
-
render() {
|
|
108
|
-
return (h("div", { key: '3edd3453afbd52ee9e3c4d925baa46e07cfdbfc0', class: "z-focus relative", ref: (el) => (this.dropdownContent = el) }, h("eds-button", { key: '7c69acb6d6213af2cec8c1e00c68d83a5d23d676', label: this.label, "aria-label": this.ariaLabel, icon: this.icon, intent: this.intent, onClick: this.handleClick, "aria-expanded": this.isOpen.toString(), "aria-haspopup": "menu" }), h("nav", { key: '5048b1c3cb42418736d471c2331330afef49cbc5', role: "menu", class: {
|
|
109
|
-
'shadow-small bg-inverse border-softest z-10 z-on-top absolute top-full mt-4 flex flex-col gap-y-4 border-2 p-8': true,
|
|
110
|
-
'left-4': this.dropdownPos === 'left' && this.dropdownOffset,
|
|
111
|
-
'left-0': this.dropdownPos === 'left' && !this.dropdownOffset,
|
|
112
|
-
'right-4': this.dropdownPos === 'right' && this.dropdownOffset,
|
|
113
|
-
'right-0': this.dropdownPos === 'right' && !this.dropdownOffset,
|
|
114
|
-
'rounded-lg': this.rounded
|
|
115
|
-
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, h("slot", { key: '842f316e9a7910aa8b34823e883c54c1979668d1' }))));
|
|
116
|
-
}
|
|
117
|
-
get host() { return getElement(this); }
|
|
118
|
-
};
|
|
119
|
-
EdsDropdown.style = EdsDropdownStyle0;
|
|
120
|
-
|
|
121
|
-
export { EdsDropdown as eds_dropdown };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-8a71b9a7.js';
|
|
2
|
-
|
|
3
|
-
const EdsUser = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
this.user = undefined;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Lifecycle method that runs when the component is about to load.
|
|
10
|
-
* It initializes authentication by calling the `initAuth` method.
|
|
11
|
-
*/
|
|
12
|
-
async componentWillLoad() { }
|
|
13
|
-
get initials() {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
15
|
-
const initials = `${((_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.given_name) === null || _b === void 0 ? void 0 : _b.charAt(0)) || ''}${((_d = (_c = this.user) === null || _c === void 0 ? void 0 : _c.family_name) === null || _d === void 0 ? void 0 : _d.charAt(0)) || ''}`.toUpperCase();
|
|
16
|
-
return initials || ((_g = (_f = (_e = this.user) === null || _e === void 0 ? void 0 : _e.name) === null || _f === void 0 ? void 0 : _f.charAt(0)) === null || _g === void 0 ? void 0 : _g.toUpperCase()) || '';
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f;
|
|
20
|
-
return (h("div", { key: '68bc37b43d006a35e088a647d41b2257fbef25a7', class: "block" }, h("div", { key: '3f4badcb645238de9ac8aaad78e1c132407f5b0d', class: "flex items-center" }, h("eds-dropdown", { key: '7f065f82c5845fd0ebc9c6b465ac56a695a99b77', label: `Welcome, ${(_a = this.user) === null || _a === void 0 ? void 0 : _a.preferred_username}`, intent: "tertiary", "aria-label": "User Menu", "dropdown-pos": "right", "dropdown-offset": "false", icon: "chevron-down", class: "text-default" }, h("div", { key: '2b1e9279c8d4feae16bf64c15837b61b945af447', class: "min-w-[280px] p-8" }, h("div", { key: 'efa9aef50bc1eb4961e53a89f6e07cc5ff78d67b', class: "flex gap-x-16 pb-16 border-b-2 border-softer" }, h("eds-avatar", { key: '2b78a6768ecb101138ab742d812d407e1b4fdd89', "first-name": (_b = this.user) === null || _b === void 0 ? void 0 : _b.given_name, "last-name": (_c = this.user) === null || _c === void 0 ? void 0 : _c.family_name, initials: this.initials, color: "grey", rounded: true, "initials-strong": true }), h("div", { key: 'd538dfe8df5e8af92fa204493b8b59b0d0e9f61a', class: "max-w-full" }, ((_d = this.user) === null || _d === void 0 ? void 0 : _d.name) && h("p", { key: 'a644c3cdda0ce7bf2f62438a3866692f4222efeb', class: "f-ui-01 text-default w-full text-ellipsis" }, this.user.name), ((_e = this.user) === null || _e === void 0 ? void 0 : _e.preferred_username) && (h("p", { key: '2a6cf5f0324d27ebdfd2b331e5f232c23e544ad5', class: "f-ui-03-light text-light mt-4" }, this.user.preferred_username)), ((_f = this.user) === null || _f === void 0 ? void 0 : _f.email) && h("p", { key: '02b9dd4f2999b68107eabc2c1e2a1bc3bb98f26a', class: "f-ui-03-light text-light mt-4" }, this.user.email))), h("div", { key: '3a68427dc603f0a3fb2652bfbea292eb718046dd', class: "text-default mt-16 flex w-full flex-col gap-y-8" }, h("div", { key: '3f3f617385efc57502794f78079b8486b6801425', class: "border-softer mb-10 border-b-2 pb-16" }, h("eds-link", { key: '62fbc143f710605c7d840277dc90054a1162831d', label: "My EBRAINS", "aria-label": "My EBRAINS", url: "https://www.ebrains.eu/dashboard", intent: "primary", "extra-class": "w-full", external: true })), h("eds-link", { key: 1, label: "Account Settings", url: "https://iam.ebrains.eu/auth/realms/hbp/account/", intent: "secondary", icon: "arrow-diagonal", external: true, "extra-class": "w-full" }), h("slot", { key: 'f48a4c872784b60e421fda6e48f67f4c85b101d7' })))))));
|
|
21
|
-
}
|
|
22
|
-
get hostEl() { return getElement(this); }
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { EdsUser as eds_user };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-8a71b9a7.js';
|
|
2
|
-
|
|
3
|
-
const edsVerticalStepperCss = ":host{display:block}.stepper-container{margin:0 auto}.stepper{position:sticky;margin-left:16px;margin-bottom:12px;border-left:1px solid var(--soft-color, #ddd);padding-left:24px;counter-reset:step}.step{margin-bottom:24px}.step-label{counter-increment:step;font-size:1.25rem;font-weight:600;position:relative;margin-top:1em;margin-bottom:1em}.step-label::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:30px;height:30px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.optional{font-size:0.8rem;color:#888;margin-left:8px}.step-content{margin-top:8px}.step-buttons{margin-top:12px}.step-buttons button{margin-right:8px;padding:6px 12px;font-size:0.875rem}.completed{padding:16px;border:1px solid #ddd;margin-top:16px;text-align:center}";
|
|
4
|
-
const EdsVerticalStepperStyle0 = edsVerticalStepperCss;
|
|
5
|
-
|
|
6
|
-
const EdsVerticalStepper = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.handleNext = () => {
|
|
10
|
-
if (this.activeStep < this.parsedSteps.length) {
|
|
11
|
-
this.activeStep = this.activeStep + 1;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
this.handleBack = () => {
|
|
15
|
-
if (this.activeStep > 0) {
|
|
16
|
-
this.activeStep = this.activeStep - 1;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
this.handleReset = () => {
|
|
20
|
-
this.activeStep = 0;
|
|
21
|
-
};
|
|
22
|
-
this.steps = '[]';
|
|
23
|
-
this.activeStep = 0;
|
|
24
|
-
}
|
|
25
|
-
get parsedSteps() {
|
|
26
|
-
try {
|
|
27
|
-
return JSON.parse(this.steps);
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
//console.error('Invalid steps JSON', error);
|
|
31
|
-
return [];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
const steps = this.parsedSteps;
|
|
36
|
-
return (h("div", { key: '89344ad340f9eb8d20f463d3990ec4832cbdc900', class: "stepper-container" }, h("div", { key: 'da8d7fae2b30cfc93d04d5d8c3a61d95ccf91383', class: "stepper" }, steps.map((step, index) => (h("div", { class: "step", key: index }, h("div", { class: "step-label" }, h("span", null, step.label), index === steps.length - 1 && h("span", { class: "f-ui-03 text-lightest ml-4" }, "(Last step)")), this.activeStep === index && (h("div", { class: "step-content" }, h("p", null, step.description), h("div", { class: "step-buttons" }, h("eds-button", { label: index === steps.length - 1 ? 'Finish' : 'Continue', class: "next-btn", onClick: this.handleNext }), h("eds-button", { label: "Back", intent: "ghostInverse", onClick: this.handleBack, disabled: index === 0, "extra-class": index === 0 ? 'hidden' : 'ml-8 block' })))))))), this.activeStep === steps.length && (h("div", { key: '1e3272723281d9a10603b4d1e79badfdd6591cc5', class: "" }, h("eds-alert", { key: '7cc81e7e7097891364ff9894d383fd7bb9f7fce4', intent: "success", message: "All steps completed - you're finished!" }), h("eds-button", { key: 'a4d68698fa7831c7e2b6afae435979ccac46a726', label: "Start again", onClick: this.handleReset, "extra-class": "mt-4" })))));
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
EdsVerticalStepper.style = EdsVerticalStepperStyle0;
|
|
40
|
-
|
|
41
|
-
export { EdsVerticalStepper as eds_vertical_stepper };
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
// utils/validators.ts
|
|
2
|
-
function validateField(name, value, type, required, maxLength) {
|
|
3
|
-
const errors = [];
|
|
4
|
-
if (required && !value) {
|
|
5
|
-
errors.push(`${name} is required.`);
|
|
6
|
-
}
|
|
7
|
-
if (maxLength && typeof value === 'string' && value.length > maxLength) {
|
|
8
|
-
errors.push(`${name} must be at most ${maxLength} characters.`);
|
|
9
|
-
}
|
|
10
|
-
if (type === 'email' && value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value.toString())) {
|
|
11
|
-
errors.push('Invalid email format.');
|
|
12
|
-
}
|
|
13
|
-
return errors;
|
|
14
|
-
}
|
|
15
|
-
function validateFieldGroup(name, required, formEl) {
|
|
16
|
-
// Find all eds-input-field components that contain inputs with the given name.
|
|
17
|
-
const groupFields = Array.from(formEl.querySelectorAll('eds-input-field')).filter((edsField) => { var _a, _b; return ((_b = (_a = edsField.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(`input[name="${name}"]`)) === null || _b === void 0 ? void 0 : _b.length) > 0; });
|
|
18
|
-
// Collect all input elements with the matching name inside those components.
|
|
19
|
-
const groupElements = groupFields.flatMap((edsField) => { var _a; return Array.from(((_a = edsField.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(`input[name="${name}"]`)) || []); });
|
|
20
|
-
// Check if at least one input is checked.
|
|
21
|
-
const isChecked = groupElements.some((el) => el.checked);
|
|
22
|
-
const errors = [];
|
|
23
|
-
if (required && !isChecked) {
|
|
24
|
-
errors.push(`At least one option in ${name} is required.`);
|
|
25
|
-
}
|
|
26
|
-
return errors;
|
|
27
|
-
}
|
|
28
|
-
function validateSingleBox(name, required, formEl) {
|
|
29
|
-
var _a;
|
|
30
|
-
const errors = [];
|
|
31
|
-
// Find the eds-input-field component containing the input with the given name.
|
|
32
|
-
const edsField = Array.from(formEl.querySelectorAll('eds-input-field')).find((field) => { var _a; return (_a = field.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[name="${name}"]`); });
|
|
33
|
-
// If no such field is found and it's required, return an error.
|
|
34
|
-
if (!edsField) {
|
|
35
|
-
if (required) {
|
|
36
|
-
errors.push(`${name} is required.`);
|
|
37
|
-
}
|
|
38
|
-
return errors;
|
|
39
|
-
}
|
|
40
|
-
// Query within the component's shadow root.
|
|
41
|
-
const inputEl = (_a = edsField.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[name="${name}"]`);
|
|
42
|
-
if (required && inputEl && !inputEl.checked) {
|
|
43
|
-
errors.push(`${name} is required.`);
|
|
44
|
-
}
|
|
45
|
-
return errors;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Finds the first input element for a given field name inside eds-input-field components.
|
|
50
|
-
*/
|
|
51
|
-
function findFieldElement(formEl, name) {
|
|
52
|
-
const elements = Array.from(formEl.querySelectorAll('eds-input-field'));
|
|
53
|
-
for (const element of elements) {
|
|
54
|
-
if (element.shadowRoot) {
|
|
55
|
-
const input = element.shadowRoot.querySelector(`[name="${name}"]`);
|
|
56
|
-
if (input) {
|
|
57
|
-
return input;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Validates all fields and returns an object containing the errors and a flag indicating any errors.
|
|
65
|
-
*/
|
|
66
|
-
function validateFormFields(parsedFields, formEl, values,
|
|
67
|
-
// eslint-disable-next-line
|
|
68
|
-
isFieldVisible) {
|
|
69
|
-
const errors = {};
|
|
70
|
-
let hasError = false;
|
|
71
|
-
parsedFields.forEach((field) => {
|
|
72
|
-
// Only validate fields that are visible.
|
|
73
|
-
if (!isFieldVisible(field, values)) {
|
|
74
|
-
// If a field is hidden, clear its error.
|
|
75
|
-
delete errors[field.name];
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (field.type !== 'hidden') {
|
|
79
|
-
if ((field.type === 'checkbox' || field.type === 'radio') && !field.options) {
|
|
80
|
-
// Single checkbox or radio without multiple options
|
|
81
|
-
const fieldErrors = validateSingleBox(field.name, field.required, formEl);
|
|
82
|
-
if (fieldErrors.length > 0) {
|
|
83
|
-
errors[field.name] = fieldErrors;
|
|
84
|
-
hasError = true;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
else if (field.options && (field.type === 'checkbox' || field.type === 'radio')) {
|
|
88
|
-
// Checkbox or radio group with options
|
|
89
|
-
const fieldErrors = validateFieldGroup(field.name, field.required, formEl);
|
|
90
|
-
if (fieldErrors.length > 0) {
|
|
91
|
-
errors[field.name] = fieldErrors;
|
|
92
|
-
hasError = true;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
// For all other types, find the first matching element.
|
|
97
|
-
const inputEl = findFieldElement(formEl, field.name);
|
|
98
|
-
if (inputEl) {
|
|
99
|
-
const value = inputEl.value;
|
|
100
|
-
const fieldErrors = validateField(field.name, value, field.type, field.required, field.maxlength);
|
|
101
|
-
if (fieldErrors.length > 0) {
|
|
102
|
-
errors[field.name] = fieldErrors;
|
|
103
|
-
hasError = true;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
return { errors, hasError };
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Validates a field based on its type and returns an array of error messages.
|
|
114
|
-
* @param field - The field configuration object.
|
|
115
|
-
* @param value - The input value (if applicable).
|
|
116
|
-
* @param formEl - The form element used for DOM queries.
|
|
117
|
-
*/
|
|
118
|
-
function validateInputField(field, value, formEl) {
|
|
119
|
-
if (field.type === 'checkbox' || field.type === 'radio') {
|
|
120
|
-
if (field.options) {
|
|
121
|
-
return validateFieldGroup(field.name, field.required, formEl);
|
|
122
|
-
}
|
|
123
|
-
return validateSingleBox(field.name, field.required, formEl);
|
|
124
|
-
}
|
|
125
|
-
return validateField(field.name, value, field.type, field.required, field.maxlength);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Updates state values based on draft data and, after a delay, updates the corresponding DOM inputs.
|
|
130
|
-
*/
|
|
131
|
-
function getFormInitData({ initData, parsedFields, currentValues, formEl, isFieldVisible }) {
|
|
132
|
-
// Pass 1: Update state for all fields.
|
|
133
|
-
const updatedValues = Object.assign({}, currentValues);
|
|
134
|
-
parsedFields.forEach((field) => {
|
|
135
|
-
const value = initData[field.name];
|
|
136
|
-
if (value !== undefined) {
|
|
137
|
-
updatedValues[field.name] = value;
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
// Pass 2: Delay DOM updates to ensure nested fields are rendered.
|
|
141
|
-
setTimeout(() => {
|
|
142
|
-
parsedFields.forEach((field) => {
|
|
143
|
-
// Only update if the field is visible.
|
|
144
|
-
if (isFieldVisible(field, updatedValues)) {
|
|
145
|
-
const value = initData[field.name];
|
|
146
|
-
if (value !== undefined) {
|
|
147
|
-
if (field.type === 'checkbox' || field.type === 'radio') {
|
|
148
|
-
// Query all eds-input-field components and update matching inputs.
|
|
149
|
-
const elements = Array.from(formEl.querySelectorAll('eds-input-field'));
|
|
150
|
-
elements.forEach((element) => {
|
|
151
|
-
if (element.shadowRoot) {
|
|
152
|
-
const inputs = Array.from(element.shadowRoot.querySelectorAll(`[name="${field.name}"]`));
|
|
153
|
-
// Convert stored comma-separated value into a trimmed array.
|
|
154
|
-
const valuesArray = value.split(',').map((v) => v.trim());
|
|
155
|
-
inputs.forEach((inputEl) => {
|
|
156
|
-
// eslint-disable-next-line
|
|
157
|
-
inputEl.checked = valuesArray.includes(inputEl.value);
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
// For non-checkbox/radio inputs, update the first matching element using findFieldElement.
|
|
164
|
-
const inputEl = findFieldElement(formEl, field.name);
|
|
165
|
-
if (inputEl) {
|
|
166
|
-
inputEl.value = value;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
}, 50); // A 50ms delay to allow re-render
|
|
173
|
-
return { updatedValues };
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Updates state values based on draft data and, after a delay, updates the corresponding DOM inputs.
|
|
177
|
-
*/
|
|
178
|
-
function getFormDraftData({ draftData, parsedFields, currentValues, formEl, isFieldVisible }) {
|
|
179
|
-
// Pass 1: Update state for all fields.
|
|
180
|
-
const updatedValues = Object.assign({}, currentValues);
|
|
181
|
-
parsedFields.forEach((field) => {
|
|
182
|
-
const value = draftData[field.name];
|
|
183
|
-
if (value !== undefined) {
|
|
184
|
-
updatedValues[field.name] = value;
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
// Pass 2: Delay DOM updates to ensure nested fields are rendered.
|
|
188
|
-
setTimeout(() => {
|
|
189
|
-
parsedFields.forEach((field) => {
|
|
190
|
-
// Only update if the field is visible.
|
|
191
|
-
if (isFieldVisible(field, updatedValues)) {
|
|
192
|
-
const value = draftData[field.name];
|
|
193
|
-
if (value !== undefined) {
|
|
194
|
-
if (field.type === 'checkbox' || field.type === 'radio') {
|
|
195
|
-
// Query all eds-input-field components and update matching inputs.
|
|
196
|
-
const elements = Array.from(formEl.querySelectorAll('eds-input-field'));
|
|
197
|
-
elements.forEach((element) => {
|
|
198
|
-
if (element.shadowRoot) {
|
|
199
|
-
const inputs = Array.from(element.shadowRoot.querySelectorAll(`[name="${field.name}"]`));
|
|
200
|
-
// Convert stored comma-separated value into a trimmed array.
|
|
201
|
-
const valuesArray = value.split(',').map((v) => v.trim());
|
|
202
|
-
inputs.forEach((inputEl) => {
|
|
203
|
-
// eslint-disable-next-line
|
|
204
|
-
inputEl.checked = valuesArray.includes(inputEl.value);
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
// For non-checkbox/radio inputs, update the first matching element using findFieldElement.
|
|
211
|
-
const inputEl = findFieldElement(formEl, field.name);
|
|
212
|
-
if (inputEl) {
|
|
213
|
-
inputEl.value = value;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
}, 50); // A 50ms delay to allow re-render
|
|
220
|
-
return { updatedValues };
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export { validateInputField as a, getFormDraftData as b, getFormInitData as g, validateFormFields as v };
|
package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.stories.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
title: string;
|
|
3
|
-
component: string;
|
|
4
|
-
argTypes: {
|
|
5
|
-
description: {
|
|
6
|
-
control: string;
|
|
7
|
-
};
|
|
8
|
-
descClass: {
|
|
9
|
-
control: string;
|
|
10
|
-
};
|
|
11
|
-
truncate: {
|
|
12
|
-
control: string;
|
|
13
|
-
};
|
|
14
|
-
truncateLines: {
|
|
15
|
-
control: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
args: {
|
|
19
|
-
description: string;
|
|
20
|
-
descClass: string;
|
|
21
|
-
truncate: boolean;
|
|
22
|
-
truncateLines: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export default _default;
|
|
26
|
-
export declare const Default: {
|
|
27
|
-
render: (args: any) => import("lit-html").TemplateResult<1>;
|
|
28
|
-
args: {
|
|
29
|
-
description: string;
|
|
30
|
-
truncate: boolean;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
interface User {
|
|
3
|
-
token: string;
|
|
4
|
-
email: string;
|
|
5
|
-
name: string;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* `EdsForm` is a comprehensive form component designed to handle form submission with validation,
|
|
10
|
-
* error handling, and customizable fields. It offers several options for handling alerts and
|
|
11
|
-
* success/error messages and supports various input types and configurations.
|
|
12
|
-
*
|
|
13
|
-
* Key Features:
|
|
14
|
-
* - Configurable validation for fields, including dynamic field validation.
|
|
15
|
-
* - Customizable success and error messages displayed upon submission.
|
|
16
|
-
* - Optionally includes a submit button, which can display a loading state during submission.
|
|
17
|
-
* - Supports file upload, hidden fields, and dynamic field parsing.
|
|
18
|
-
* - Emits `formSubmitting` event when the form is submitting.
|
|
19
|
-
*
|
|
20
|
-
* This component is ideal for implementing complex forms with specific validation and submission behaviors.
|
|
21
|
-
*/
|
|
22
|
-
export declare class EdsForm {
|
|
23
|
-
/**
|
|
24
|
-
* If `true`, includes the current form URL in the submission data.
|
|
25
|
-
*/
|
|
26
|
-
setFormUrl?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* If `true`, includes a submit button in the form.
|
|
29
|
-
*/
|
|
30
|
-
submitBtn?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* If `true`, includes a submit button in the form.
|
|
33
|
-
*/
|
|
34
|
-
submitBtnLabel?: string;
|
|
35
|
-
/**
|
|
36
|
-
* The message displayed when the form submission is successful.
|
|
37
|
-
*/
|
|
38
|
-
successMessage?: string;
|
|
39
|
-
/**
|
|
40
|
-
* The message displayed when the form submission fails.
|
|
41
|
-
*/
|
|
42
|
-
errorMessage?: string;
|
|
43
|
-
/**
|
|
44
|
-
* The message displayed when the form submission fails.
|
|
45
|
-
*/
|
|
46
|
-
submitBtnHintMessage?: string;
|
|
47
|
-
/**
|
|
48
|
-
* The API endpoint where the form data will be submitted.
|
|
49
|
-
*/
|
|
50
|
-
endpoint: string;
|
|
51
|
-
/**
|
|
52
|
-
* The name of the form, used for grouping inputs and identifying the form.
|
|
53
|
-
*/
|
|
54
|
-
name: string;
|
|
55
|
-
/**
|
|
56
|
-
* A JSON string representing the fields in the form.
|
|
57
|
-
* Example:
|
|
58
|
-
* ```json
|
|
59
|
-
* [
|
|
60
|
-
* { "name": "email", "label": "Email", "type": "text", "required": true },
|
|
61
|
-
* { "name": "password", "label": "Password", "type": "password", "required": true }
|
|
62
|
-
* ]
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
fields: string | any[];
|
|
66
|
-
/**
|
|
67
|
-
* Couping Auth and Submit button state
|
|
68
|
-
* Submit button's state (disabled) is coupled with the Users' auth state - if user auth true then submit btn is enabled
|
|
69
|
-
* This useful when the component is used as Survey and more types.
|
|
70
|
-
*/
|
|
71
|
-
coupleAuth: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* The user object containing user information.
|
|
74
|
-
* This is populated after a successful authentication.
|
|
75
|
-
*/
|
|
76
|
-
user?: User;
|
|
77
|
-
/**
|
|
78
|
-
* Whether the form is in draft mode.
|
|
79
|
-
* Meaning it will attempt to post each input change invalidated.
|
|
80
|
-
*/
|
|
81
|
-
draft?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* The draft data the form will attempt to populate in the provided fields.
|
|
84
|
-
*/
|
|
85
|
-
draftData: {
|
|
86
|
-
[key: string]: any;
|
|
87
|
-
};
|
|
88
|
-
values: {
|
|
89
|
-
[key: string]: any;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Tracks whether the form was successfully submitted.
|
|
93
|
-
*/
|
|
94
|
-
formSubmitted: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Tracks whether the form has any errors.
|
|
97
|
-
*/
|
|
98
|
-
hasError: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* A dictionary of field names and their corresponding error messages.
|
|
101
|
-
*/
|
|
102
|
-
errors: {
|
|
103
|
-
[key: string]: string[];
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Indicates whether the form is currently submitting.
|
|
107
|
-
*/
|
|
108
|
-
isSubmitting: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* The alert message displayed after form submission or validation.
|
|
111
|
-
*/
|
|
112
|
-
alertMessage: string | null;
|
|
113
|
-
isAuthenticated: boolean;
|
|
114
|
-
parsedFields: any[];
|
|
115
|
-
form: EventEmitter<{
|
|
116
|
-
event: 'input' | 'change' | 'submit';
|
|
117
|
-
validated?: boolean;
|
|
118
|
-
field?: string;
|
|
119
|
-
value?: any;
|
|
120
|
-
message?: string;
|
|
121
|
-
success?: boolean;
|
|
122
|
-
data: any;
|
|
123
|
-
}>;
|
|
124
|
-
/**
|
|
125
|
-
* Reference to the host element.
|
|
126
|
-
*/
|
|
127
|
-
el: HTMLElement;
|
|
128
|
-
private formEl;
|
|
129
|
-
componentWillLoad(): Promise<void>;
|
|
130
|
-
componentDidLoad(): Promise<void>;
|
|
131
|
-
get shouldFormAcceptDraft(): boolean;
|
|
132
|
-
get shouldFormProcessDraft(): boolean;
|
|
133
|
-
parseFields(newValue: string | any[]): void;
|
|
134
|
-
loadDraft(): void;
|
|
135
|
-
emitContext(linkElement: HTMLElement): void;
|
|
136
|
-
isFieldVisible(field: any): boolean;
|
|
137
|
-
validateForm(): void;
|
|
138
|
-
populateFormWithDraftData(draftData: {
|
|
139
|
-
[key: string]: any;
|
|
140
|
-
}): void;
|
|
141
|
-
getFormData(): FormData;
|
|
142
|
-
handleChange(e: Event, field: any): void;
|
|
143
|
-
handleInput(e: Event, field: any): void;
|
|
144
|
-
handleSubmit(e: Event): Promise<void>;
|
|
145
|
-
postFormDataWithoutValidation(): Promise<void>;
|
|
146
|
-
render(): any;
|
|
147
|
-
}
|
|
148
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
title: string;
|
|
3
|
-
component: string;
|
|
4
|
-
argTypes: {
|
|
5
|
-
name: {
|
|
6
|
-
control: string;
|
|
7
|
-
description: string;
|
|
8
|
-
defaultValue: string;
|
|
9
|
-
};
|
|
10
|
-
endpoint: {
|
|
11
|
-
control: string;
|
|
12
|
-
description: string;
|
|
13
|
-
defaultValue: string;
|
|
14
|
-
};
|
|
15
|
-
fields: {
|
|
16
|
-
control: string;
|
|
17
|
-
description: string;
|
|
18
|
-
};
|
|
19
|
-
successMessage: {
|
|
20
|
-
control: string;
|
|
21
|
-
description: string;
|
|
22
|
-
defaultValue: string;
|
|
23
|
-
};
|
|
24
|
-
errorMessage: {
|
|
25
|
-
control: string;
|
|
26
|
-
description: string;
|
|
27
|
-
defaultValue: string;
|
|
28
|
-
};
|
|
29
|
-
submitBtn: {
|
|
30
|
-
control: string;
|
|
31
|
-
description: string;
|
|
32
|
-
defaultValue: boolean;
|
|
33
|
-
};
|
|
34
|
-
setFormUrl: {
|
|
35
|
-
control: string;
|
|
36
|
-
description: string;
|
|
37
|
-
defaultValue: boolean;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export default _default;
|
|
42
|
-
export declare const Default: any;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface Step {
|
|
2
|
-
label: string;
|
|
3
|
-
description: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class EdsVerticalStepper {
|
|
6
|
-
/**
|
|
7
|
-
* JSON string containing an array of steps.
|
|
8
|
-
* Example:
|
|
9
|
-
* '[
|
|
10
|
-
* { "label": "Select campaign settings", "description": "For each ad campaign..." },
|
|
11
|
-
* { "label": "Create an ad group", "description": "An ad group contains one or more ads..." },
|
|
12
|
-
* { "label": "Create an ad", "description": "Try out different ad text..." }
|
|
13
|
-
* ]'
|
|
14
|
-
*/
|
|
15
|
-
steps: string;
|
|
16
|
-
activeStep: number;
|
|
17
|
-
private get parsedSteps();
|
|
18
|
-
private handleNext;
|
|
19
|
-
private handleBack;
|
|
20
|
-
private handleReset;
|
|
21
|
-
render(): any;
|
|
22
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|