@ebrains/components 2.3.1 → 2.4.1
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 +33 -24
- 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_36.cjs.entry.js → eds-accordion_37.cjs.entry.js} +661 -209
- package/dist/cjs/eds-app-root.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-desc_2.cjs.entry.js +2 -2
- 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-cookies-preference.cjs.entry.js +1 -1
- package/dist/cjs/eds-feedback.cjs.entry.js +1 -1
- package/dist/cjs/eds-footer.cjs.entry.js +2 -2
- package/dist/cjs/eds-frame.cjs.entry.js +1 -1
- package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +8 -3
- package/dist/cjs/eds-gauge.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-bin.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-bookmark.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-clone.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-download.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-draft.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-edit.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-eu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-external.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-loader.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-menu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-minus.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-more.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-paper.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-plus.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-portal.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-private.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-public.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-search.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-star.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-start.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-success.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-thumbs-down.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-thumbs-up.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-tutorial.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-unknown.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-updown.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-user.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-view.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-modal.cjs.entry.js +2 -2
- package/dist/cjs/eds-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/eds-section-core_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-social-networks.cjs.entry.js +1 -1
- 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.cjs.entry.js +1 -1
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/index-50bc1aa4.js +2 -2
- 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-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 +3 -3
- 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/cjs/{up-and-down-d71df67d.js → up-and-down-6f179dd8.js} +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/eds-accordion/eds-accordion.js +2 -2
- package/dist/collection/components/eds-alert/eds-alert.js +2 -2
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +1 -1
- package/dist/collection/components/eds-button/eds-button.js +1 -19
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-project/eds-card-project.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-tool/eds-card-tool.js +1 -1
- package/dist/collection/components/eds-charts/eds-gauge/eds-gauge.js +1 -1
- package/dist/collection/components/eds-code-block/eds-code-block.js +1 -1
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +2 -2
- package/dist/collection/components/eds-feedback/eds-feedback.js +1 -1
- package/dist/collection/components/eds-footer/eds-footer.js +2 -2
- package/dist/collection/components/eds-form/eds-form.js +56 -16
- package/dist/collection/components/eds-frame/eds-frame.js +1 -1
- package/dist/collection/components/eds-fullscreen-menu/eds-fullscreen-menu.js +8 -3
- package/dist/collection/components/eds-header/eds-header.css +5 -0
- package/dist/collection/components/eds-header/eds-header.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-down/eds-icon-chevron-down.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-left/eds-icon-chevron-left.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-right/eds-icon-chevron-right.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-up/eds-icon-chevron-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-right/eds-icon-arrow-right.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-bin/eds-icon-bin.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-bookmark/eds-icon-bookmark.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-clone/eds-icon-clone.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-download/eds-icon-download.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-draft/eds-icon-draft.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-edit/eds-icon-edit.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-external/eds-icon-external.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-loader/eds-icon-loader.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-menu/eds-icon-menu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-minus/eds-icon-minus.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-more/eds-icon-more.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-paper/eds-icon-paper.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-plus/eds-icon-plus.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-portal/eds-icon-portal.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-private/eds-icon-private.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-public/eds-icon-public.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-search/eds-icon-search.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-star/eds-icon-star.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-start/eds-icon-start.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-success/eds-icon-success.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-down/eds-icon-thumbs-down.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-up/eds-icon-thumbs-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-tutorial/eds-icon-tutorial.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-unknown/eds-icon-unknown.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-updown/eds-icon-updown.js +2 -2
- package/dist/collection/components/eds-icons/eds-icon-user/eds-icon-user.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-view/eds-icon-view.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-bluesky/eds-icon-bluesky.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-facebook/eds-icon-facebook.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-linkedin/eds-icon-linkedin.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-mastodon/eds-icon-mastodon.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-twitter/eds-icon-twitter.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-youtube/eds-icon-youtube.js +1 -1
- package/dist/collection/components/eds-img/eds-img.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-range/eds-input-range.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-search/eds-input-search.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +2 -2
- package/dist/collection/components/eds-input-field/eds-input-field.js +2 -2
- package/dist/collection/components/eds-link/eds-link.js +15 -25
- 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-nps/eds-nps.js +66 -53
- package/dist/collection/components/eds-pagination/eds-pagination.js +1 -1
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- package/dist/collection/components/eds-rating/eds-rating.js +1 -1
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +1 -1
- package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +2 -2
- package/dist/collection/components/eds-sidebar/eds-sidebar.css +458 -0
- package/dist/collection/components/eds-sidebar/eds-sidebar.js +299 -0
- package/dist/collection/components/eds-sidebar/eds-sidebar.stories.js +141 -0
- 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 +334 -10
- package/dist/collection/components/eds-steps/eds-steps.js +187 -101
- package/dist/collection/components/eds-steps/eds-steps.stories.js +21 -3
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.css +167 -3
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.js +177 -113
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.stories.js +8 -1
- package/dist/collection/components/eds-switch/eds-switch.js +2 -2
- package/dist/collection/components/eds-table/eds-table.css +14 -0
- package/dist/collection/components/eds-table/eds-table.js +99 -9
- package/dist/collection/components/eds-tabs/eds-tabs.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-manager/eds-toast-manager.js +1 -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/components/eds-user/eds-user.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/components-section/components-section.js +1 -1
- package/dist/collection/eds-docs-ui/components-section/functional/overview.js +2 -2
- package/dist/collection/eds-docs-ui/components-section/functional/vue.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 +1 -1
- 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 +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-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-global-search/eds-global-search.js +10 -12
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.stories.js +2 -1
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/components/components-section.js +33 -24
- package/dist/components/components.css +315 -0
- 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 -2
- package/dist/components/eds-alert2.js +2 -2
- package/dist/components/eds-app-root.js +1 -1
- package/dist/components/eds-avatar2.js +1 -1
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +1 -1
- package/dist/components/eds-button2.js +1 -3
- 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-code-block2.js +1 -1
- package/dist/components/eds-cookies-preference.js +1 -1
- package/dist/components/eds-dropdown2.js +2 -2
- package/dist/components/eds-feedback.js +1 -1
- package/dist/components/eds-footer2.js +6 -12
- package/dist/components/eds-form.js +80 -34
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-fullscreen-menu.js +16 -17
- package/dist/components/eds-gauge.js +1 -1
- package/dist/components/eds-global-search.js +31 -27
- package/dist/components/eds-header.js +2 -2
- package/dist/components/eds-icon-arrow-diagonal.js +1 -1
- package/dist/components/eds-icon-arrow-right.js +1 -1
- package/dist/components/eds-icon-bin.js +1 -1
- package/dist/components/eds-icon-bluesky.js +1 -1
- package/dist/components/eds-icon-bookmark.js +1 -1
- package/dist/components/eds-icon-chevron-down.js +1 -1
- package/dist/components/eds-icon-chevron-left.js +1 -1
- package/dist/components/eds-icon-chevron-right.js +1 -1
- package/dist/components/eds-icon-chevron-up.js +1 -1
- package/dist/components/eds-icon-clone.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-download.js +1 -1
- package/dist/components/eds-icon-draft.js +1 -1
- package/dist/components/eds-icon-edit.js +1 -1
- package/dist/components/eds-icon-eu.js +1 -1
- package/dist/components/eds-icon-external.js +1 -1
- package/dist/components/eds-icon-facebook.js +1 -1
- package/dist/components/eds-icon-gitlab.js +1 -1
- package/dist/components/eds-icon-linkedin.js +1 -1
- package/dist/components/eds-icon-loader.js +1 -1
- package/dist/components/eds-icon-mastodon.js +1 -1
- package/dist/components/eds-icon-menu.js +1 -1
- package/dist/components/eds-icon-minus.js +1 -1
- package/dist/components/eds-icon-more.js +1 -1
- package/dist/components/eds-icon-paper.js +1 -1
- package/dist/components/eds-icon-plus.js +1 -1
- package/dist/components/eds-icon-portal.js +1 -1
- package/dist/components/eds-icon-private.js +1 -1
- package/dist/components/eds-icon-public.js +1 -1
- package/dist/components/eds-icon-search.js +1 -1
- package/dist/components/eds-icon-star.js +1 -1
- package/dist/components/eds-icon-start.js +1 -1
- package/dist/components/eds-icon-success.js +1 -1
- package/dist/components/eds-icon-thumbs-down.js +1 -1
- package/dist/components/eds-icon-thumbs-up.js +1 -1
- package/dist/components/eds-icon-tutorial.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-unknown.js +1 -1
- package/dist/components/eds-icon-updown.js +2 -2
- package/dist/components/eds-icon-user.js +1 -1
- package/dist/components/eds-icon-view.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 +22 -16
- package/dist/components/eds-input-footer2.js +9 -3
- package/dist/components/eds-input-label2.js +1 -1
- package/dist/components/eds-input-range2.js +1 -1
- package/dist/components/eds-input-search2.js +1 -1
- package/dist/components/eds-input-select2.js +2 -2
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-link2.js +14 -9
- package/dist/components/eds-logo2.js +1 -1
- package/dist/components/eds-modal.js +2 -2
- package/dist/components/eds-nps2.js +66 -53
- package/dist/components/eds-pagination2.js +1 -1
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating2.js +1 -1
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-sidebar.d.ts +11 -0
- package/dist/components/eds-sidebar.js +208 -0
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/eds-steps-v2.js +133 -46
- package/dist/components/eds-steps2.js +130 -34
- package/dist/components/eds-switch.js +2 -2
- package/dist/components/eds-table2.js +65 -9
- package/dist/components/eds-tabs.js +2 -2
- 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-tooltip2.js +1 -1
- package/dist/components/eds-trl.js +1 -1
- package/dist/components/eds-user.js +1 -1
- 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-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-838d6773.entry.js → p-0e504247.entry.js} +1 -1
- package/dist/components/{p-b8b4c01e.entry.js → p-0f319eac.entry.js} +1 -1
- package/dist/components/{p-7b0496b1.entry.js → p-11bf02db.entry.js} +1 -1
- package/dist/components/{p-ca91952b.entry.js → p-15df046d.entry.js} +1 -1
- package/dist/components/p-15e5229b.entry.js +1 -0
- package/dist/components/{p-75b40e57.entry.js → p-1804a119.entry.js} +1 -1
- package/dist/components/p-19c628e6.entry.js +1 -0
- package/dist/components/p-19e241e9.entry.js +1 -0
- package/dist/components/p-1a674723.entry.js +9 -0
- package/dist/components/p-1dd6faeb.entry.js +1 -0
- package/dist/components/{p-e614c8e8.entry.js → p-21ed7e2e.entry.js} +1 -1
- package/dist/components/{p-2d6ca1c5.entry.js → p-2bd9605b.entry.js} +1 -1
- package/dist/components/{p-44d33938.entry.js → p-2d4f6e90.entry.js} +1 -1
- package/dist/components/p-2e3bd154.entry.js +1 -0
- package/dist/components/p-3004d956.entry.js +1 -0
- package/dist/components/p-313b04c9.entry.js +1 -0
- package/dist/components/p-31a3c6a2.entry.js +1 -0
- package/dist/components/p-3778e162.entry.js +1 -0
- package/dist/components/p-39548acc.entry.js +1 -0
- package/dist/components/p-3aac5c73.entry.js +1 -0
- package/dist/components/p-3d313fb5.entry.js +1 -0
- package/dist/components/p-43bc9224.entry.js +1 -0
- package/dist/components/p-48eaf544.entry.js +1 -0
- package/dist/components/{p-b522fa70.entry.js → p-4c2a8bf1.entry.js} +1 -1
- package/dist/components/{p-fe2bb83e.entry.js → p-4eaa7ba2.entry.js} +1 -1
- package/dist/components/p-5157eb25.entry.js +1 -0
- package/dist/components/{p-0798d50d.entry.js → p-59d2b2a9.entry.js} +1 -1
- package/dist/components/p-5c28d2d3.entry.js +1 -0
- package/dist/components/p-63d9ab86.entry.js +1 -0
- package/dist/components/p-640c4463.entry.js +1 -0
- package/dist/components/p-643eee62.entry.js +1 -0
- package/dist/components/p-64be8ed5.entry.js +1 -0
- package/dist/components/{p-e9a6f693.entry.js → p-67c3bedc.entry.js} +1 -1
- package/dist/components/{p-f2b12631.entry.js → p-70cbe02d.entry.js} +1 -1
- package/dist/components/p-7aa97ad6.entry.js +1 -0
- package/dist/components/{p-24683124.entry.js → p-7b160270.entry.js} +1 -1
- package/dist/components/p-83b26d8c.entry.js +1 -0
- package/dist/components/{p-e2bc6329.entry.js → p-85f866f0.entry.js} +1 -1
- package/dist/components/p-8779905b.entry.js +1 -0
- package/dist/components/p-88814860.entry.js +1 -0
- package/dist/components/{p-b471922f.entry.js → p-8998eec7.entry.js} +1 -1
- package/dist/components/p-8c42cefe.entry.js +1 -0
- package/dist/components/{p-bce8a58d.entry.js → p-8c520685.entry.js} +1 -1
- package/dist/components/p-8cba26bd.entry.js +1 -0
- package/dist/components/p-8ef830f5.entry.js +1 -0
- package/dist/components/p-942f4a95.entry.js +1 -0
- package/dist/components/p-9b05145b.entry.js +1 -0
- package/dist/components/{p-4beb1e06.entry.js → p-9d57b51f.entry.js} +1 -1
- package/dist/components/p-9e46df74.entry.js +1 -0
- package/dist/components/{p-76330532.entry.js → p-9fe2c4ba.entry.js} +1 -1
- package/dist/components/p-a38bb645.entry.js +1 -0
- package/dist/components/{p-df18ffd1.entry.js → p-a61dbad5.entry.js} +1 -1
- package/dist/components/{p-398255ff.entry.js → p-a78079b7.entry.js} +1 -1
- package/dist/components/p-a8e5591c.entry.js +1 -0
- package/dist/components/p-afceabd6.entry.js +1 -0
- package/dist/components/p-b00352ff.entry.js +1 -0
- package/dist/components/p-b93f983c.entry.js +1 -0
- package/dist/components/p-bb6a6de2.entry.js +1 -0
- package/dist/components/p-bc2204f3.entry.js +1 -0
- package/dist/components/p-be54a6c8.entry.js +1 -0
- package/dist/components/p-bef9bf37.entry.js +1 -0
- package/dist/components/p-c1ad7132.entry.js +1 -0
- package/dist/components/p-cb5e39d1.entry.js +1 -0
- package/dist/components/p-ccb6ad15.entry.js +1 -0
- package/dist/components/p-d090b9fa.entry.js +1 -0
- package/dist/components/p-d11f2808.entry.js +1 -0
- package/dist/components/p-d6e5a9fb.entry.js +1 -0
- package/dist/components/{p-ce3b6043.entry.js → p-d958e1f3.entry.js} +1 -1
- package/dist/components/{p-963feadd.entry.js → p-da7b4b6a.entry.js} +1 -1
- package/dist/components/p-dea41137.entry.js +1 -0
- package/dist/components/p-e01cf4f8.entry.js +1 -0
- package/dist/components/{p-54e29971.entry.js → p-e5a1118d.entry.js} +1 -1
- package/dist/components/p-eb818455.entry.js +1 -0
- package/dist/components/p-f061ff11.entry.js +1 -0
- package/dist/components/p-f0a330ef.entry.js +1 -0
- package/dist/components/p-f11e3f42.entry.js +1 -0
- package/dist/components/{p-7ada2015.entry.js → p-f24bfc6a.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 +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/components/up-and-down.js +2 -2
- package/dist/esm/color-primary-palette_6.entry.js +14 -14
- package/dist/esm/components-section.entry.js +33 -24
- 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_36.entry.js → eds-accordion_37.entry.js} +661 -210
- package/dist/esm/eds-app-root.entry.js +1 -1
- package/dist/esm/eds-card-desc_2.entry.js +2 -2
- 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-cookies-preference.entry.js +1 -1
- package/dist/esm/eds-feedback.entry.js +1 -1
- package/dist/esm/eds-footer.entry.js +2 -2
- package/dist/esm/eds-frame.entry.js +1 -1
- package/dist/esm/eds-fullscreen-menu.entry.js +8 -3
- package/dist/esm/eds-gauge.entry.js +1 -1
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +1 -1
- package/dist/esm/eds-icon-arrow-right.entry.js +1 -1
- package/dist/esm/eds-icon-bin.entry.js +1 -1
- package/dist/esm/eds-icon-bluesky.entry.js +1 -1
- package/dist/esm/eds-icon-bookmark.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-down.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-left.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-right.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-up.entry.js +1 -1
- package/dist/esm/eds-icon-clone.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-download.entry.js +1 -1
- package/dist/esm/eds-icon-draft.entry.js +1 -1
- package/dist/esm/eds-icon-edit.entry.js +1 -1
- package/dist/esm/eds-icon-eu.entry.js +1 -1
- package/dist/esm/eds-icon-external.entry.js +1 -1
- package/dist/esm/eds-icon-facebook.entry.js +1 -1
- package/dist/esm/eds-icon-gitlab.entry.js +1 -1
- package/dist/esm/eds-icon-linkedin.entry.js +1 -1
- package/dist/esm/eds-icon-loader.entry.js +1 -1
- package/dist/esm/eds-icon-mastodon.entry.js +1 -1
- package/dist/esm/eds-icon-menu.entry.js +1 -1
- package/dist/esm/eds-icon-minus.entry.js +1 -1
- package/dist/esm/eds-icon-more.entry.js +1 -1
- package/dist/esm/eds-icon-paper.entry.js +1 -1
- package/dist/esm/eds-icon-plus.entry.js +1 -1
- package/dist/esm/eds-icon-portal.entry.js +1 -1
- package/dist/esm/eds-icon-private.entry.js +1 -1
- package/dist/esm/eds-icon-public.entry.js +1 -1
- package/dist/esm/eds-icon-search.entry.js +1 -1
- package/dist/esm/eds-icon-star.entry.js +1 -1
- package/dist/esm/eds-icon-start.entry.js +1 -1
- package/dist/esm/eds-icon-success.entry.js +1 -1
- package/dist/esm/eds-icon-thumbs-down.entry.js +1 -1
- package/dist/esm/eds-icon-thumbs-up.entry.js +1 -1
- package/dist/esm/eds-icon-tutorial.entry.js +1 -1
- package/dist/esm/eds-icon-twitter.entry.js +1 -1
- package/dist/esm/eds-icon-unknown.entry.js +1 -1
- package/dist/esm/eds-icon-updown.entry.js +2 -2
- package/dist/esm/eds-icon-user.entry.js +1 -1
- package/dist/esm/eds-icon-view.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/esm/eds-modal.entry.js +2 -2
- package/dist/esm/eds-progress-bar.entry.js +1 -1
- package/dist/esm/eds-section-core_2.entry.js +3 -3
- package/dist/esm/eds-social-networks.entry.js +1 -1
- package/dist/esm/eds-timeline.entry.js +1 -1
- package/dist/esm/eds-toast-manager.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-870ab08f.js +2 -2
- 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-variations-tabs.entry.js +1 -1
- package/dist/esm/logo-wrong-usage.entry.js +1 -1
- package/dist/esm/svg-repository.entry.js +3 -3
- 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/esm/{up-and-down-d747abee.js → up-and-down-8b69ca97.js} +2 -2
- package/dist/hydrate/index.js +827 -341
- package/dist/hydrate/index.mjs +827 -341
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/svgs/src/lib/svgs.d.ts +2 -2
- package/dist/types/components/eds-button/eds-button.d.ts +0 -1
- package/dist/types/components/eds-form/eds-form.d.ts +1 -0
- package/dist/types/components/eds-link/eds-link.d.ts +0 -1
- package/dist/types/components/eds-nps/eds-nps.d.ts +5 -3
- package/dist/types/components/eds-sidebar/eds-sidebar.d.ts +50 -0
- package/dist/types/components/eds-sidebar/eds-sidebar.stories.d.ts +98 -0
- package/dist/types/components/eds-steps/eds-steps.d.ts +18 -69
- package/dist/types/components/eds-steps/eds-steps.stories.d.ts +18 -0
- package/dist/types/components/eds-steps-v2/eds-steps-v2.d.ts +24 -52
- package/dist/types/components/eds-steps-v2/eds-steps-v2.stories.d.ts +8 -0
- package/dist/types/components/eds-table/eds-table.d.ts +8 -0
- package/dist/types/components.d.ts +143 -124
- package/package.json +1 -1
- package/dist/components/p-004801b2.entry.js +0 -1
- package/dist/components/p-02648f82.entry.js +0 -1
- package/dist/components/p-09f1b358.entry.js +0 -1
- package/dist/components/p-0ec9dcf5.entry.js +0 -1
- package/dist/components/p-0fb8511d.entry.js +0 -1
- package/dist/components/p-127870d7.entry.js +0 -1
- package/dist/components/p-12e153fb.entry.js +0 -1
- package/dist/components/p-1f80e708.entry.js +0 -1
- package/dist/components/p-21b5ca1f.entry.js +0 -1
- package/dist/components/p-2bfcb3cf.entry.js +0 -1
- package/dist/components/p-2efa0ba6.entry.js +0 -1
- package/dist/components/p-33a639b5.entry.js +0 -1
- package/dist/components/p-36b17bf2.entry.js +0 -1
- package/dist/components/p-3c478e74.entry.js +0 -1
- package/dist/components/p-447e436c.entry.js +0 -1
- package/dist/components/p-4995b8b2.entry.js +0 -1
- package/dist/components/p-53343ea1.entry.js +0 -1
- package/dist/components/p-56447243.entry.js +0 -1
- package/dist/components/p-56cc4a15.entry.js +0 -1
- package/dist/components/p-5ddcec77.entry.js +0 -1
- package/dist/components/p-5e8142ed.entry.js +0 -1
- package/dist/components/p-70f5e9f5.entry.js +0 -1
- package/dist/components/p-714445de.entry.js +0 -1
- package/dist/components/p-7436a99a.entry.js +0 -1
- package/dist/components/p-772d6ca9.entry.js +0 -1
- package/dist/components/p-79044ab6.entry.js +0 -1
- package/dist/components/p-7c7aaa95.entry.js +0 -1
- package/dist/components/p-81ba0feb.entry.js +0 -1
- package/dist/components/p-82b357f7.entry.js +0 -1
- package/dist/components/p-84239973.entry.js +0 -1
- package/dist/components/p-85dfbfd3.entry.js +0 -1
- package/dist/components/p-a155c283.entry.js +0 -1
- package/dist/components/p-a4080044.entry.js +0 -1
- package/dist/components/p-abd40167.entry.js +0 -1
- package/dist/components/p-ae41414e.entry.js +0 -1
- package/dist/components/p-afb55d52.entry.js +0 -1
- package/dist/components/p-b4c2c58d.entry.js +0 -9
- package/dist/components/p-b6fc1a7d.entry.js +0 -1
- package/dist/components/p-b8a36d0f.entry.js +0 -1
- package/dist/components/p-bb4633ec.entry.js +0 -1
- package/dist/components/p-bc59e5ff.entry.js +0 -1
- package/dist/components/p-cdabb63e.entry.js +0 -1
- package/dist/components/p-d3fa440f.entry.js +0 -1
- package/dist/components/p-dacd8c26.entry.js +0 -1
- package/dist/components/p-ddec1f12.entry.js +0 -1
- package/dist/components/p-e6819f4d.entry.js +0 -1
- package/dist/components/p-e8d0a2db.entry.js +0 -1
- package/dist/components/p-eaf5d057.entry.js +0 -1
- package/dist/components/p-eb57d477.entry.js +0 -1
- package/dist/components/p-efdc6fd7.entry.js +0 -1
- package/dist/components/p-f013c0ac.entry.js +0 -1
- package/dist/components/p-f1ead3b3.entry.js +0 -1
- /package/dist/components/{p-1b2913c8.js → p-553ca350.js} +0 -0
|
@@ -79,10 +79,10 @@ const EdsAccordion = class {
|
|
|
79
79
|
* Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
|
|
80
80
|
*/
|
|
81
81
|
render() {
|
|
82
|
-
return (index.h("div", { key: '
|
|
82
|
+
return (index.h("div", { key: '095474500f7c60f20e4d737188001d2f3084dbcc', ref: (el) => (this.wrapperRef = el), class: `flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
|
|
83
83
|
${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
|
|
84
84
|
${this.switchBg ? 'hover:bg-inverse' : ''}
|
|
85
|
-
${this.description ? 'min-h-56' : ''}` }, index.h("h3", { key: '
|
|
85
|
+
${this.description ? 'min-h-56' : ''}` }, index.h("h3", { key: 'f090fbe3632df8302046f1178e82b8affc4cc821', ref: (el) => (this.headerRef = el), class: "mr-auto f-heading-06 text-left absolute inset-x-16 break-words top-16 pr-40" }, this.heading), index.h("div", { key: '0a30ab8c27cadbb342fc57f6393111c84f10a664', class: "ml-auto" }, index.h("eds-button", { key: '01f4658df8181b63b71a2e0d2a67e8f8b58efbb7', id: "toggleAccordion", intent: this.buttonIntent, "aria-expanded": this.isExpanded || this.shortContent, "aria-label": "Toggle accordion", "aria-controls": "accordionSection", class: `effect-color flex w-full items-center justify-between rounded-md`, onClick: this.handleClick, icon: "chevron-down" })), index.h("div", { key: '9f3b5a0e425c2dffe3b6fe40fa33b020d64256d8', class: `w-full`, style: Number.isFinite(this.headerHeight) ? { marginTop: `${this.headerHeight}px` } : {} }, this.description ? (index.h("span", { class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}` }, this.description)) : null, index.h("section", { key: '414735d7d982de76d8a1b8db24aa9a569eba37c7', id: "accordionSection", "aria-labelledby": "accordionHeader", "aria-hidden": !this.isExpanded, class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded ? 'overflow-hidden' : ''}`, style: { height: this.isExpanded ? 'auto' : '0' } }, index.h("div", { key: '11097a0646b18f728af494c14aa4cc0e5335defe', ref: (el) => (this.childContentRef = el), class: `accordion-content effect-color pt-4`, "aria-hidden": !this.isExpanded }, index.h("span", { key: '88414c40490aa77166d23868f16556b9356279a7', class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}` }, index.h("slot", { key: '8070a7676ca8fba065f813852a2e0cf4146f3374' })))))));
|
|
86
86
|
}
|
|
87
87
|
get el() { return index.getElement(this); }
|
|
88
88
|
};
|
|
@@ -183,12 +183,12 @@ const EdsAlert = class {
|
|
|
183
183
|
}
|
|
184
184
|
render() {
|
|
185
185
|
const ariaLabel = this.intent !== 'default' ? `${this.intent} alert` : 'alert';
|
|
186
|
-
return (index.h("div", { key: '
|
|
186
|
+
return (index.h("div", { key: 'd8f0a45ddbaf3d3eb284751e33ddfdce2e13b67a', class: alertStyles({
|
|
187
187
|
intent: this.intent,
|
|
188
188
|
brd: this.brd,
|
|
189
189
|
direction: this.direction,
|
|
190
190
|
withBtn: this.withBtn
|
|
191
|
-
}), role: "alert", "aria-label": ariaLabel, "aria-live": this.intent === 'error' ? 'assertive' : 'polite', "aria-labelledby": "alert-message", "aria-describedby": this.withBtn ? 'alert-action' : undefined }, index.h("p", { key: '
|
|
191
|
+
}), role: "alert", "aria-label": ariaLabel, "aria-live": this.intent === 'error' ? 'assertive' : 'polite', "aria-labelledby": "alert-message", "aria-describedby": this.withBtn ? 'alert-action' : undefined }, index.h("p", { key: '179862c141a2ce05fa9f8562be7e64196baa3922', id: "alert-message", class: "f-ui-01 py-8", innerHTML: this.message }), this.withBtn && (index.h("div", { key: '3677358bd563a3e2ee1b74309dc4fb6c84ac475f', id: "alert-action" }, this.pressableUrl ? (index.h("eds-link", { class: "eds-alert-link", label: this.pressableLabel, url: this.pressableUrl, intent: "secondary", external: true })) : (index.h("eds-button", { class: "eds-alert-button", label: this.pressableLabel, intent: "secondary", onClick: () => this.handleAction() }))))));
|
|
192
192
|
}
|
|
193
193
|
get el() { return index.getElement(this); }
|
|
194
194
|
};
|
|
@@ -251,7 +251,7 @@ const EdsAvatar = class {
|
|
|
251
251
|
* @returns {JSX.Element} The rendered avatar component.
|
|
252
252
|
*/
|
|
253
253
|
render() {
|
|
254
|
-
return (index.h("div", { key: '
|
|
254
|
+
return (index.h("div", { key: '7b5bf31c794c9bbddd2976fdd5a273842a75603a', class: this.containerClasses }, this.picture ? (index.h("eds-img", { src: this.picture, width: 54, height: 54, sizes: "120px", alt: `${this.firstName} ${this.lastName}`, lazyload: true, withBg: true })) : (index.h("abbr", { title: this.computedInitials || `${this.firstName} ${this.lastName}`, class: "!no-underline f-ui-01" }, this.computedInitials))));
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
257
|
EdsAvatar.style = EdsAvatarStyle0;
|
|
@@ -265,7 +265,7 @@ const EdsBlockBreak = class {
|
|
|
265
265
|
this.inverse = false;
|
|
266
266
|
}
|
|
267
267
|
render() {
|
|
268
|
-
return index.h("hr", { key: '
|
|
268
|
+
return index.h("hr", { key: 'dd9b98d66f195135ff2fb1374a56d4c670e43d3e', class: `${this.inverse ? 'border-default' : 'border-softer'} my-16 inline-block w-full border-t-2` });
|
|
269
269
|
}
|
|
270
270
|
};
|
|
271
271
|
EdsBlockBreak.style = EdsBlockBreakStyle0;
|
|
@@ -385,7 +385,7 @@ const EdsBreadcrumb = class {
|
|
|
385
385
|
*/
|
|
386
386
|
render() {
|
|
387
387
|
const itemsToRender = this.getTruncatedItems();
|
|
388
|
-
return (index.h("nav", { key: '
|
|
388
|
+
return (index.h("nav", { key: '4894fb9e6b37ef84880a62f4dcd3289dcb9cab38', "aria-label": "Breadcrumb" }, index.h("ol", { key: 'd69405fcee024465d645d9cdbb17189998a94b95', class: "flex items-center space-x-2" }, itemsToRender.map((item, index$1) => {
|
|
389
389
|
const isLast = index$1 === itemsToRender.length - 1;
|
|
390
390
|
return (index.h("li", { class: "flex items-center" }, !item.isHidden ? ((() => {
|
|
391
391
|
const { fullLabel } = this.getLabels(item, isLast);
|
|
@@ -524,7 +524,6 @@ const EdsButton = class {
|
|
|
524
524
|
this.size = 'small';
|
|
525
525
|
this.iconPos = 'right';
|
|
526
526
|
this.iconSmall = false;
|
|
527
|
-
this.extraClass = undefined;
|
|
528
527
|
this.triggerClick = undefined;
|
|
529
528
|
}
|
|
530
529
|
handleParentContext(event) {
|
|
@@ -575,7 +574,7 @@ const EdsButton = class {
|
|
|
575
574
|
});
|
|
576
575
|
const ElementType = this.elementType;
|
|
577
576
|
const isInteractive = !this.disabled && !this.loading;
|
|
578
|
-
return (index.h(index.Host, { key: '
|
|
577
|
+
return (index.h(index.Host, { key: '25a7b4ffda3df65e91c77a18becd45bc40973f3c' }, index.h(ElementType, { key: '0f00d82a37f3189b862015eb2d915f2364b6d75d', tabindex: isInteractive ? '0' : '-1', "aria-label": this.label ? undefined : this.ariaLabel, "aria-disabled": this.disabled || this.loading ? 'true' : undefined, "aria-busy": this.loading ? 'true' : undefined, disabled: this.elementType === 'button' ? this.disabled || this.loading : undefined, role: this.elementType === 'a' ? 'button' : undefined, class: `${classes || ''}`, onClick: (event) => this.handleClick(event), onKeyDown: (event) => this.handleKeyDown(event) }, this.label && (index.h("span", { key: '6e45dfefb4805eef0574f7462becca6cde85dbc0', class: this.loading ? 'opacity-0' : '', "aria-hidden": this.loading ? 'true' : undefined }, this.label)), this.loading && (index.h("span", { key: '9909c70db39a039b883854caff816d25f132b866', class: "absolute inset-0 flex items-center justify-center", "aria-hidden": "true" }, index.h("span", { key: '367cd65a13f81cbcb12d93855dc091a4309566bb', class: "loader", style: {
|
|
579
578
|
border: `3px solid ${this.intent === 'secondary' ? 'rgba(255, 255, 255, .3)' : 'rgba(0, 0, 0, .3)'}`,
|
|
580
579
|
borderBottomColor: this.intent === 'secondary' ? '#fff' : '#000'
|
|
581
580
|
} }))), this.icon ? (index.h("eds-icon-wrapper", { class: `
|
|
@@ -3064,7 +3063,7 @@ const EdsCodeBlock = class {
|
|
|
3064
3063
|
return this.code; // Fallback if language is not provided or unsupported
|
|
3065
3064
|
}
|
|
3066
3065
|
render() {
|
|
3067
|
-
return (index.h("div", { key: '
|
|
3066
|
+
return (index.h("div", { key: 'bc74b6be37bcb24700d17b48b5398077e485abd7', class: "relative bg-stronger rounded-sm" }, index.h("div", { key: 'db0395bfd55eb3394ab2149c5c436f2a54e8afb0', class: "text-inverse flex justify-between items-center p-8" }, this.language ? (index.h("span", { class: "f-ui-03" }, this.language.toUpperCase())) : (index.h("pre", { class: "bg-stronger pl-8", role: "region", "aria-label": "Code block without language" }, index.h("code", { innerHTML: this.getHighlightedCode() }))), index.h("span", { key: '628ad41f15f3a38abe4b7c382074c8f5a8679a8c', "aria-hidden": "true", class: "w-20 h-20 mt-8" }, index.h("eds-icon-wrapper", { key: '1c95d57a5d8113d6ab7ebf7da713e058c7cc10f1', icon: this.copied ? 'success' : 'copy', onClick: () => this.copyToClipboard() })), index.h("span", { key: 'a64b2450b631835b6fc2c15047b09ceea5a9fc95', class: "sr-only" }, "Copy Code")), this.language && (index.h("pre", { key: '51945cbee1504625b54362505b60f1bd1784bdda', class: `language-${this.language} bg-stronger pl-8 pb-8`, role: "region", "aria-label": `Code block in ${this.language}` }, index.h("code", { key: '55961aa8278177451e13c929ec7f7065afcac93b', innerHTML: this.getHighlightedCode() })))));
|
|
3068
3067
|
}
|
|
3069
3068
|
get el() { return index.getElement(this); }
|
|
3070
3069
|
};
|
|
@@ -3218,14 +3217,14 @@ const EdsDropdown = class {
|
|
|
3218
3217
|
* @returns {JSX.Element} The rendered dropdown component.
|
|
3219
3218
|
*/
|
|
3220
3219
|
render() {
|
|
3221
|
-
return (index.h("div", { key: '
|
|
3220
|
+
return (index.h("div", { key: 'ffc4915b2104e3d2dd347900acd897f56910a674', class: "z-focus relative", ref: (el) => (this.dropdownContent = el) }, index.h("eds-button", { key: 'ba48bdd7b75fd230bdc2dd564bd477f0349f5426', label: this.label, "aria-label": this.ariaLabel, icon: this.icon, intent: this.intent, onClick: this.handleClick, "aria-expanded": this.isOpen.toString(), "aria-haspopup": "menu" }), index.h("nav", { key: 'a29b57598a2ed8fcc9593c928df9443fd4449481', ref: (el) => (this.panelEl = el), role: "menu", class: {
|
|
3222
3221
|
'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,
|
|
3223
3222
|
'left-4': this.dropdownPos === 'left' && this.dropdownOffset,
|
|
3224
3223
|
'left-0': this.dropdownPos === 'left' && !this.dropdownOffset,
|
|
3225
3224
|
'right-4': this.dropdownPos === 'right' && this.dropdownOffset,
|
|
3226
3225
|
'right-0': this.dropdownPos === 'right' && !this.dropdownOffset,
|
|
3227
3226
|
'rounded-lg': this.rounded
|
|
3228
|
-
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, index.h("slot", { key: '
|
|
3227
|
+
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, index.h("slot", { key: 'ddf003345ef5181b968b4bfd8962805d09d15e89' }))));
|
|
3229
3228
|
}
|
|
3230
3229
|
get host() { return index.getElement(this); }
|
|
3231
3230
|
};
|
|
@@ -3509,17 +3508,41 @@ const EdsForm = class {
|
|
|
3509
3508
|
}
|
|
3510
3509
|
const actual = this.values[field.condition.field];
|
|
3511
3510
|
const expected = field.condition.value;
|
|
3512
|
-
// Handle
|
|
3513
|
-
|
|
3511
|
+
// Handle undefined/null/empty
|
|
3512
|
+
if (actual == null) {
|
|
3513
|
+
return expected == null || expected === '';
|
|
3514
|
+
}
|
|
3515
|
+
// Handle arrays (multi-select, checkboxes)
|
|
3516
|
+
if (Array.isArray(actual)) {
|
|
3517
|
+
return actual.some((val) => this.normalizeValue(val) === this.normalizeValue(expected));
|
|
3518
|
+
}
|
|
3519
|
+
// Handle comma-separated strings (from checkboxes stored as "val1,val2")
|
|
3520
|
+
if (typeof actual === 'string' && actual.includes(',')) {
|
|
3521
|
+
const values = actual.split(',').map((v) => v.trim());
|
|
3522
|
+
return values.some((val) => this.normalizeValue(val) === this.normalizeValue(expected));
|
|
3523
|
+
}
|
|
3524
|
+
// Standard comparison with normalization
|
|
3525
|
+
return this.normalizeValue(actual) === this.normalizeValue(expected);
|
|
3526
|
+
}
|
|
3527
|
+
normalizeValue(value) {
|
|
3528
|
+
if (value == null) {
|
|
3529
|
+
return '';
|
|
3530
|
+
}
|
|
3531
|
+
if (typeof value === 'boolean') {
|
|
3532
|
+
return value ? 'true' : 'false';
|
|
3533
|
+
}
|
|
3534
|
+
if (typeof value === 'number') {
|
|
3535
|
+
return String(value);
|
|
3536
|
+
}
|
|
3537
|
+
if (typeof value === 'string') {
|
|
3538
|
+
return value.trim().toLowerCase();
|
|
3539
|
+
}
|
|
3540
|
+
return String(value).trim().toLowerCase();
|
|
3514
3541
|
}
|
|
3515
3542
|
validateForm() {
|
|
3516
|
-
const { errors, hasError } = validateFormFields(this.parsedFields, this.formEl, this.values, (field,
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
}
|
|
3520
|
-
const parentValue = values[field.condition.field];
|
|
3521
|
-
return parentValue === field.condition.value;
|
|
3522
|
-
});
|
|
3543
|
+
const { errors, hasError } = validateFormFields(this.parsedFields, this.formEl, this.values, (field, _values) =>
|
|
3544
|
+
// Use a temporary object with the condition to reuse isFieldVisible logic
|
|
3545
|
+
this.isFieldVisible(field));
|
|
3523
3546
|
this.errors = errors;
|
|
3524
3547
|
this.hasError = hasError;
|
|
3525
3548
|
}
|
|
@@ -3533,8 +3556,22 @@ const EdsForm = class {
|
|
|
3533
3556
|
if (!field.condition) {
|
|
3534
3557
|
return true;
|
|
3535
3558
|
}
|
|
3536
|
-
const
|
|
3537
|
-
|
|
3559
|
+
const actual = values[field.condition.field];
|
|
3560
|
+
const expected = field.condition.value;
|
|
3561
|
+
// Handle undefined/null/empty
|
|
3562
|
+
if (actual == null) {
|
|
3563
|
+
return expected == null || expected === '';
|
|
3564
|
+
}
|
|
3565
|
+
// Handle arrays
|
|
3566
|
+
if (Array.isArray(actual)) {
|
|
3567
|
+
return actual.some((val) => this.normalizeValue(val) === this.normalizeValue(expected));
|
|
3568
|
+
}
|
|
3569
|
+
// Handle comma-separated strings
|
|
3570
|
+
if (typeof actual === 'string' && actual.includes(',')) {
|
|
3571
|
+
const values = actual.split(',').map((v) => v.trim());
|
|
3572
|
+
return values.some((val) => this.normalizeValue(val) === this.normalizeValue(expected));
|
|
3573
|
+
}
|
|
3574
|
+
return this.normalizeValue(actual) === this.normalizeValue(expected);
|
|
3538
3575
|
}
|
|
3539
3576
|
});
|
|
3540
3577
|
this.values = updatedValues;
|
|
@@ -3601,8 +3638,9 @@ const EdsForm = class {
|
|
|
3601
3638
|
const hosts = Array.from(this.formEl.querySelectorAll('eds-input-field'));
|
|
3602
3639
|
hosts.forEach((host) => {
|
|
3603
3640
|
const root = host.shadowRoot;
|
|
3604
|
-
if (!root)
|
|
3641
|
+
if (!root) {
|
|
3605
3642
|
return;
|
|
3643
|
+
}
|
|
3606
3644
|
const fileInputs = Array.from(root.querySelectorAll('input[type="file"][name]'));
|
|
3607
3645
|
console.log(fileInputs);
|
|
3608
3646
|
fileInputs.forEach((fi) => {
|
|
@@ -3737,8 +3775,9 @@ const EdsForm = class {
|
|
|
3737
3775
|
handleSubmit(e) {
|
|
3738
3776
|
var _a, _b;
|
|
3739
3777
|
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
3740
|
-
if (this.isSubmitting)
|
|
3778
|
+
if (this.isSubmitting) {
|
|
3741
3779
|
return;
|
|
3780
|
+
}
|
|
3742
3781
|
this.isSubmitting = true;
|
|
3743
3782
|
this.validateForm();
|
|
3744
3783
|
if (this.hasError) {
|
|
@@ -3820,7 +3859,7 @@ const EdsForm = class {
|
|
|
3820
3859
|
else if (field.type === 'nps') {
|
|
3821
3860
|
return (index.h("div", { class: "form-group nps-field", key: field.name }, index.h("div", { class: "flex justify-between" }, field && (index.h("eds-input-label", { name: `nps-${field.name}`, label: field.question, disabled: field.disabled, required: field.required }))), index.h("eds-nps", { id: `nps-${field.name}`, "right-label": field.rightLabel, "left-label": field.leftLabel, onNps: (e) => this.handleNPS(e, field) }), index.h("div", { class: "mt-6" }, index.h("eds-input-footer", { id: `${field.name}-footer`, name: field.name, "error-message": (_b = this.errors[field.name]) === null || _b === void 0 ? void 0 : _b.join('<br/>'), error: !!this.errors[field.name] }))));
|
|
3822
3861
|
}
|
|
3823
|
-
return (index.h("eds-input-field", { key: field.name, name: field.name, label: field.label, placeholder: field.placeholder, type: field.type, value: this.values[field.name], required: field.required, hint: field.hint, message: field.message, error: !!this.errors[field.name], errorMessage: (_c = this.errors[field.name]) === null || _c === void 0 ? void 0 : _c.join('<br/>'), options: field.options, onInput: (e) => this.handleInput(e, field), onChangeNative: (e) => this.handleChange(e, field) }));
|
|
3862
|
+
return (index.h("eds-input-field", { key: field.name, name: field.name, label: field.label, placeholder: field.placeholder, type: field.type, value: this.values[field.name], required: field.required, hint: field.hint, message: field.message, link: field.link, error: !!this.errors[field.name], errorMessage: (_c = this.errors[field.name]) === null || _c === void 0 ? void 0 : _c.join('<br/>'), options: field.options, onInput: (e) => this.handleInput(e, field), onChangeNative: (e) => this.handleChange(e, field) }));
|
|
3824
3863
|
}
|
|
3825
3864
|
async getData() {
|
|
3826
3865
|
return this.makeFormData();
|
|
@@ -3833,9 +3872,9 @@ const EdsForm = class {
|
|
|
3833
3872
|
const styleClasses = this.formStyle === 'shadow'
|
|
3834
3873
|
? 'bg-inverse effect-shadow shadow-hover border-softer relative rounded-lg border-2 p-32'
|
|
3835
3874
|
: '';
|
|
3836
|
-
return (index.h("form", { key: '
|
|
3875
|
+
return (index.h("form", { key: '8a722f99ea8ad7b063805b3377180d73b16d96e1', class: styleClasses, ref: (el) => (this.formEl = el), autocomplete: "on", onSubmit: this.handleSubmit }, index.h("div", { key: '6a091913152adad7df2f8581a62d2146d9ea2f1d', class: "flex flex-col gap-y-24" }, this.title && (index.h("span", { key: '11dc49375a4eef1dfd4994a6ba2b2876262f9f55', role: "heading", class: "f-heading-04" }, this.title)), this.description && index.h("span", { key: 'dfa8bfa745828e8a57a4909dcbfd9f48497205c0', class: "f-body-02 text-light" }, this.description), index.h("slot", { key: 'db2c00b99038a6feddbe057de16b1002bbf14f03' })), hiddenFields.map((field, index$1) => (index.h("eds-input", { key: index$1, type: "hidden", name: field.name, value: field.value }))), this.parsedGroups
|
|
3837
3876
|
.filter((g) => Array.isArray(buckets[g.id]) && buckets[g.id].length > 0)
|
|
3838
|
-
.map((g) => (index.h("div", { class: "mt-32", key: g.id }, index.h("span", { class: "f-body-02" }, index.h("b", null, g.title)), index.h("div", { class: "border-group mt-32 mb-32 flex flex-col gap-y-24" }, buckets[g.id].map((f) => this.renderField(f)))))), index.h("div", { key: '
|
|
3877
|
+
.map((g) => (index.h("div", { class: "mt-32", key: g.id }, index.h("span", { class: "f-body-02" }, index.h("b", null, g.title)), index.h("div", { class: "border-group mt-32 mb-32 flex flex-col gap-y-24" }, buckets[g.id].map((f) => this.renderField(f)))))), index.h("div", { key: 'ed2cbf6dada2bf43c8846f5f2af8f3f0767a5b1c', class: "flex flex-col mt-32 gap-y-24" }, buckets['__ungrouped'].map((f) => this.renderField(f))), this.formBtn && (index.h("div", { key: '1cc4b51279214181f1894a573227cda0cbf385ee', class: "mt-32" }, index.h("eds-button", { key: '2a004027664d1433cf625c48f3447960de9c5c84', intent: this.buttonIntent, label: this.formBtnLabel, disabled: this.isSubmitting, loading: this.isSubmitting, onClick: () => this.handleSubmit() })))));
|
|
3839
3878
|
}
|
|
3840
3879
|
get el() { return index.getElement(this); }
|
|
3841
3880
|
static get watchers() { return {
|
|
@@ -3870,9 +3909,8 @@ const EdsGlobalSearch = class {
|
|
|
3870
3909
|
category: 'shared-ui',
|
|
3871
3910
|
parentContext: null,
|
|
3872
3911
|
tag: this.el.tagName.toLowerCase(),
|
|
3873
|
-
name: `search-input: ${(_a = this.query) === null || _a === void 0 ? void 0 : _a.toLowerCase()}` ||
|
|
3874
|
-
|
|
3875
|
-
action: 'click',
|
|
3912
|
+
name: `search-input: ${(_a = this.query) === null || _a === void 0 ? void 0 : _a.toLowerCase()}` || 'unknow seach input query',
|
|
3913
|
+
action: 'click'
|
|
3876
3914
|
});
|
|
3877
3915
|
this.debounceTimer = window.setTimeout(() => {
|
|
3878
3916
|
this.runSearch();
|
|
@@ -3928,8 +3966,7 @@ const EdsGlobalSearch = class {
|
|
|
3928
3966
|
break;
|
|
3929
3967
|
case 'Enter':
|
|
3930
3968
|
event.preventDefault();
|
|
3931
|
-
if (this.selectedIndex >= 0 &&
|
|
3932
|
-
this.selectedIndex < this.results.length) {
|
|
3969
|
+
if (this.selectedIndex >= 0 && this.selectedIndex < this.results.length) {
|
|
3933
3970
|
this.selectResult(this.results[this.selectedIndex]);
|
|
3934
3971
|
}
|
|
3935
3972
|
break;
|
|
@@ -3963,7 +4000,7 @@ const EdsGlobalSearch = class {
|
|
|
3963
4000
|
this.selectedIndex = -1;
|
|
3964
4001
|
}
|
|
3965
4002
|
catch (err) {
|
|
3966
|
-
console.error('Search error:', err);
|
|
4003
|
+
//console.error('Search error:', err);
|
|
3967
4004
|
this.error = 'Search failed. Please try again.';
|
|
3968
4005
|
this.results = [];
|
|
3969
4006
|
this.showDropdown = true;
|
|
@@ -3980,7 +4017,7 @@ const EdsGlobalSearch = class {
|
|
|
3980
4017
|
parentContext: null,
|
|
3981
4018
|
tag: this.el.tagName.toLowerCase(),
|
|
3982
4019
|
name: `search-select: ${result.url}` || 'unknow search result selection',
|
|
3983
|
-
action: 'click'
|
|
4020
|
+
action: 'click'
|
|
3984
4021
|
});
|
|
3985
4022
|
window.open(result.url, '_blank', 'noopener,noreferrer');
|
|
3986
4023
|
}
|
|
@@ -4001,19 +4038,19 @@ const EdsGlobalSearch = class {
|
|
|
4001
4038
|
return this.results.length > 0;
|
|
4002
4039
|
}
|
|
4003
4040
|
get showEmpty() {
|
|
4004
|
-
return
|
|
4041
|
+
return this.hasSearched && !this.loading && !this.hasResults && this.query.trim();
|
|
4005
4042
|
}
|
|
4006
4043
|
render() {
|
|
4007
|
-
return (index.h("div", { key: '
|
|
4044
|
+
return (index.h("div", { key: '03beb0a36e20ff5e0c1213584361c9b85ef52684', class: "search-wrapper" }, index.h("eds-input-field", { key: 'cefbfcc4c32067fc57f4425fde7e646b2ca36bc6', icon: "search", "input-id": "search-global", type: "text", name: "search-box-global", placeholder: this.placeholder, value: this.query, onInput: this.handleInput }), this.showDropdown && (index.h("div", { key: '60a8f38d2eb06335f97f232a7e810f22ccf379b3', class: "search-dropdown", ref: (el) => (this.dropdownRef = el) }, this.loading && (index.h("div", { key: '2e8dcab16d8fef0f0ec07bcb78fd568f91156095', class: "flex text-center justify-center p-64" }, index.h("eds-spinner", { key: 'f512b3508fe5ba35a762346f43fa780a9b0c5c11', variant: "primary", size: "sm" }))), this.error && !this.loading && (index.h("div", { key: '549a6ec4f84c10d5bb4449cb7aa9a4dc61a4ff05', class: "flex text-center justify-center p-16" }, index.h("span", { key: '2de6645b976ed3d7958867447c090639b3b613a6', class: "text-error f-body-02" }, this.error))), this.showEmpty && (index.h("div", { key: '1006b88e3508a51898f305e1a221762f9cbc0204', class: "dropdown-state" }, index.h("eds-icon-wrapper", { key: 'bc635e10a72aaf715747f8c512ebc3d18d0657c5', icon: "search" }), index.h("div", { key: 'd267ee5c228ae85031088faf7b44b99bacbb77f4' }, index.h("p", { key: '526094eab25fcb55d5e5a1529c165a39e80db386', class: "f-body-02" }, "No results found"), index.h("p", { key: '770ff6f735b09068bcb26eec2552c6e7081348ba', class: "f-ui-04 text-lightest" }, "Try different keywords")))), this.hasResults && !this.loading && (index.h("ul", { key: '75597ab0dc1c11854e366294a12a9bd448f53877', class: "dropdown-results" }, this.results.map((result, index$1) => (index.h("li", { key: result.id, "data-index": index$1, class: {
|
|
4008
4045
|
'result-item': true,
|
|
4009
|
-
'result-item--selected': index$1 === this.selectedIndex
|
|
4010
|
-
}, onClick: () => this.selectResult(result), onMouseEnter: () => (this.selectedIndex = index$1) }, index.h("div", { class: "result-header" }, index.h("span", { class: "f-body-02" }, result.title)), index.h("div", { class: "inline" }, index.h("eds-tag", { intent: "accent", label: result.source }), result.section &&
|
|
4046
|
+
'result-item--selected': index$1 === this.selectedIndex
|
|
4047
|
+
}, onClick: () => this.selectResult(result), onMouseEnter: () => (this.selectedIndex = index$1) }, index.h("div", { class: "result-header" }, index.h("span", { class: "f-body-02" }, result.title)), index.h("div", { class: "inline" }, index.h("eds-tag", { intent: "accent", label: result.source }), result.section && index.h("span", { class: "result-badge" }, result.section), index.h("span", { class: "f-ui-03-light text-lighter ml-8" }, result.url)), result.snippet && index.h("p", { class: "result-snippet" }, this.stripHtml(result.snippet))))))), this.hasResults && !this.loading && (index.h("div", { key: '4af4caf6e6856feaeb91218aa249950ac835e5d8', class: "dropdown-footer" }, index.h("span", { key: '4634ee9a9a15674cae0eee784b7ee408c7707874', class: "footer-hint" }, index.h("kbd", { key: 'ea0dd3cbb169f0db034fa3ee9019592d943398f6' }, "\u2191"), " ", index.h("kbd", { key: 'f1fc8937f965f695b402a78c82661e0ddee8126d' }, "\u2193"), " navigate \u2022 ", index.h("kbd", { key: '1d7de6abe02b46362c0e7d1998aaa9b78d1c1378' }, "\u21B5"), " select \u2022 ", index.h("kbd", { key: '50d7d6ab8176e654529fa7e977dc67eadff84c3d' }, "esc"), " close")))))));
|
|
4011
4048
|
}
|
|
4012
4049
|
get el() { return index.getElement(this); }
|
|
4013
4050
|
};
|
|
4014
4051
|
EdsGlobalSearch.style = EdsGlobalSearchStyle0;
|
|
4015
4052
|
|
|
4016
|
-
const edsHeaderCss = ".block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.z-10{z-index:10}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.bg-strongest{background-color:var(--black)}.mr-auto{margin-right:auto}.w-\\[200px\\]{width:200px}.h-\\[85px\\]{height:85px}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hidden{display:none}.gap-x-2{-moz-column-gap:0.125rem;column-gap:0.125rem}.after\\:effect-opacity::after{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.whitespace-nowrap{white-space:nowrap}.\\!text-current{color:currentColor !important}.overflow-hidden{overflow:hidden}.after\\:\\!border-transparent::after{border-color:var(--transparent) !important}.hover\\:after\\:\\!border-transparent:hover::after{border-color:var(--transparent) !important}.after\\:opacity-0::after{opacity:0}.hover\\:after\\:opacity-100:hover::after{opacity:1}.px-16{padding-left:1rem;padding-right:1rem}@media (min-width: 750px){.md\\:flex{display:flex}.md\\:hidden{display:none}}";
|
|
4053
|
+
const edsHeaderCss = ".block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.z-10{z-index:10}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.bg-strongest{background-color:var(--black)}.mr-auto{margin-right:auto}.w-\\[200px\\]{width:200px}.h-\\[85px\\]{height:85px}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hidden{display:none}.gap-x-2{-moz-column-gap:0.125rem;column-gap:0.125rem}.gap-x-16{-moz-column-gap:1rem;column-gap:1rem}.after\\:effect-opacity::after{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.whitespace-nowrap{white-space:nowrap}.\\!text-current{color:currentColor !important}.overflow-hidden{overflow:hidden}.after\\:\\!border-transparent::after{border-color:var(--transparent) !important}.hover\\:after\\:\\!border-transparent:hover::after{border-color:var(--transparent) !important}.after\\:opacity-0::after{opacity:0}.hover\\:after\\:opacity-100:hover::after{opacity:1}.px-16{padding-left:1rem;padding-right:1rem}@media (min-width: 750px){.md\\:flex{display:flex}.md\\:hidden{display:none}}";
|
|
4017
4054
|
const EdsHeaderStyle0 = edsHeaderCss;
|
|
4018
4055
|
|
|
4019
4056
|
const EdsHeader = class {
|
|
@@ -4057,7 +4094,7 @@ const EdsHeader = class {
|
|
|
4057
4094
|
const classes = variantClasses[this.headerVariant] || variantClasses.default;
|
|
4058
4095
|
// Logo color variant: default and inverse use 'color', strong uses 'color-white'
|
|
4059
4096
|
const logoType = this.headerVariant === 'strong' ? 'color-white' : 'color';
|
|
4060
|
-
return (index.h("header", { key: '
|
|
4097
|
+
return (index.h("header", { key: 'ebfd125d1e27d224e5702f0c7a4b8f46e279f3b7', role: "banner", class: `flex items-center justify-between relative z-10 ${classes}` }, index.h("div", { key: '64be678f68c5d5590e0a976f46a1939320d5d9c2', class: "mr-auto w-[200px] h-[85px]" }, index.h("eds-logo", { key: 'a94192d8df3fb22d629d29d58d681e2a2eb0506d', type: logoType, href: this.homeUrl })), this.parsedLinks && (index.h("nav", { key: 'd7f1055e683b90d91c977ae9fef52a00f90b63a0', role: "navigation", "aria-label": "Primary", class: "absolute left-1/2 top-1/2 grow -translate-x-1/2 -translate-y-1/2 justify-center hidden md:flex" }, index.h("ul", { key: 'a15b4d203bacbe7f58490b8d34dd57dc31d4f573', class: "flex gap-x-16" }, this.parsedLinks.map((link) => (index.h("eds-link", { label: link.label, "aria-label": link.label, url: link.url, intent: "strong", size: "large", icon: link.icon, external: link.external, "extra-class": "after:effect-opacity aria-current-page:bg-darker whitespace-nowrap !text-current after:!border-transparent after:opacity-0 hover:after:!border-transparent hover:after:opacity-100" })))))), index.h("slot", { key: '2d83f5093b34bdc40f574f8d5676e046029c6e5d', name: "actions" }), this.menuEnabled && (index.h("div", { key: 'd2ad33f5ea9e55a5efb1f4dd598be5d61f1d9ab6', class: "md:hidden flex overflow-hidden px-16" }, index.h("eds-button", { key: 'da824afdcaa6ce68d837096bff6bdfadec4af17c', "aria-label": "Menu", intent: this.headerVariant === 'default' ? 'ghost' : 'ghostInverse', icon: "menu", size: "small", onClick: () => this.handleToggleMenu() })))));
|
|
4061
4098
|
}
|
|
4062
4099
|
get hostEl() { return index.getElement(this); }
|
|
4063
4100
|
};
|
|
@@ -4139,10 +4176,10 @@ const EdsImg = class {
|
|
|
4139
4176
|
imgOpts['loading'] = 'lazy';
|
|
4140
4177
|
imgOpts['decoding'] = 'async';
|
|
4141
4178
|
}
|
|
4142
|
-
return (index.h("div", { key: '
|
|
4179
|
+
return (index.h("div", { key: '20e754d7535484aedde364592c7a08a68e760b7d', class: {
|
|
4143
4180
|
'items-center justify-center': true,
|
|
4144
4181
|
'effect-bg-pattern': this.lazyload && this.showBg
|
|
4145
|
-
} }, index.h("picture", { key: '
|
|
4182
|
+
} }, index.h("picture", { key: 'c6b1561f51587341af50b4129242424961b13788' }, this.formats.map((format) => (index.h("source", { type: format.type, srcSet: format.srcset, media: format.media, sizes: this.sizes }))), index.h("img", Object.assign({ key: '136c7a183750f61d237fd0845750e70f38603f48', ref: (el) => (this.img = el), class: {
|
|
4146
4183
|
'effect-opacity object-cover object-center': true,
|
|
4147
4184
|
'opacity-100': this.loaded,
|
|
4148
4185
|
'opacity-0': !this.loaded
|
|
@@ -4201,7 +4238,7 @@ const EdsInput = class {
|
|
|
4201
4238
|
render() {
|
|
4202
4239
|
const withIcon = !!this.icon;
|
|
4203
4240
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : '';
|
|
4204
|
-
return (index.h("div", { key: '
|
|
4241
|
+
return (index.h("div", { key: '10cacc49f2e61f8b357d1d0dd303822d7b3d7800', class: "relative flex items-center" }, this.type === 'textarea' ? (index.h("textarea", { id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.innerVal.toString(), required: this.required, disabled: this.disabled, class: `min-h-80 input input-textarea ${withIcon ? 'input-with-icon' : ''} ${this.error ? 'input-error' : ''} ${this.extraClass}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput })) : this.type === 'select' ? (index.h("select", { id: this.inputId || this.name, name: this.name, required: this.required, disabled: this.disabled, class: `input input-select ${this.error ? 'input-error' : ''} ${this.extraClass}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, onInput: this.handleInput, onChange: this.handleInput }, this.options.map((option) => (index.h("option", { value: option.value, selected: option.value === this.innerVal, key: option.value }, option.label))))) : (index.h("input", Object.assign({ id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.innerVal.toString(), required: this.required, disabled: this.disabled, type: this.type, checked: ['radio', 'checkbox'].includes(this.type) ? this.checked : undefined }, (this.type === 'number'
|
|
4205
4242
|
? {
|
|
4206
4243
|
min: this.min,
|
|
4207
4244
|
max: this.max,
|
|
@@ -4212,7 +4249,7 @@ const EdsInput = class {
|
|
|
4212
4249
|
input ${this.type === 'radio' ? 'input-radio' : this.type === 'checkbox' ? 'input-checkbox' : ''}
|
|
4213
4250
|
${withIcon && this.type !== 'radio' && this.type !== 'checkbox' ? 'input-icon pl-36' : ''}
|
|
4214
4251
|
${this.error ? 'input-error' : ''}
|
|
4215
|
-
`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput }))), this.maxLength && this.type === 'textarea' && (index.h("span", { key: '
|
|
4252
|
+
`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput }))), this.maxLength && this.type === 'textarea' && (index.h("span", { key: '2f17e830e7d5977c06dff45e248ec6d4bcf2885c', class: `input-counter f-ui-05 absolute bottom-8 right-8 ${this.maxLengthReached ? 'input-counter-error' : ''}` }, this.maxLength)), this.icon && (index.h("eds-icon-wrapper", { key: 'd171f505b869787c01945720489343a6d57e02bf', class: `absolute top-1/2 left-[4px] -translate-y-1/2 ${this.disabled ? 'text-lightest' : 'text-lightest'}`, icon: this.icon }))));
|
|
4216
4253
|
}
|
|
4217
4254
|
get el() { return index.getElement(this); }
|
|
4218
4255
|
static get watchers() { return {
|
|
@@ -4323,7 +4360,7 @@ const EdsInputField = class {
|
|
|
4323
4360
|
}
|
|
4324
4361
|
render() {
|
|
4325
4362
|
const inputOpts = Object.assign({ name: this.name, id: this.inputId, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleNativeInput, onChange: this.handleNativeChange, type: this.type, required: this.required, value: this.value, error: this.error, icon: this.icon, checked: this.checked }, (this.type === 'number' ? { min: this.min, max: this.max, step: this.step } : {}));
|
|
4326
|
-
return (index.h("div", { key: '
|
|
4363
|
+
return (index.h("div", { key: '646cf997652c5401115c5f7d96b29cf752feeacf' }, this.type === 'checkbox' || this.type === 'radio' ? (this.parsedOptions.length > 0 ? (index.h("fieldset", { class: "space-y-4" }, index.h("div", { class: "flex justify-between mb-4" }, this.label && (index.h("eds-input-label", { name: this.inputId || this.name, label: this.label, required: this.required })), this.hint && (index.h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint))), this.parsedOptions.map((option) => (index.h("div", { class: "flex items-center gap-x-4 gap-y-4", key: option.value }, index.h("eds-input", Object.assign({}, inputOpts, { value: option.value, checked: typeof this.value === 'string' && this.value.split(',').includes(String(option.value)) })), index.h("label", { htmlFor: this.name, class: `input-label-options ${this.disabled ? 'text-lighter' : ''}` }, option.label)))))) : (index.h("div", { class: "flex items-center gap-x-8" }, index.h("eds-input", Object.assign({}, inputOpts, { value: this.value, checked: this.value === 'on' || this.checked })), this.label && (index.h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required }))))) : (index.h("div", null, index.h("div", { class: "flex justify-between mb-4" }, this.label && (index.h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required })), this.hint && (index.h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint))), this.type === 'select' ? (index.h("eds-input-select", Object.assign({}, inputOpts, { options: this.parsedOptions }))) : this.type === 'file' ? (index.h("input", { type: "file", id: this.inputId || this.name, name: this.name, onChange: this.onChangeNative, disabled: this.disabled, required: this.required })) : this.type === 'search' ? (index.h("eds-input-search", { name: "search-box" })) : this.type === 'range' ? ((() => {
|
|
4327
4364
|
var _a, _b, _c;
|
|
4328
4365
|
const rangeProps = {
|
|
4329
4366
|
name: inputOpts.name,
|
|
@@ -4336,7 +4373,7 @@ const EdsInputField = class {
|
|
|
4336
4373
|
const opt = this.parsedOptions;
|
|
4337
4374
|
const numberValue = typeof this.value === 'string' ? parseFloat(this.value) : this.value || 0;
|
|
4338
4375
|
return (index.h("eds-input-range", Object.assign({}, rangeProps, { min: (_a = opt[0]) === null || _a === void 0 ? void 0 : _a.value, max: (_b = opt[1]) === null || _b === void 0 ? void 0 : _b.value, step: (_c = opt[2]) === null || _c === void 0 ? void 0 : _c.value, value: numberValue })));
|
|
4339
|
-
})()) : (index.h("eds-input", Object.assign({}, inputOpts))))), index.h("div", { key: '
|
|
4376
|
+
})()) : (index.h("eds-input", Object.assign({}, inputOpts))))), index.h("div", { key: 'dd39d14a7bd629d259d9a04cd83530330d05b6fd', class: "mt-6" }, index.h("eds-input-footer", { key: 'd909871d432841039a82a57d174f71a3733cf51c', id: `${this.name}-footer`, name: this.name, message: this.message, "error-message": this.errorMessage, error: this.error, link: this.link }))));
|
|
4340
4377
|
}
|
|
4341
4378
|
static get delegatesFocus() { return true; }
|
|
4342
4379
|
get hostEl() { return index.getElement(this); }
|
|
@@ -4356,7 +4393,7 @@ const EdsInputFooter = class {
|
|
|
4356
4393
|
this.link = undefined;
|
|
4357
4394
|
}
|
|
4358
4395
|
render() {
|
|
4359
|
-
return (index.h("div", { key: '
|
|
4396
|
+
return (index.h("div", { key: 'ac60e5d56a86af64ea34445f9376c942258c9026' }, this.error && this.errorMessage && (index.h("div", { key: '25ff09f276f7028e1b2877133ab639b35cdebaba', id: `error_${this.name}`, class: "text-error flex items-center" }, index.h("eds-icon-wrapper", { key: '2add9a34a966428af96598f3e8e07f9535da8728', icon: "warning" }), index.h("p", { key: 'bcb624339190c0585e960a0c4debc3fec2ada4eb', class: "f-ui-04 ml-4 mb-4", innerHTML: this.errorMessage }))), this.message && index.h("p", { key: '00944237618f325774f316faaf4620e5eb507289', id: `desc_${this.name}`, class: "f-ui-05 text-lighter", innerHTML: this.message }), this.link && (index.h("eds-link", { key: '464c5a59e9c36a06f1cdae9be9e09a4f8b05d282', label: this.link.label, url: this.link.url, intent: "underline", size: "small", external: true }))));
|
|
4360
4397
|
}
|
|
4361
4398
|
};
|
|
4362
4399
|
EdsInputFooter.style = EdsInputFooterStyle0;
|
|
@@ -4373,7 +4410,7 @@ const EdsInputLabel = class {
|
|
|
4373
4410
|
this.disabled = false;
|
|
4374
4411
|
}
|
|
4375
4412
|
render() {
|
|
4376
|
-
return (index.h("label", { key: '
|
|
4413
|
+
return (index.h("label", { key: '8a421c62ddec859bd7837454aa664a116001fd31', htmlFor: this.name, class: `input-label ${this.disabled ? 'text-lighter' : ''}` }, this.label, this.required && (index.h("span", { key: 'ad49202fb172a182822587248c141e0f8d7bcc6f' }, index.h("span", { key: 'e682ff5f3ac83b8adce37c8c9893c2aa235c97b1', "aria-hidden": "true" }, "*"), index.h("span", { key: '343d2abb7c452fc2a6a67b04727237fea9519838', class: "sr-only" }, "required")))));
|
|
4377
4414
|
}
|
|
4378
4415
|
};
|
|
4379
4416
|
EdsInputLabel.style = EdsInputLabelStyle0;
|
|
@@ -4420,7 +4457,7 @@ const EdsInputRange = class {
|
|
|
4420
4457
|
return this.inputElement;
|
|
4421
4458
|
}
|
|
4422
4459
|
render() {
|
|
4423
|
-
return (index.h("div", { key: '
|
|
4460
|
+
return (index.h("div", { key: '27c60fe7ad5cf3cf8255129529ef64905c87b609', class: "relative flex flex-col items-start" }, index.h("input", { key: '8ef115e18b6afd956c57a30cd4b9ee45ecd79334', id: this.inputId || this.name, name: this.name, min: this.min, max: this.max, step: this.step, value: this.sliderVal, required: this.required, disabled: this.disabled, type: "range", class: "w-full py-6 input", tabindex: "0", role: "slider", "aria-describedby": `desc_${this.name}`, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.sliderVal, onInput: this.onInput, onChange: this.onChange }), index.h("p", { key: 'beb95f6aa032db57ec401839cea48ac1d3a1861d', id: `desc_${this.name}`, class: "block f-ui-05 mt-4 text-lighter" }, "Current value: ", this.sliderVal)));
|
|
4424
4461
|
}
|
|
4425
4462
|
get el() { return index.getElement(this); }
|
|
4426
4463
|
static get watchers() { return {
|
|
@@ -4489,7 +4526,7 @@ const EdsInputSearch = class {
|
|
|
4489
4526
|
return this.inputElement;
|
|
4490
4527
|
}
|
|
4491
4528
|
render() {
|
|
4492
|
-
return (index.h("div", { key: '
|
|
4529
|
+
return (index.h("div", { key: '4057975b193458daff5cc779e7671f3aa8df82fb', class: "relative flex items-center" }, index.h("eds-icon-wrapper", { key: '47366d7737c3c044aa97f6e5a5a76301c5f688ae', icon: "search", class: "absolute top-1/2 left-[4px] -translate-y-1/2 text-lightest", "aria-hidden": "true" }), index.h("input", { key: '70195ba54b9afd1c953735899d6fbfd668f81c71', id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.value || '', required: this.required, disabled: this.disabled, type: "search", "aria-label": this.placeholder, class: `input pl-36 ${this.decorate}`,
|
|
4493
4530
|
//onInput={this.onInput}
|
|
4494
4531
|
onChange: this.onChange })));
|
|
4495
4532
|
}
|
|
@@ -4518,12 +4555,12 @@ const EdsInputSelect = class {
|
|
|
4518
4555
|
const selectId = this.inputId || this.name;
|
|
4519
4556
|
const placeholderText = this.placeholder || `Pick from the list`;
|
|
4520
4557
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : undefined;
|
|
4521
|
-
return (index.h("div", { key: '
|
|
4558
|
+
return (index.h("div", { key: '5f73cb76010cac41f433921395aaf779765e298a', class: "relative" }, index.h("select", { key: '0705adad43076b6048900d5c62b8be2dff090270', id: selectId, name: this.name, class: {
|
|
4522
4559
|
input: true,
|
|
4523
4560
|
'input-error': this.error,
|
|
4524
4561
|
'px-4': true,
|
|
4525
4562
|
'py-2': true
|
|
4526
|
-
}, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, disabled: this.disabled, required: this.required, onChange: this.handleChange }, index.h("option", { key: '
|
|
4563
|
+
}, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, disabled: this.disabled, required: this.required, onChange: this.handleChange }, index.h("option", { key: '6b2d7856821cfe804f63f6f289f78bd3f7a8273c', value: "", disabled: true, hidden: true }, placeholderText), this.options.map((opt, index$1) => (index.h("option", { key: index$1, value: opt.value, selected: opt.value === this.value }, opt.label)))), index.h("span", { key: '161692e967ed9c094feb171c6d067058dfafa146', class: "bg-dark rounded-xs absolute top-1/2 right-[6px] flex h-28 w-28 -translate-y-1/2 items-center justify-center" }, index.h("eds-icon-wrapper", { key: '513a74b4753a08280326970dfbb16642b5c6b986', class: "w-20 h-20", icon: "chevron-right" }))));
|
|
4527
4564
|
}
|
|
4528
4565
|
};
|
|
4529
4566
|
|
|
@@ -4594,7 +4631,6 @@ const linkStyles = index$1.cva([
|
|
|
4594
4631
|
false: ''
|
|
4595
4632
|
},
|
|
4596
4633
|
size: {
|
|
4597
|
-
underline: 'f-body-02 ',
|
|
4598
4634
|
small: 'min-h-36 f-ui-02 px-12',
|
|
4599
4635
|
large: 'min-h-44 f-ui-01 px-16'
|
|
4600
4636
|
}
|
|
@@ -4647,6 +4683,16 @@ const linkStyles = index$1.cva([
|
|
|
4647
4683
|
intent: 'inverse',
|
|
4648
4684
|
isActive: true,
|
|
4649
4685
|
class: 'before:!opacity-100'
|
|
4686
|
+
},
|
|
4687
|
+
{
|
|
4688
|
+
intent: 'underline',
|
|
4689
|
+
size: 'small',
|
|
4690
|
+
class: '!px-0 !py-0 !min-h-0 f-ui-02'
|
|
4691
|
+
},
|
|
4692
|
+
{
|
|
4693
|
+
intent: 'underline',
|
|
4694
|
+
size: 'large',
|
|
4695
|
+
class: '!px-0 !py-0 !min-h-0 f-ui-01'
|
|
4650
4696
|
}
|
|
4651
4697
|
],
|
|
4652
4698
|
defaultVariants: {
|
|
@@ -4662,7 +4708,7 @@ const EdsLink = class {
|
|
|
4662
4708
|
index.registerInstance(this, hostRef);
|
|
4663
4709
|
this.parentContext = null; // Accepts the entire event detail or null
|
|
4664
4710
|
this.label = undefined;
|
|
4665
|
-
this.intent =
|
|
4711
|
+
this.intent = 'primary';
|
|
4666
4712
|
this.icon = undefined;
|
|
4667
4713
|
this.iconPos = 'right';
|
|
4668
4714
|
this.iconSmall = false;
|
|
@@ -4674,7 +4720,6 @@ const EdsLink = class {
|
|
|
4674
4720
|
this.ariaLabel = undefined;
|
|
4675
4721
|
this.disabled = false;
|
|
4676
4722
|
this.hideLabelOnSmallScreen = false;
|
|
4677
|
-
this.extraClass = undefined;
|
|
4678
4723
|
}
|
|
4679
4724
|
handleParentContext(event) {
|
|
4680
4725
|
if (event.target !== this.el) {
|
|
@@ -4719,9 +4764,6 @@ const EdsLink = class {
|
|
|
4719
4764
|
}
|
|
4720
4765
|
}
|
|
4721
4766
|
getLinkSize() {
|
|
4722
|
-
if (this.intent === 'underline') {
|
|
4723
|
-
return 'underline';
|
|
4724
|
-
}
|
|
4725
4767
|
return this.size;
|
|
4726
4768
|
}
|
|
4727
4769
|
renderLeftIcon() {
|
|
@@ -4750,12 +4792,13 @@ const EdsLink = class {
|
|
|
4750
4792
|
isActive: this.current,
|
|
4751
4793
|
hasIcon: !!this.icon
|
|
4752
4794
|
});
|
|
4795
|
+
const safeUrl = typeof this.url === 'string' && this.url.length ? this.url : undefined;
|
|
4753
4796
|
const isInteractive = !this.disabled;
|
|
4754
4797
|
const isIconOnly = !this.label || (this.hideLabelOnSmallScreen && this.icon);
|
|
4755
4798
|
const labelClasses = this.hideLabelOnSmallScreen
|
|
4756
4799
|
? 'hidden lg:flex' // Tailwind example: hidden on small screens, visible on larger
|
|
4757
4800
|
: '';
|
|
4758
|
-
return (index.h("a", { key: '
|
|
4801
|
+
return (index.h("a", { key: '1ae7cb8fda0fdc0a4396504a4dfa13afa428d98f', class: `${classes || ''}`, href: isInteractive ? safeUrl : undefined, target: this.external && isInteractive ? '_blank' : undefined, rel: this.external && isInteractive ? 'noopener noreferrer' : undefined, tabIndex: isInteractive ? 0 : -1, "aria-label": isIconOnly ? this.ariaLabel || 'Link' : undefined, "aria-disabled": this.disabled ? 'true' : undefined, "aria-current": this.current ? 'page' : undefined, role: this.disabled ? 'link' : undefined, download: this.download ? '' : undefined, onClick: (event) => this.handleClick(event), onKeyDown: (event) => this.handleKeyDown(event) }, index.h("span", { key: '7fc137758d974ba4a3a974f7b22587d3ca3b031e', class: "z-1 relative inline-flex items-center justify-center" }, this.renderLeftIcon(), this.label && index.h("span", { key: '7c79baae49579eef264ab6546aa3ac8e044dcb46', class: labelClasses }, this.label), this.renderRightIcon())));
|
|
4759
4802
|
}
|
|
4760
4803
|
get el() { return index.getElement(this); }
|
|
4761
4804
|
};
|
|
@@ -4823,7 +4866,7 @@ const EdsLogo = class {
|
|
|
4823
4866
|
}
|
|
4824
4867
|
render() {
|
|
4825
4868
|
const logoContent = this.getLogo();
|
|
4826
|
-
return (index.h("a", { key: '
|
|
4869
|
+
return (index.h("a", { key: '0a0d4dd69a1af10c1c571a56ed0f698d95652405', href: this.href, onClick: () => this.handleClick(), class: "eds-logo-wrapper", "aria-label": this.label }, index.h("div", { key: '0d8ca0f9c647b3b12daf944b9c2919a93134bec2', innerHTML: logoContent })));
|
|
4827
4870
|
}
|
|
4828
4871
|
get el() { return index.getElement(this); }
|
|
4829
4872
|
};
|
|
@@ -4955,71 +4998,84 @@ const EdsNps = class {
|
|
|
4955
4998
|
this.nps = index.createEvent(this, "nps", 7);
|
|
4956
4999
|
this.min = 0;
|
|
4957
5000
|
this.max = 10;
|
|
5001
|
+
this.btnRefs = [];
|
|
5002
|
+
this.onSelect = (value) => {
|
|
5003
|
+
this.selectedValue = value;
|
|
5004
|
+
this.nps.emit(value);
|
|
5005
|
+
// Move focus to the selected button (like your rating component)
|
|
5006
|
+
requestAnimationFrame(() => {
|
|
5007
|
+
var _a, _b;
|
|
5008
|
+
const idx = value - this.min;
|
|
5009
|
+
(_b = (_a = this.btnRefs[idx]) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
5010
|
+
});
|
|
5011
|
+
};
|
|
5012
|
+
this.handleKeyNav = (e) => {
|
|
5013
|
+
const { key } = e;
|
|
5014
|
+
const navigational = ['ArrowRight', 'ArrowLeft', 'Home', 'End', ' ', 'Enter'];
|
|
5015
|
+
if (!navigational.includes(key)) {
|
|
5016
|
+
return;
|
|
5017
|
+
}
|
|
5018
|
+
e.preventDefault();
|
|
5019
|
+
const count = this.max - this.min + 1;
|
|
5020
|
+
// Derive current index from selectedValue; if none, use 0 (first)
|
|
5021
|
+
let currentIdx = this.selectedValue == null ? 0 : this.selectedValue - this.min;
|
|
5022
|
+
switch (key) {
|
|
5023
|
+
case 'ArrowRight':
|
|
5024
|
+
currentIdx = Math.min(count - 1, currentIdx + 1);
|
|
5025
|
+
this.setActiveByIndex(currentIdx, /*commit*/ false);
|
|
5026
|
+
break;
|
|
5027
|
+
case 'ArrowLeft':
|
|
5028
|
+
currentIdx = Math.max(0, currentIdx - 1);
|
|
5029
|
+
this.setActiveByIndex(currentIdx, /*commit*/ false);
|
|
5030
|
+
break;
|
|
5031
|
+
case 'Home':
|
|
5032
|
+
this.setActiveByIndex(0, /*commit*/ false);
|
|
5033
|
+
break;
|
|
5034
|
+
case 'End':
|
|
5035
|
+
this.setActiveByIndex(count - 1, /*commit*/ false);
|
|
5036
|
+
break;
|
|
5037
|
+
case ' ':
|
|
5038
|
+
case 'Enter':
|
|
5039
|
+
// Commit current focused item
|
|
5040
|
+
this.onSelect(this.min + currentIdx);
|
|
5041
|
+
break;
|
|
5042
|
+
}
|
|
5043
|
+
};
|
|
4958
5044
|
this.question = undefined;
|
|
4959
5045
|
this.leftLabel = undefined;
|
|
4960
5046
|
this.rightLabel = undefined;
|
|
4961
5047
|
this.selectedValue = null;
|
|
4962
5048
|
}
|
|
4963
|
-
|
|
5049
|
+
/** Move visual highlight & roving tabindex; optionally commit selection */
|
|
5050
|
+
setActiveByIndex(index, commit = false) {
|
|
5051
|
+
var _a;
|
|
5052
|
+
const value = this.min + index;
|
|
5053
|
+
// Update highlight so focus movement is visible (like your rating)
|
|
4964
5054
|
this.selectedValue = value;
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
switch (e.key) {
|
|
4971
|
-
case 'ArrowRight':
|
|
4972
|
-
case 'ArrowLeft': {
|
|
4973
|
-
e.preventDefault();
|
|
4974
|
-
const delta = e.key === 'ArrowRight' ? 1 : -1;
|
|
4975
|
-
const nextIndex = Math.min(this.max, Math.max(0, currentIndex + delta));
|
|
4976
|
-
this.activateRadio(radios, nextIndex);
|
|
4977
|
-
break;
|
|
4978
|
-
}
|
|
4979
|
-
case 'Home': {
|
|
4980
|
-
e.preventDefault();
|
|
4981
|
-
this.activateRadio(radios, 0);
|
|
4982
|
-
break;
|
|
4983
|
-
}
|
|
4984
|
-
case 'End': {
|
|
4985
|
-
e.preventDefault();
|
|
4986
|
-
this.activateRadio(radios, this.max);
|
|
4987
|
-
break;
|
|
4988
|
-
}
|
|
4989
|
-
case 'Enter':
|
|
4990
|
-
case ' ': {
|
|
4991
|
-
e.preventDefault();
|
|
4992
|
-
if (currentIndex >= 0) {
|
|
4993
|
-
this.handleClick(this.min + currentIndex);
|
|
4994
|
-
}
|
|
4995
|
-
break;
|
|
4996
|
-
}
|
|
4997
|
-
case 'Escape': {
|
|
4998
|
-
e.preventDefault();
|
|
4999
|
-
if (currentIndex >= 0) {
|
|
5000
|
-
radios[currentIndex].blur();
|
|
5001
|
-
}
|
|
5002
|
-
break;
|
|
5003
|
-
}
|
|
5004
|
-
default:
|
|
5005
|
-
return;
|
|
5055
|
+
// Focus the button host (ensure eds-button forwards focus to its inner <button>)
|
|
5056
|
+
const target = this.btnRefs[index];
|
|
5057
|
+
typeof (target === null || target === void 0 ? void 0 : target.focusInner) === 'function' ? target.focusInner() : (_a = target === null || target === void 0 ? void 0 : target.focus) === null || _a === void 0 ? void 0 : _a.call(target);
|
|
5058
|
+
if (commit) {
|
|
5059
|
+
this.onSelect(value);
|
|
5006
5060
|
}
|
|
5007
5061
|
}
|
|
5008
|
-
activateRadio(radios, index) {
|
|
5009
|
-
const target = radios[index];
|
|
5010
|
-
const value = this.min + index;
|
|
5011
|
-
this.handleClick(value);
|
|
5012
|
-
target.focus();
|
|
5013
|
-
}
|
|
5014
5062
|
render() {
|
|
5015
5063
|
const count = this.max - this.min + 1;
|
|
5016
|
-
|
|
5017
|
-
return (index.h("div", { key: '19326c22d2b5c9f2fbc97bfb3c3d958d14cdfa25', class: "eds-nps" }, index.h("eds-input-label", { key: '046239977d2dc639eabfc60a67df62011833a983', id: "nps-question", name: "nps-question", label: this.question }), index.h("div", { key: 'e296b8ff3a081f42263ee0c0a28ef3f304b1e1c0', role: "group", id: "nps-buttons", "aria-labelledby": "nps-question", class: "grid grid-cols-11", onKeyDown: (e) => this.handleKeyNav(e) }, Array.from({ length: count }, (_, i) => {
|
|
5064
|
+
return (index.h("div", { key: 'f5e19e0f750c0de6da3bae5713dca0e13eba85fc', class: "eds-nps" }, index.h("eds-input-label", { key: '3ff611a932976956735395fb531d9a800b554974', id: "nps-question", name: "nps-question", label: this.question }), index.h("div", { key: 'da0c3af26dd24d7dc618675aa7f197f55023230f', id: "nps-buttons", role: "radiogroup", "aria-labelledby": "nps-question", class: "grid grid-cols-11", onKeyDown: this.handleKeyNav }, Array.from({ length: count }, (_, i) => {
|
|
5018
5065
|
const val = this.min + i;
|
|
5019
5066
|
const isSelected = val === this.selectedValue;
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5067
|
+
// Roving tabindex: focusable is the selected; if none selected yet, first is focusable
|
|
5068
|
+
const tabIndex = isSelected || (this.selectedValue == null && i === 0) ? 0 : -1;
|
|
5069
|
+
return (index.h("div", { class: "grid-col-span-1", key: val }, index.h("eds-button", { ref: (el) => (this.btnRefs[i] = el), role: "radio", "aria-checked": isSelected ? 'true' : 'false', "aria-label": `${val}`,
|
|
5070
|
+
// Use onClick so keyboard activation on inner <button> works natively
|
|
5071
|
+
onClick: () => this.onSelect(val), tabIndex: tabIndex, intent: isSelected ? 'primary' : 'ghost', "extra-class": "!block !px-0 w-full", label: `${val}`,
|
|
5072
|
+
// Optional: keep highlight in sync when tabbing into the group
|
|
5073
|
+
onFocus: () => {
|
|
5074
|
+
// Only move highlight on initial focus or when roving; remove if you
|
|
5075
|
+
// want focus without highlight.
|
|
5076
|
+
this.selectedValue = val;
|
|
5077
|
+
} })));
|
|
5078
|
+
})), index.h("div", { key: '10b2f854cff8192e54ee30feb44ad4143c54ad10', class: "flex justify-between mt-8" }, index.h("span", { key: '361b421b368219f9d7aa6306d912913e9d401fa0', class: "f-ui-04 text-light ml-4" }, this.leftLabel), index.h("span", { key: '2969496e1b6f772fcdf49667f66eee6dee6760fa', class: "f-ui-04 text-light mr-4" }, this.rightLabel))));
|
|
5023
5079
|
}
|
|
5024
5080
|
get el() { return index.getElement(this); }
|
|
5025
5081
|
};
|
|
@@ -5266,7 +5322,7 @@ const EdsPagination = class {
|
|
|
5266
5322
|
}
|
|
5267
5323
|
render() {
|
|
5268
5324
|
const navigableIndex = -1; // Track index for keyboard navigation
|
|
5269
|
-
return (index.h("div", { key: '
|
|
5325
|
+
return (index.h("div", { key: '17128145803ac6af5f37d5e7c7f0576961c3e372' }, this.total > 0 && this.mode === 'default' && (index.h("p", { key: 'e50738bfadd0b115ed2d05b81199f0d4cfadda18', class: "f-ui-03 text-light mb-28 w-full text-center", "aria-live": "polite", id: "pagination-info" }, index.h("span", { key: '230f2306254d7c5fa2bfd354f308e4fa6b5c2994', class: "text-light sr-only" }, "Results:"), this.pageResults())), this.mode === 'navigator' || (this.lastPage && this.lastPage > 1) ? (index.h("nav", { "aria-label": "Pagination Navigation", "aria-describedby": this.mode === 'default' ? 'pagination-info' : undefined, onKeyDown: this.handleKeyDown }, index.h("ul", { class: "flex items-center justify-center gap-x-8", role: "list" }, index.h("li", { class: "mr-auto" }, this.useButtons ? (index.h("div", { class: "pagination-button-wrapper", onFocus: () => this.handleItemFocus(navigableIndex) }, index.h("eds-button", { label: this.prevLabel, disabled: this.mode === 'navigator' ? !this.prevUrl : this.isFirstPage(), "aria-label": "Go to previous page", icon: "chevron-left", "icon-pos": "left", size: "small", "icon-small": "true", intent: "ghost", "extra-class": "!p-8 lg:!pr-12 pagination-button", onClick: (event) => {
|
|
5270
5326
|
if (this.mode === 'default' && !this.isFirstPage()) {
|
|
5271
5327
|
this.handlePageClick(event, (this.currentPage || 1) - 1);
|
|
5272
5328
|
}
|
|
@@ -5359,7 +5415,7 @@ const EdsRating = class {
|
|
|
5359
5415
|
this.onSelect(next);
|
|
5360
5416
|
}
|
|
5361
5417
|
render() {
|
|
5362
|
-
return (index.h("div", { key: '
|
|
5418
|
+
return (index.h("div", { key: '5d1cf924d2a59b4141eac1bd4f122c9cf640cf9c', id: "rating-buttons", role: "group", "aria-labelledby": "rating", class: "stars flex space-x-1 my-8", onKeyDown: (e) => this.handleKeyNav(e) }, Array.from({ length: this.ratingCount }, (_, index$1) => {
|
|
5363
5419
|
const starRating = index$1 + 1;
|
|
5364
5420
|
const isSelected = starRating <= this.selectedRating;
|
|
5365
5421
|
// Use the mapping text if available; otherwise, fall back to a generic label.
|
|
@@ -5372,6 +5428,170 @@ const EdsRating = class {
|
|
|
5372
5428
|
};
|
|
5373
5429
|
EdsRating.style = EdsRatingStyle0;
|
|
5374
5430
|
|
|
5431
|
+
const edsSidebarCss = ":host{display:block;width:100%;height:100%;overflow-y:auto;overflow-x:hidden;transition:width 0.3s ease}:host(.collapsed){width:4rem}:host::-webkit-scrollbar{width:8px}:host::-webkit-scrollbar-track{background:transparent}:host::-webkit-scrollbar-thumb{background:rgba(0, 0, 0, 0.2);border-radius:4px}:host::-webkit-scrollbar-thumb:hover{background:rgba(0, 0, 0, 0.3)}.sidebar-nav{padding:0.5rem 0}.sidebar-header{display:flex;justify-content:flex-end;padding:0.5rem 0.75rem;margin-bottom:0.5rem}:host(.collapsed) .sidebar-header{justify-content:center;padding:0.5rem}.collapse-toggle{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;background:none;border:none;cursor:pointer;padding:0;border-radius:0.375rem;transition:background-color 0.15s ease;color:inherit}.collapse-toggle:hover{background-color:rgba(0, 0, 0, 0.08)}.collapse-toggle:focus-visible{outline:2px solid var(--eds-focus-color, #0066cc);outline-offset:2px}.sidebar-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.125rem}.sidebar-item{display:flex;flex-direction:column}.sidebar-item-content{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 0.75rem;cursor:pointer;user-select:none;word-break:break-word;transition:background-color 0.15s ease;border-radius:0.375rem;margin:0 0.5rem;position:relative}:host(.collapsed) .sidebar-item-content{justify-content:center;padding:0.75rem;margin:0 0.5rem}.sidebar-item-content:hover{background-color:rgba(0, 0, 0, 0.04)}.sidebar-item-content:focus-visible{outline:2px solid var(--eds-focus-color, #0066cc);outline-offset:-2px;z-index:1}.sidebar-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.25rem;height:1.25rem}.sidebar-content-wrapper{display:flex;align-items:center;gap:0.5rem;flex:1;min-width:0}.sidebar-toggle{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.25rem;height:1.25rem;padding:0;margin:-0.125rem 0;pointer-events:none}.sidebar-link-wrapper{flex:1;min-width:0;pointer-events:none}.sidebar-link{font-weight:400;pointer-events:none}.sidebar-children{list-style:none;margin:0.25rem 0 0 0;padding:0;display:flex;flex-direction:column;gap:0.125rem;overflow:hidden;animation:slideDown 0.2s ease}@keyframes slideDown{from{opacity:0;transform:translateY(-0.25rem)}to{opacity:1;transform:translateY(0)}}.sidebar-item.level-0 .sidebar-item-content{padding-left:0.75rem}:host(.collapsed) .sidebar-item.level-0 .sidebar-item-content{padding-left:0.75rem}.sidebar-item.level-1 .sidebar-item-content{padding-left:2rem}.sidebar-item.level-2 .sidebar-item-content{padding-left:3.25rem}.sidebar-item.level-3 .sidebar-item-content{padding-left:4.5rem}.sidebar-item.level-4 .sidebar-item-content{padding-left:5.75rem}.sidebar-item.level-5 .sidebar-item-content{padding-left:7rem}:host(.theme-default) .sidebar-item-content{border-radius:0.375rem;margin:0 0.5rem;padding:0.5rem 0.75rem}:host(.theme-default.collapsed) .sidebar-item-content{margin:0 0.5rem;border-radius:0.375rem}:host(.theme-default) .sidebar-item-content:hover{background-color:rgba(0, 0, 0, 0.04)}:host(.theme-default) .sidebar-item.active>.sidebar-item-content{background-color:transparent}:host(.theme-default) .sidebar-item.active>.sidebar-item-content .sidebar-link{font-weight:600}:host(.theme-default) .sidebar-item.level-0 .sidebar-item-content{padding-left:0.75rem}:host(.theme-default) .sidebar-item.level-1 .sidebar-item-content{padding-left:2rem}:host(.theme-default) .sidebar-item.level-2 .sidebar-item-content{padding-left:3.25rem}:host(.theme-default) .sidebar-item.level-3 .sidebar-item-content{padding-left:4.5rem}:host(.theme-default) .sidebar-item.level-4 .sidebar-item-content{padding-left:5.75rem}:host(.theme-minimal) .sidebar-item-content{border-radius:0;margin:0;padding-left:1rem;padding-right:1rem}:host(.theme-minimal.collapsed) .sidebar-item-content{margin:0 0.25rem;border-radius:0.375rem}:host(.theme-minimal) .sidebar-item-content:hover{background-color:var(--grey-300)}:host(.theme-minimal) .sidebar-item.active>.sidebar-item-content{background-color:var(--grey-400);border-left:3px solid var(--grey-900);padding-left:calc(1rem - 3px)}:host(.theme-minimal.collapsed) .sidebar-item.active>.sidebar-item-content{border-left:none;border-radius:0.375rem;padding-left:0.75rem}:host(.theme-minimal) .sidebar-item.level-1.active>.sidebar-item-content{padding-left:calc(2rem - 3px)}:host(.theme-minimal) .sidebar-item.level-2.active>.sidebar-item-content{padding-left:calc(3.25rem - 3px)}:host(.theme-minimal) .sidebar-item.level-3.active>.sidebar-item-content{padding-left:calc(4.5rem - 3px)}:host(.theme-minimal) .sidebar-item.level-4.active>.sidebar-item-content{padding-left:calc(5.75rem - 3px)}:host(.theme-minimal) .sidebar-item.level-0 .sidebar-item-content{padding-left:1rem}:host(.theme-minimal) .sidebar-item.level-1 .sidebar-item-content{padding-left:2rem}:host(.theme-minimal) .sidebar-item.level-2 .sidebar-item-content{padding-left:3.25rem}:host(.theme-minimal) .sidebar-item.level-3 .sidebar-item-content{padding-left:4.5rem}:host(.theme-minimal) .sidebar-item.level-4 .sidebar-item-content{padding-left:5.75rem}:host(.theme-minimal) .sidebar-children{position:relative}:host(.theme-ebrains) .sidebar-item-content{padding:0.5rem 1rem;border-radius:0.5rem;margin:0 0.5rem}:host(.theme-ebrains.collapsed) .sidebar-item-content{padding:0.75rem}:host(.theme-ebrains) .sidebar-item-content:hover{background-color:rgba(0, 0, 0, 0.05)}:host(.theme-ebrains) .sidebar-item.active>.sidebar-item-content{background-color:var(--green-600, #22c55e);color:white}:host(.theme-ebrains) .sidebar-item.active>.sidebar-item-content .sidebar-link{--eds-link-color:white;--eds-link-hover-color:white}:host(.theme-ebrains) .sidebar-item.active>.sidebar-item-content .sidebar-toggle{color:white}:host(.theme-ebrains) .sidebar-item.active>.sidebar-item-content .sidebar-icon{color:white}:host(.theme-ebrains) .sidebar-item.level-0 .sidebar-item-content{padding-left:1rem}:host(.theme-ebrains) .sidebar-item.level-1 .sidebar-item-content{padding-left:2.25rem}:host(.theme-ebrains) .sidebar-item.level-2 .sidebar-item-content{padding-left:3.5rem}:host(.theme-ebrains) .sidebar-item.level-3 .sidebar-item-content{padding-left:4.75rem}:host(.theme-ebrains) .sidebar-item.level-4 .sidebar-item-content{padding-left:6rem}@media (prefers-color-scheme: dark){.collapse-toggle:hover{background-color:rgba(255, 255, 255, 0.08)}:host(.theme-default) .sidebar-item-content:hover{background-color:rgba(255, 255, 255, 0.05)}:host(.theme-default) .sidebar-item.active>.sidebar-item-content{background-color:rgba(0, 102, 204, 0.15)}:host(.theme-minimal) .sidebar-item-content:hover{background-color:rgba(255, 255, 255, 0.06)}:host::-webkit-scrollbar-thumb{background:rgba(255, 255, 255, 0.2)}:host::-webkit-scrollbar-thumb:hover{background:rgba(255, 255, 255, 0.3)}}.sidebar-toggle eds-icon-wrapper,.sidebar-icon eds-icon-wrapper,.collapse-toggle eds-icon-wrapper{transition:transform 0.15s ease;display:flex;align-items:center;justify-content:center}.sidebar-item-content:focus-visible .sidebar-link{text-decoration:underline}.sidebar-item.active>.sidebar-item-content .sidebar-link{font-weight:500}:host(.collapsed) .sidebar-item-content::after{content:attr(title);position:absolute;left:100%;top:50%;transform:translateY(-50%);margin-left:0.5rem;padding:0.5rem 0.75rem;background:rgba(0, 0, 0, 0.9);color:white;border-radius:0.375rem;white-space:nowrap;font-size:0.875rem;opacity:0;pointer-events:none;transition:opacity 0.2s ease;z-index:1000}:host(.collapsed) .sidebar-item-content:hover::after{opacity:1;transition-delay:0.3s}.-ml-4{margin-left:-0.25rem}.mt-2{margin-top:0.125rem}";
|
|
5432
|
+
const EdsSidebarStyle0 = edsSidebarCss;
|
|
5433
|
+
|
|
5434
|
+
const EdsSidebar = class {
|
|
5435
|
+
constructor(hostRef) {
|
|
5436
|
+
index.registerInstance(this, hostRef);
|
|
5437
|
+
this.sidebar = index.createEvent(this, "sidebar", 7);
|
|
5438
|
+
this.toggleItem = (itemId, ev) => {
|
|
5439
|
+
if (ev) {
|
|
5440
|
+
ev.stopPropagation();
|
|
5441
|
+
}
|
|
5442
|
+
const newOpen = new Set(this.openItems);
|
|
5443
|
+
if (newOpen.has(itemId)) {
|
|
5444
|
+
newOpen.delete(itemId);
|
|
5445
|
+
}
|
|
5446
|
+
else {
|
|
5447
|
+
newOpen.add(itemId);
|
|
5448
|
+
}
|
|
5449
|
+
this.openItems = newOpen;
|
|
5450
|
+
};
|
|
5451
|
+
this.navigate = (url, ev) => {
|
|
5452
|
+
if (!this.enableRouting || !url) {
|
|
5453
|
+
return;
|
|
5454
|
+
}
|
|
5455
|
+
if (ev) {
|
|
5456
|
+
ev.preventDefault();
|
|
5457
|
+
ev.stopPropagation();
|
|
5458
|
+
}
|
|
5459
|
+
// Emit custom event for routing
|
|
5460
|
+
this.sidebar.emit(url);
|
|
5461
|
+
// Update browser history if available
|
|
5462
|
+
if (typeof window !== 'undefined' && window.history) {
|
|
5463
|
+
window.history.pushState({}, '', url);
|
|
5464
|
+
}
|
|
5465
|
+
};
|
|
5466
|
+
this.handleItemClick = (item, ev) => {
|
|
5467
|
+
var _a;
|
|
5468
|
+
// If item has children, ONLY toggle (don't navigate)
|
|
5469
|
+
if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
5470
|
+
this.toggleItem(item.id, ev);
|
|
5471
|
+
return;
|
|
5472
|
+
}
|
|
5473
|
+
// Only navigate if no children and has URL
|
|
5474
|
+
if (item.url) {
|
|
5475
|
+
this.navigate(item.url, ev);
|
|
5476
|
+
}
|
|
5477
|
+
};
|
|
5478
|
+
this.items = '[]';
|
|
5479
|
+
this.theme = 'default';
|
|
5480
|
+
this.activeUrl = '';
|
|
5481
|
+
this.enableRouting = true;
|
|
5482
|
+
this.maxLevel = 4;
|
|
5483
|
+
this.openItems = new Set();
|
|
5484
|
+
this.parsedItems = [];
|
|
5485
|
+
}
|
|
5486
|
+
// ---------------------------------------------------------------------------
|
|
5487
|
+
// Lifecycle
|
|
5488
|
+
// ---------------------------------------------------------------------------
|
|
5489
|
+
componentWillLoad() {
|
|
5490
|
+
this.parsedItems = this.parseItems(this.items);
|
|
5491
|
+
this.initializeOpenItems(this.parsedItems);
|
|
5492
|
+
}
|
|
5493
|
+
// ---------------------------------------------------------------------------
|
|
5494
|
+
// Watchers
|
|
5495
|
+
// ---------------------------------------------------------------------------
|
|
5496
|
+
handleItemsChange(newItems) {
|
|
5497
|
+
this.parsedItems = this.parseItems(newItems);
|
|
5498
|
+
this.initializeOpenItems(this.parsedItems);
|
|
5499
|
+
}
|
|
5500
|
+
handleActiveUrlChange() {
|
|
5501
|
+
this.initializeOpenItems(this.parsedItems);
|
|
5502
|
+
}
|
|
5503
|
+
// ---------------------------------------------------------------------------
|
|
5504
|
+
// Utils
|
|
5505
|
+
// ---------------------------------------------------------------------------
|
|
5506
|
+
parseItems(items) {
|
|
5507
|
+
if (Array.isArray(items)) {
|
|
5508
|
+
return items;
|
|
5509
|
+
}
|
|
5510
|
+
if (typeof items === 'string') {
|
|
5511
|
+
if (!items || items.trim() === '') {
|
|
5512
|
+
return [];
|
|
5513
|
+
}
|
|
5514
|
+
try {
|
|
5515
|
+
const parsed = JSON.parse(items);
|
|
5516
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
5517
|
+
}
|
|
5518
|
+
catch (e) {
|
|
5519
|
+
console.error('eds-sidebar: Failed to parse items JSON:', e);
|
|
5520
|
+
console.error('Received string:', items);
|
|
5521
|
+
return [];
|
|
5522
|
+
}
|
|
5523
|
+
}
|
|
5524
|
+
return [];
|
|
5525
|
+
}
|
|
5526
|
+
initializeOpenItems(items, level = 0) {
|
|
5527
|
+
if (level === 0) {
|
|
5528
|
+
// reset before recomputing
|
|
5529
|
+
this.openItems = new Set();
|
|
5530
|
+
}
|
|
5531
|
+
if (level >= this.maxLevel) {
|
|
5532
|
+
return;
|
|
5533
|
+
}
|
|
5534
|
+
items.forEach((item) => {
|
|
5535
|
+
var _a;
|
|
5536
|
+
const isActive = this.activeUrl && item.url === this.activeUrl;
|
|
5537
|
+
const hasActiveChild = this.hasActiveDescendant(item);
|
|
5538
|
+
if (item.open || isActive || hasActiveChild) {
|
|
5539
|
+
this.openItems.add(item.id);
|
|
5540
|
+
}
|
|
5541
|
+
if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
5542
|
+
this.initializeOpenItems(item.children, level + 1);
|
|
5543
|
+
}
|
|
5544
|
+
});
|
|
5545
|
+
}
|
|
5546
|
+
hasActiveDescendant(item) {
|
|
5547
|
+
var _a;
|
|
5548
|
+
if (item.url === this.activeUrl) {
|
|
5549
|
+
return true;
|
|
5550
|
+
}
|
|
5551
|
+
if (!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
5552
|
+
return false;
|
|
5553
|
+
}
|
|
5554
|
+
return item.children.some((child) => this.hasActiveDescendant(child));
|
|
5555
|
+
}
|
|
5556
|
+
// ---------------------------------------------------------------------------
|
|
5557
|
+
// Render
|
|
5558
|
+
// ---------------------------------------------------------------------------
|
|
5559
|
+
renderItem(item, level = 0) {
|
|
5560
|
+
if (level >= this.maxLevel) {
|
|
5561
|
+
return null;
|
|
5562
|
+
}
|
|
5563
|
+
const isOpen = this.openItems.has(item.id);
|
|
5564
|
+
const isActive = !!item.url && this.activeUrl === item.url;
|
|
5565
|
+
const hasChildren = !!(item.children && item.children.length);
|
|
5566
|
+
const itemId = `eds-sidebar-${item.id}`;
|
|
5567
|
+
const childrenId = `${itemId}-children`;
|
|
5568
|
+
return (index.h("li", { class: {
|
|
5569
|
+
'sidebar-item': true,
|
|
5570
|
+
open: isOpen,
|
|
5571
|
+
active: isActive,
|
|
5572
|
+
'has-children': hasChildren,
|
|
5573
|
+
[`level-${level}`]: true
|
|
5574
|
+
} }, index.h("div", { class: "sidebar-item-content", onClick: (e) => this.handleItemClick(item, e), role: hasChildren ? 'button' : item.url ? 'link' : 'button', tabindex: "0", "aria-current": isActive ? 'page' : undefined, "aria-expanded": hasChildren ? (isOpen ? 'true' : 'false') : undefined, "aria-controls": hasChildren ? childrenId : undefined, onKeyDown: (e) => {
|
|
5575
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
5576
|
+
e.preventDefault();
|
|
5577
|
+
this.handleItemClick(item, e);
|
|
5578
|
+
}
|
|
5579
|
+
} }, hasChildren && (index.h("span", { class: "sidebar-toggle mt-2 -ml-4", "aria-hidden": "true" }, index.h("eds-icon-wrapper", { icon: isOpen ? 'chevron-down' : 'chevron-right' }))), index.h("span", { class: "sidebar-link-wrapper" }, index.h("eds-link", { label: item.title, url: item.url || '#', intent: isActive ? 'strong' : 'weak', size: "small", "aria-label": item.title, "extra-class": "sidebar-link", tabindex: "-1" }))), hasChildren && isOpen && (index.h("ul", { id: childrenId, class: "sidebar-children" }, item.children.map((child) => this.renderItem(child, level + 1))))));
|
|
5580
|
+
}
|
|
5581
|
+
render() {
|
|
5582
|
+
return (index.h(index.Host, { key: '4334d20e5d72671243633253910ab05b4da013da', class: {
|
|
5583
|
+
'eds-sidebar': true,
|
|
5584
|
+
[`theme-${this.theme}`]: true
|
|
5585
|
+
} }, index.h("nav", { key: '319f6f42416d4229f1b011bf1216b39c8627302d', class: "sidebar-nav", "aria-label": "Sidebar" }, index.h("ul", { key: '687ceae3eca3e844e8f6a361db4a76d127d27813', class: "sidebar-list" }, this.parsedItems.map((item) => this.renderItem(item, 0))))));
|
|
5586
|
+
}
|
|
5587
|
+
get el() { return index.getElement(this); }
|
|
5588
|
+
static get watchers() { return {
|
|
5589
|
+
"items": ["handleItemsChange"],
|
|
5590
|
+
"activeUrl": ["handleActiveUrlChange"]
|
|
5591
|
+
}; }
|
|
5592
|
+
};
|
|
5593
|
+
EdsSidebar.style = EdsSidebarStyle0;
|
|
5594
|
+
|
|
5375
5595
|
const edsSpinnerCss = ":host{display:block}.spinner{box-sizing:border-box;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}";
|
|
5376
5596
|
const EdsSpinnerStyle0 = edsSpinnerCss;
|
|
5377
5597
|
|
|
@@ -5448,12 +5668,12 @@ const EdsSpinner = class {
|
|
|
5448
5668
|
alignItems: 'center',
|
|
5449
5669
|
justifyContent: 'center'
|
|
5450
5670
|
};
|
|
5451
|
-
return (index.h(index.Host, { key: '
|
|
5671
|
+
return (index.h(index.Host, { key: '28271d7eced2bc3d69538aa490d623167affd590' }, index.h("div", { key: '2a8987cb80c67a42f18ac0db8c0078a90d9fd97a', class: "spinner-overlay", style: overlayStyle }, index.h("span", { key: 'c6267576391c24c41ceb0141dd897f590033b26f', class: "spinner", style: spinnerStyle }), this.message && index.h("p", { key: 'ae67369899652f6ecc9c9411fd62a68a437553c5', class: "f-body-01" }, this.message))));
|
|
5452
5672
|
}
|
|
5453
5673
|
};
|
|
5454
5674
|
EdsSpinner.style = EdsSpinnerStyle0;
|
|
5455
5675
|
|
|
5456
|
-
const edsStepsCss = ".steps{position:sticky;margin-left:16px;
|
|
5676
|
+
const edsStepsCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}.steps{position:sticky;margin-left:16px;border-left:1px solid var(--soft-color, #ddd);padding-left:23px;counter-reset:step}.steps h3{counter-increment:step;font-size:var(--f-heading-05-fontSize);font-weight:var(--f-heading-05-fontWeight);line-height:var(--f-heading-05-lineHeight);position:relative}.steps h3::before{content:counter(step);position:absolute;left:-40px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.steps h4,.steps h5{counter-increment:step;font-size:var(--f-heading-06-fontSize);font-weight:var(--f-heading-06-fontWeight);line-height:var(--f-heading-06-lineHeight);position:relative}.steps h4::before,.steps h5::before{content:counter(step);position:absolute;left:-39px;top:-2px;display:flex;align-items:center;justify-content:center;width:31px;height:31px;font-size:0.875rem;border:1px solid #ccc;background:#333;color:#fff;border-radius:50%}.steps blockquote{margin-top:16px;margin-bottom:16px;font-style:italic;color:#aaa;padding-left:6px}.steps-img-placeholder{width:100%;height:200px;background:linear-gradient(to bottom, #9CE142, #00C959, #00A595);}.bg-\\[\\#00A595\\]{--tw-bg-opacity:1;background-color:rgb(0 165 149 / var(--tw-bg-opacity))}.relative{position:relative}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.text-center{text-align:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.w-full{width:100%}.h-52{height:3.25rem}.h-96{height:6rem}.h-\\[200px\\]{height:200px}.justify-between{justify-content:space-between}.mt-16{margin-top:1rem}.mt-32{margin-top:2rem}.mt-64{margin-top:4rem}.my-16{margin-top:1rem;margin-bottom:1rem}.mb-12{margin-bottom:0.75rem}.mb-16{margin-bottom:1rem}.last\\:mb-0:last-child{margin-bottom:0rem}.last\\:mt-16:last-child{margin-top:1rem}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.relative{position:relative}.flex{display:flex}.inline-flex{display:inline-flex}.grow{flex-grow:1}.rounded{border-radius:0.25rem}.rounded-lg{border-radius:16px}.rounded-t-lg{border-top-left-radius:16px;border-top-right-radius:16px}.border-2{border-width:2px}.p-8{padding:0.5rem}.p-24{padding:1.5rem}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.top-2{top:0.125rem}.bottom-2{bottom:0.125rem}.left-2{left:0.125rem}.right-2{right:0.125rem}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.overflow-hidden{overflow:hidden}.space-y-8{--tw-space-y-reverse:0;margin-top:calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem * var(--tw-space-y-reverse))}.space-y-16{--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.ml-8{margin-left:0.5rem}.gap-y-16{row-gap:1rem}.gap-x-16{-moz-column-gap:1rem;column-gap:1rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.block{display:block}.items-center{align-items:center}.px-8{padding-left:0.5rem;padding-right:0.5rem}.pb-20{padding-bottom:1.25rem}.eds-steps__title[role=\"button\"]{cursor:pointer}.eds-steps__title.is-disabled{cursor:not-allowed;color:rgba(0, 0, 0, 0.5);}.eds-steps__title.is-disabled::before{opacity:1;filter:none}.steps--horizontal{display:flex;flex-direction:column;gap:2rem}.horizontal-indicators{display:flex;justify-content:space-between;gap:1rem;padding:1rem 0}.horizontal-step{display:flex;flex-direction:column;align-items:center;gap:0.5rem;cursor:pointer;flex:1;position:relative}.horizontal-step:not(:last-child)::after{content:'';position:absolute;top:1.25rem;left:50%;width:100%;height:2px;background-color:#e0e0e0;z-index:-1}.horizontal-step.is-completed:not(:last-child)::after{background-color:var(--green-500);}.step-indicator{width:2.5rem;height:2.5rem;border-radius:50%;border:2px solid #e0e0e0;display:flex;align-items:center;justify-content:center;background-color:white;transition:all 0.3s ease}.horizontal-step.is-active .step-indicator{border-color:var(--green-500);background-color:var(--green-500);color:var(--white)}.horizontal-step.is-completed .step-indicator{border-color:var(--green-500);background-color:var(--white)}.horizontal-step.is-disabled{opacity:0.5;cursor:not-allowed}.step-number{font-weight:600;font-size:0.875rem}.step-label{font-size:0.875rem;text-align:center;font-weight:500}.horizontal-step.is-active .step-label{color:var(--green-500)}.step-content{padding:2rem 0;margin-left:calc((100% / var(--step-count, 1)) * 0.45 - 1.25rem);margin-right:calc((100% / var(--step-count, 1)) * 0.45 - 1.25rem)}.opacity-50{opacity:0.5}.eds-steps__title[role=\"button\"]{cursor:pointer}";
|
|
5457
5677
|
const EdsStepsStyle0 = edsStepsCss;
|
|
5458
5678
|
|
|
5459
5679
|
const EdsSteps = class {
|
|
@@ -5464,47 +5684,63 @@ const EdsSteps = class {
|
|
|
5464
5684
|
this.next = index.createEvent(this, "next", 7);
|
|
5465
5685
|
this.back = index.createEvent(this, "back", 7);
|
|
5466
5686
|
this.handleTitleClick = (index) => {
|
|
5467
|
-
//
|
|
5468
|
-
if (
|
|
5469
|
-
|
|
5687
|
+
// In linear mode, do NOT collapse; only navigate if allowed.
|
|
5688
|
+
if (this.type === 'linear') {
|
|
5689
|
+
// prevent jumping forward over disabled steps
|
|
5690
|
+
if (index > this.activeStep) {
|
|
5691
|
+
for (let i = this.activeStep; i < index; i++) {
|
|
5692
|
+
if (this.isStepDisabled(i)) {
|
|
5693
|
+
return;
|
|
5694
|
+
}
|
|
5695
|
+
}
|
|
5696
|
+
}
|
|
5697
|
+
this.activeStep = index;
|
|
5470
5698
|
this.step.emit(this.activeStep);
|
|
5471
5699
|
return;
|
|
5472
5700
|
}
|
|
5473
|
-
//
|
|
5474
|
-
|
|
5475
|
-
|
|
5701
|
+
// Non-linear vertical mode: support optional collapse/expand on current title
|
|
5702
|
+
if (this.orientation === 'vertical' && index === this.activeStep && this.collapsibleTitles) {
|
|
5703
|
+
this.activeStep = this.activeStep === index ? -1 : index;
|
|
5704
|
+
this.step.emit(this.activeStep);
|
|
5476
5705
|
return;
|
|
5477
|
-
}
|
|
5478
|
-
//
|
|
5706
|
+
}
|
|
5707
|
+
// Otherwise, just set
|
|
5479
5708
|
this.activeStep = index;
|
|
5480
5709
|
this.step.emit(this.activeStep);
|
|
5481
5710
|
};
|
|
5482
5711
|
this.handleNext = () => {
|
|
5483
5712
|
const lastIndex = this.parsedSteps.length - 1;
|
|
5713
|
+
// On last step
|
|
5484
5714
|
if (this.activeStep >= lastIndex) {
|
|
5485
|
-
this.activeStep = -1;
|
|
5486
5715
|
this.finished.emit();
|
|
5716
|
+
this.activeStep = -1; // collapse the content
|
|
5717
|
+
this.step.emit(this.activeStep); // notify change (-1 sentinel)
|
|
5487
5718
|
return;
|
|
5488
5719
|
}
|
|
5489
5720
|
const target = this.activeStep + 1;
|
|
5490
5721
|
this.next.emit(target);
|
|
5491
|
-
if (this.
|
|
5722
|
+
if (this.isStepDisabled(this.activeStep)) {
|
|
5492
5723
|
return;
|
|
5493
|
-
}
|
|
5724
|
+
}
|
|
5494
5725
|
this.activeStep = target;
|
|
5495
5726
|
this.step.emit(this.activeStep);
|
|
5496
|
-
// 2) if using the boolean form, clear it when moving away from a step
|
|
5497
5727
|
if (!Array.isArray(this.disableNext)) {
|
|
5498
5728
|
this.disableNext = false;
|
|
5499
5729
|
}
|
|
5500
5730
|
};
|
|
5501
5731
|
this.handleBack = () => {
|
|
5732
|
+
const lastIndex = this.parsedSteps.length - 1;
|
|
5733
|
+
// If somehow collapsed, recover to last visible step first
|
|
5734
|
+
if (this.activeStep < 0) {
|
|
5735
|
+
this.activeStep = lastIndex;
|
|
5736
|
+
this.step.emit(this.activeStep);
|
|
5737
|
+
return;
|
|
5738
|
+
}
|
|
5502
5739
|
if (this.activeStep > 0) {
|
|
5503
5740
|
const target = this.activeStep - 1;
|
|
5504
5741
|
this.back.emit(target);
|
|
5505
5742
|
this.activeStep = target;
|
|
5506
5743
|
this.step.emit(this.activeStep);
|
|
5507
|
-
// also clear boolean form on back
|
|
5508
5744
|
if (!Array.isArray(this.disableNext)) {
|
|
5509
5745
|
this.disableNext = false;
|
|
5510
5746
|
}
|
|
@@ -5512,52 +5748,91 @@ const EdsSteps = class {
|
|
|
5512
5748
|
};
|
|
5513
5749
|
this.steps = [];
|
|
5514
5750
|
this.type = 'static';
|
|
5751
|
+
this.orientation = 'vertical';
|
|
5515
5752
|
this.nextLabel = 'Next';
|
|
5516
5753
|
this.backLabel = 'Back';
|
|
5517
5754
|
this.finishLabel = 'Finish';
|
|
5518
5755
|
this.disableNext = false;
|
|
5519
5756
|
this.headingLevel = 'h4';
|
|
5757
|
+
this.collapsibleTitles = false;
|
|
5520
5758
|
this.activeStep = 0;
|
|
5521
5759
|
}
|
|
5760
|
+
handleDisableNextChange(newValue) {
|
|
5761
|
+
if (typeof newValue === 'string' && newValue.trim().startsWith('[')) {
|
|
5762
|
+
try {
|
|
5763
|
+
this.disableNext = JSON.parse(newValue);
|
|
5764
|
+
}
|
|
5765
|
+
catch (e) {
|
|
5766
|
+
console.error('Failed to parse disable-next array:', e);
|
|
5767
|
+
}
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5770
|
+
componentWillLoad() {
|
|
5771
|
+
this.handleDisableNextChange(this.disableNext);
|
|
5772
|
+
}
|
|
5522
5773
|
componentDidLoad() {
|
|
5523
|
-
var _a;
|
|
5524
5774
|
if (this.type === 'linear') {
|
|
5525
|
-
const
|
|
5775
|
+
const root = this.el.shadowRoot || this.el;
|
|
5776
|
+
const btns = root.querySelectorAll('eds-button');
|
|
5526
5777
|
btns === null || btns === void 0 ? void 0 : btns.forEach((btn) => this.emitContext(btn));
|
|
5527
5778
|
}
|
|
5528
5779
|
}
|
|
5529
5780
|
activeStepChanged(newValue) {
|
|
5781
|
+
// Clamp to valid range or collapsed sentinel
|
|
5782
|
+
const max = Math.max(0, this.parsedSteps.length - 1);
|
|
5783
|
+
if (newValue > max) {
|
|
5784
|
+
this.activeStep = max;
|
|
5785
|
+
return;
|
|
5786
|
+
}
|
|
5787
|
+
if (newValue < -1) {
|
|
5788
|
+
this.activeStep = -1;
|
|
5789
|
+
return;
|
|
5790
|
+
}
|
|
5791
|
+
// If collapsed (only possible in non-linear mode), do not emit context
|
|
5792
|
+
if (newValue < 0) {
|
|
5793
|
+
return;
|
|
5794
|
+
}
|
|
5530
5795
|
setTimeout(() => {
|
|
5531
|
-
|
|
5532
|
-
const
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
}
|
|
5796
|
+
const root = this.el.shadowRoot || this.el;
|
|
5797
|
+
const all = root.querySelectorAll('.step');
|
|
5798
|
+
const active = all && newValue < all.length ? all[newValue] : undefined;
|
|
5799
|
+
active === null || active === void 0 ? void 0 : active.querySelectorAll('eds-button').forEach((btn) => this.emitContext(btn));
|
|
5536
5800
|
}, 50);
|
|
5537
5801
|
}
|
|
5538
5802
|
emitContext(linkElement) {
|
|
5539
5803
|
const event = new CustomEvent('parentContext', {
|
|
5540
|
-
detail: {
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
}
|
|
5804
|
+
detail: { componentName: this.el.tagName.toLowerCase(), identifier: this.activeStep },
|
|
5805
|
+
bubbles: true,
|
|
5806
|
+
composed: true
|
|
5544
5807
|
});
|
|
5545
5808
|
linkElement.dispatchEvent(event);
|
|
5546
5809
|
}
|
|
5547
5810
|
get parsedSteps() {
|
|
5548
5811
|
return sharedUtils.parseData(this.steps);
|
|
5549
5812
|
}
|
|
5813
|
+
isStepDisabled(index) {
|
|
5814
|
+
if (Array.isArray(this.disableNext)) {
|
|
5815
|
+
return index < this.disableNext.length ? !!this.disableNext[index] : false;
|
|
5816
|
+
}
|
|
5817
|
+
return index === this.activeStep && !!this.disableNext;
|
|
5818
|
+
}
|
|
5550
5819
|
isNextDisabledFor(index) {
|
|
5551
|
-
return
|
|
5552
|
-
? !!this.disableNext[index] // per-step
|
|
5553
|
-
: index === this.activeStep && !!this.disableNext; // only active step
|
|
5820
|
+
return this.isStepDisabled(index);
|
|
5554
5821
|
}
|
|
5555
5822
|
/** Render the semantic heading element as a clickable control only in linear mode */
|
|
5556
5823
|
renderHeading(title, index$1) {
|
|
5557
5824
|
const Tag = this.headingLevel;
|
|
5558
5825
|
const isOpen = this.activeStep === index$1;
|
|
5559
5826
|
if (this.type === 'linear') {
|
|
5560
|
-
|
|
5827
|
+
let forwardBlocked = false;
|
|
5828
|
+
if (index$1 > this.activeStep) {
|
|
5829
|
+
for (let i = this.activeStep; i < index$1; i++) {
|
|
5830
|
+
if (this.isStepDisabled(i)) {
|
|
5831
|
+
forwardBlocked = true;
|
|
5832
|
+
break;
|
|
5833
|
+
}
|
|
5834
|
+
}
|
|
5835
|
+
}
|
|
5561
5836
|
const onKey = (e) => {
|
|
5562
5837
|
if (forwardBlocked) {
|
|
5563
5838
|
return;
|
|
@@ -5569,27 +5844,65 @@ const EdsSteps = class {
|
|
|
5569
5844
|
};
|
|
5570
5845
|
return (index.h(Tag, { class: `eds-steps__title ${forwardBlocked ? 'is-disabled' : ''}`, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-disabled": forwardBlocked ? 'true' : 'false', "aria-expanded": isOpen, "aria-controls": `eds-step-panel-${index$1}`, onClick: () => !forwardBlocked && this.handleTitleClick(index$1), onKeyDown: onKey }, title));
|
|
5571
5846
|
}
|
|
5572
|
-
return index.h(Tag,
|
|
5847
|
+
return (index.h(Tag, { class: `eds-steps__title ${this.collapsibleTitles && index$1 !== this.activeStep ? '' : ''}`, onClick: () => this.handleTitleClick(index$1) }, title));
|
|
5848
|
+
}
|
|
5849
|
+
/** Render horizontal step indicator */
|
|
5850
|
+
renderHorizontalIndicator(step, index$1) {
|
|
5851
|
+
const isActive = this.activeStep === index$1;
|
|
5852
|
+
const isCompleted = this.activeStep > index$1;
|
|
5853
|
+
let forwardBlocked = false;
|
|
5854
|
+
if (index$1 > this.activeStep) {
|
|
5855
|
+
for (let i = this.activeStep; i < index$1; i++) {
|
|
5856
|
+
if (this.isStepDisabled(i)) {
|
|
5857
|
+
forwardBlocked = true;
|
|
5858
|
+
break;
|
|
5859
|
+
}
|
|
5860
|
+
}
|
|
5861
|
+
}
|
|
5862
|
+
const onKey = (e) => {
|
|
5863
|
+
if (forwardBlocked) {
|
|
5864
|
+
return;
|
|
5865
|
+
}
|
|
5866
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
5867
|
+
e.preventDefault();
|
|
5868
|
+
this.handleTitleClick(index$1);
|
|
5869
|
+
}
|
|
5870
|
+
};
|
|
5871
|
+
return (index.h("div", { class: `horizontal-step ${isActive ? 'is-active' : ''} ${isCompleted ? 'is-completed' : ''}`, onClick: () => !forwardBlocked && this.handleTitleClick(index$1), onKeyDown: onKey, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-label": `Step ${index$1 + 1}: ${step.title}`, "aria-current": isActive ? 'step' : undefined, "aria-disabled": forwardBlocked ? 'true' : 'false' }, index.h("div", { class: "step-indicator" }, index.h("span", { class: "step-number" }, index$1 + 1)), index.h("span", { class: `text-center text-default f-ui-03 ${forwardBlocked ? 'opacity-50' : ''}` }, step.title)));
|
|
5573
5872
|
}
|
|
5574
5873
|
render() {
|
|
5575
5874
|
const steps = this.parsedSteps;
|
|
5875
|
+
// Horizontal Linear
|
|
5876
|
+
if (this.type === 'linear' && this.orientation === 'horizontal') {
|
|
5877
|
+
return (index.h("div", { class: "steps--horizontal", style: { '--step-count': steps.length.toString() } }, index.h("div", { class: "horizontal-indicators" }, steps.map((step, index) => this.renderHorizontalIndicator(step, index))), steps.map((step, index$1) => {
|
|
5878
|
+
const isLast = index$1 === steps.length - 1;
|
|
5879
|
+
if (this.activeStep !== index$1) {
|
|
5880
|
+
return null;
|
|
5881
|
+
}
|
|
5882
|
+
const marginClass = this.orientation === 'horizontal' ? 'mt-64' : 'mt-32';
|
|
5883
|
+
return (index.h("div", { class: "step-content", key: index$1, id: `eds-step-panel-${index$1}` }, index.h("slot", { name: `step-${index$1}` }, index.h("div", { class: "f-body-02 text-lighter", innerHTML: step.content })), index.h("div", { class: `flex items-center justify-between ${marginClass}` }, index.h("eds-button", { label: this.backLabel, intent: "ghost", icon: "chevron-left", iconPos: "left", iconSmall: true, onClick: this.handleBack, disabled: index$1 === 0, class: index$1 === 0 ? 'hidden' : 'block', size: "small" }), index.h("eds-button", { label: isLast ? this.finishLabel : this.nextLabel, intent: "primary", icon: "chevron-right", iconSmall: true, onClick: this.handleNext, disabled: this.isNextDisabledFor(index$1), size: "small", class: index$1 > 0 ? 'ml-8' : null })), index.h("slot", { name: `actions-${index$1}` })));
|
|
5884
|
+
})));
|
|
5885
|
+
}
|
|
5886
|
+
// Vertical Linear
|
|
5576
5887
|
if (this.type === 'linear') {
|
|
5577
5888
|
return (index.h("div", { class: "steps" }, steps.map((step, index$1) => {
|
|
5578
5889
|
const isLast = index$1 === steps.length - 1;
|
|
5579
|
-
|
|
5890
|
+
const marginClass = this.orientation === 'horizontal' ? 'mt-64' : 'mt-32';
|
|
5891
|
+
return (index.h("div", { class: "step mb-16", key: index$1 }, this.renderHeading(step.title, index$1), this.activeStep === index$1 && (index.h("div", { class: "content grid gap-y-16", id: `eds-step-panel-${index$1}` }, index.h("slot", { name: `step-${index$1}` }, index.h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content })), index.h("div", { class: `flex items-center justify-between ${marginClass}` }, index.h("eds-button", { label: this.backLabel, intent: "ghost", icon: "chevron-left", iconPos: "left", iconSmall: true, onClick: this.handleBack, disabled: index$1 === 0, class: index$1 === 0 ? 'hidden' : 'block', size: "small" }), index.h("eds-button", { label: isLast ? this.finishLabel : this.nextLabel, intent: "primary", icon: "chevron-right", iconSmall: true, onClick: this.handleNext, disabled: this.isNextDisabledFor(index$1), size: "small", class: index$1 > 0 ? 'ml-8' : null })), index.h("slot", { name: `actions-${index$1}` })))));
|
|
5580
5892
|
})));
|
|
5581
5893
|
}
|
|
5582
|
-
// Static
|
|
5583
|
-
return (index.h("div", { class: "steps" }, steps.map((step, index$1) => (index.h("div", { class: "step mb-
|
|
5894
|
+
// Static
|
|
5895
|
+
return (index.h("div", { class: "steps" }, steps.map((step, index$1) => (index.h("div", { class: "step mb-16", key: index$1 }, this.renderHeading(step.title, index$1), index.h("div", { class: "content", id: `eds-step-panel-${index$1}` }, index.h("slot", { name: `step-${index$1}` }, index.h("div", { class: "f-body-02 text-lighter my-16", innerHTML: step.content }))))))));
|
|
5584
5896
|
}
|
|
5585
5897
|
get el() { return index.getElement(this); }
|
|
5586
5898
|
static get watchers() { return {
|
|
5899
|
+
"disableNext": ["handleDisableNextChange"],
|
|
5587
5900
|
"activeStep": ["activeStepChanged"]
|
|
5588
5901
|
}; }
|
|
5589
5902
|
};
|
|
5590
5903
|
EdsSteps.style = EdsStepsStyle0;
|
|
5591
5904
|
|
|
5592
|
-
const edsStepsV2Css = ".steps{position:sticky;margin-left:16px;border-left:1px solid var(--soft-color, #ddd);padding-left:23px;counter-reset:step}.steps h3{counter-increment:step;font-size:var(--f-heading-05-fontSize);font-weight:var(--f-heading-05-fontWeight);line-height:var(--f-heading-05-lineHeight);position:relative}.steps h3::before{content:counter(step);position:absolute;left:-
|
|
5905
|
+
const edsStepsV2Css = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}.steps{position:sticky;margin-left:16px;border-left:1px solid var(--soft-color, #ddd);padding-left:23px;counter-reset:step}.steps h3{counter-increment:step;font-size:var(--f-heading-05-fontSize);font-weight:var(--f-heading-05-fontWeight);line-height:var(--f-heading-05-lineHeight);position:relative}.steps h3::before{content:counter(step);position:absolute;left:-41px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.steps h4,.steps h5{counter-increment:step;font-size:var(--f-heading-06-fontSize);font-weight:var(--f-heading-06-fontWeight);line-height:var(--f-heading-06-lineHeight);position:relative}.steps h4::before,.steps h5::before{content:counter(step);position:absolute;left:-40px;top:-2px;display:flex;align-items:center;justify-content:center;width:30px;height:30px;font-size:0.875rem;border:1px solid #ccc;background:#333;color:#fff;border-radius:50%}.steps blockquote{margin-top:16px;margin-bottom:16px;font-style:italic;color:#aaa;padding-left:6px}.steps-img-placeholder{width:100%;height:200px;background:linear-gradient(to bottom, #9CE142, #00C959, #00A595);}.bg-\\[\\#00A595\\]{--tw-bg-opacity:1;background-color:rgb(0 165 149 / var(--tw-bg-opacity))}.relative{position:relative}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.text-center{text-align:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.w-full{width:100%}.h-52{height:3.25rem}.h-96{height:6rem}.h-\\[200px\\]{height:200px}.justify-between{justify-content:space-between}.mt-16{margin-top:1rem}.mt-32{margin-top:2rem}.mt-64{margin-top:4rem}.my-16{margin-top:1rem;margin-bottom:1rem}.mb-12{margin-bottom:0.75rem}.last\\:mb-0:last-child{margin-bottom:0rem}.last\\:mt-16:last-child{margin-top:1rem}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.relative{position:relative}.flex{display:flex}.inline-flex{display:inline-flex}.grow{flex-grow:1}.rounded{border-radius:0.25rem}.rounded-lg{border-radius:16px}.rounded-t-lg{border-top-left-radius:16px;border-top-right-radius:16px}.border-2{border-width:2px}.p-8{padding:0.5rem}.p-24{padding:1.5rem}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.top-2{top:0.125rem}.bottom-2{bottom:0.125rem}.left-2{left:0.125rem}.right-2{right:0.125rem}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.overflow-hidden{overflow:hidden}.space-y-8{--tw-space-y-reverse:0;margin-top:calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem * var(--tw-space-y-reverse))}.space-y-16{--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.ml-8{margin-left:0.5rem}.gap-y-16{row-gap:1rem}.gap-x-16{-moz-column-gap:1rem;column-gap:1rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.block{display:block}.items-center{align-items:center}.px-8{padding-left:0.5rem;padding-right:0.5rem}.pb-20{padding-bottom:1.25rem}.eds-steps__title[role=\"button\"]{cursor:pointer}.eds-steps__title.is-disabled{cursor:not-allowed;color:rgba(0, 0, 0, 0.5);}.eds-steps__title.is-disabled::before{opacity:1;filter:none}.steps--horizontal{display:flex;flex-direction:column;gap:2rem}.horizontal-indicators{display:flex;justify-content:space-between;gap:1rem;padding:1rem 0}.horizontal-step{display:flex;flex-direction:column;align-items:center;gap:0.5rem;cursor:pointer;flex:1;position:relative}.horizontal-step:not(:last-child)::after{content:'';position:absolute;top:1.25rem;left:50%;width:100%;height:2px;background-color:#e0e0e0;z-index:-1}.horizontal-step.is-completed:not(:last-child)::after{background-color:var(--green-500);}.step-indicator{width:2.5rem;height:2.5rem;border-radius:50%;border:2px solid #e0e0e0;display:flex;align-items:center;justify-content:center;background-color:white;transition:all 0.3s ease;z-index:2}.horizontal-step.is-active .step-indicator{border-color:var(--green-500);background-color:var(--green-500);color:var(--white)}.horizontal-step.is-completed .step-indicator{border-color:var(--green-500);background-color:var(--white)}.horizontal-step.is-disabled{opacity:0.5;cursor:not-allowed}.step-number{font-weight:600;font-size:0.875rem}.step-label{font-size:0.875rem;text-align:center;font-weight:500}.horizontal-step.is-active .step-label{color:var(--green-500)}.step-content{padding:2rem 0;margin-left:calc((100% / var(--step-count, 1)) * 0.45 - 1.25rem);margin-right:calc((100% / var(--step-count, 1)) * 0.45 - 1.25rem)}.opacity-50{opacity:0.5}";
|
|
5593
5906
|
const EdsStepsV2Style0 = edsStepsV2Css;
|
|
5594
5907
|
|
|
5595
5908
|
const EdsStepsV2 = class {
|
|
@@ -5600,48 +5913,74 @@ const EdsStepsV2 = class {
|
|
|
5600
5913
|
this.next = index.createEvent(this, "next", 7);
|
|
5601
5914
|
this.back = index.createEvent(this, "back", 7);
|
|
5602
5915
|
this.handleTitleClick = (index) => {
|
|
5603
|
-
//
|
|
5604
|
-
if (
|
|
5605
|
-
|
|
5916
|
+
// In linear mode, do NOT collapse; only navigate if allowed.
|
|
5917
|
+
if (this.type === 'linear') {
|
|
5918
|
+
if (index > this.activeStep) {
|
|
5919
|
+
// Prevent jumping forward over disabled steps
|
|
5920
|
+
for (let i = this.activeStep; i < index; i++) {
|
|
5921
|
+
if (this.isStepDisabled(i)) {
|
|
5922
|
+
return;
|
|
5923
|
+
}
|
|
5924
|
+
}
|
|
5925
|
+
}
|
|
5926
|
+
this.activeStep = index;
|
|
5606
5927
|
this.step.emit(this.activeStep);
|
|
5607
5928
|
return;
|
|
5608
5929
|
}
|
|
5609
|
-
//
|
|
5610
|
-
|
|
5611
|
-
|
|
5930
|
+
// Non-linear vertical mode can toggle collapse of the current title
|
|
5931
|
+
if (this.orientation === 'vertical' && index === this.activeStep) {
|
|
5932
|
+
this.activeStep = this.activeStep === index ? -1 : index;
|
|
5933
|
+
this.step.emit(this.activeStep);
|
|
5612
5934
|
return;
|
|
5613
5935
|
}
|
|
5614
|
-
//
|
|
5936
|
+
// Otherwise just set
|
|
5615
5937
|
this.activeStep = index;
|
|
5616
5938
|
this.step.emit(this.activeStep);
|
|
5617
5939
|
};
|
|
5618
5940
|
this.handleNext = () => {
|
|
5619
5941
|
const lastIndex = this.parsedSteps.length - 1;
|
|
5942
|
+
// On last step: do NOT collapse; keep content visible, just emit finished
|
|
5620
5943
|
if (this.activeStep >= lastIndex) {
|
|
5621
5944
|
this.finished.emit();
|
|
5622
|
-
this.activeStep = -1; // collapse
|
|
5945
|
+
this.activeStep = -1; // collapse the content
|
|
5946
|
+
this.step.emit(this.activeStep); // notify change (-1 sentinel)
|
|
5623
5947
|
return;
|
|
5624
5948
|
}
|
|
5625
5949
|
const target = this.activeStep + 1;
|
|
5626
5950
|
this.next.emit(target);
|
|
5627
|
-
if (
|
|
5628
|
-
|
|
5629
|
-
|
|
5951
|
+
if (this.isStepDisabled(this.activeStep)) {
|
|
5952
|
+
return;
|
|
5953
|
+
}
|
|
5954
|
+
this.activeStep = target;
|
|
5955
|
+
this.step.emit(this.activeStep);
|
|
5956
|
+
// clear boolean form when moving away from a step
|
|
5957
|
+
if (!Array.isArray(this.disableNext)) {
|
|
5958
|
+
this.disableNext = false;
|
|
5630
5959
|
}
|
|
5631
5960
|
};
|
|
5632
5961
|
this.handleBack = () => {
|
|
5962
|
+
const lastIndex = this.parsedSteps.length - 1;
|
|
5963
|
+
// Recover from collapsed sentinel if it ever occurs
|
|
5964
|
+
if (this.activeStep < 0) {
|
|
5965
|
+
this.activeStep = lastIndex;
|
|
5966
|
+
this.step.emit(this.activeStep);
|
|
5967
|
+
return;
|
|
5968
|
+
}
|
|
5633
5969
|
if (this.activeStep > 0) {
|
|
5634
5970
|
const target = this.activeStep - 1;
|
|
5635
5971
|
this.back.emit(target);
|
|
5636
5972
|
this.activeStep = target;
|
|
5637
5973
|
this.step.emit(this.activeStep);
|
|
5974
|
+
if (!Array.isArray(this.disableNext)) {
|
|
5975
|
+
this.disableNext = false;
|
|
5976
|
+
}
|
|
5638
5977
|
}
|
|
5639
5978
|
};
|
|
5640
5979
|
this.steps = [];
|
|
5641
5980
|
this.type = 'static';
|
|
5981
|
+
this.orientation = 'vertical';
|
|
5642
5982
|
this.imageSrc = undefined;
|
|
5643
5983
|
this.imageWidth = undefined;
|
|
5644
|
-
this.bg = true;
|
|
5645
5984
|
this.message = undefined;
|
|
5646
5985
|
this.nextLabel = 'Next';
|
|
5647
5986
|
this.backLabel = 'Back';
|
|
@@ -5650,57 +5989,87 @@ const EdsStepsV2 = class {
|
|
|
5650
5989
|
this.headingLevel = 'h4';
|
|
5651
5990
|
this.activeStep = 0;
|
|
5652
5991
|
}
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5992
|
+
handleDisableNextChange(newValue) {
|
|
5993
|
+
if (typeof newValue === 'string' && newValue.trim().startsWith('[')) {
|
|
5994
|
+
try {
|
|
5995
|
+
this.disableNext = JSON.parse(newValue);
|
|
5996
|
+
}
|
|
5997
|
+
catch (e) {
|
|
5998
|
+
console.error('Failed to parse disable-next array:', e);
|
|
5999
|
+
}
|
|
5660
6000
|
}
|
|
5661
6001
|
}
|
|
5662
6002
|
activeStepChanged(newValue) {
|
|
6003
|
+
// Clamp and ignore collapsed sentinel
|
|
6004
|
+
const max = Math.max(0, this.parsedSteps.length - 1);
|
|
6005
|
+
if (newValue > max) {
|
|
6006
|
+
this.activeStep = max;
|
|
6007
|
+
return;
|
|
6008
|
+
}
|
|
6009
|
+
if (newValue < -1) {
|
|
6010
|
+
this.activeStep = -1;
|
|
6011
|
+
return;
|
|
6012
|
+
}
|
|
6013
|
+
if (newValue < 0) {
|
|
6014
|
+
return;
|
|
6015
|
+
} // ignore collapsed state if ever set elsewhere
|
|
6016
|
+
// Emit parentContext to buttons inside the newly active step
|
|
5663
6017
|
setTimeout(() => {
|
|
5664
|
-
|
|
5665
|
-
const activeStepContainer =
|
|
5666
|
-
|
|
5667
|
-
const btns = activeStepContainer.querySelectorAll('eds-button');
|
|
5668
|
-
btns.forEach((btn) => {
|
|
5669
|
-
this.emitContext(btn);
|
|
5670
|
-
});
|
|
5671
|
-
}
|
|
6018
|
+
const host = this.el.shadowRoot || this.el;
|
|
6019
|
+
const activeStepContainer = host.querySelectorAll('.step')[newValue];
|
|
6020
|
+
activeStepContainer === null || activeStepContainer === void 0 ? void 0 : activeStepContainer.querySelectorAll('eds-button').forEach((btn) => this.emitContext(btn));
|
|
5672
6021
|
}, 50);
|
|
5673
6022
|
}
|
|
6023
|
+
componentWillLoad() {
|
|
6024
|
+
this.handleDisableNextChange(this.disableNext);
|
|
6025
|
+
}
|
|
6026
|
+
componentDidLoad() {
|
|
6027
|
+
if (this.type === 'linear') {
|
|
6028
|
+
const host = this.el.shadowRoot || this.el;
|
|
6029
|
+
const btns = host.querySelectorAll('eds-button');
|
|
6030
|
+
btns === null || btns === void 0 ? void 0 : btns.forEach((btn) => this.emitContext(btn));
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
5674
6033
|
emitContext(linkElement) {
|
|
5675
6034
|
const event = new CustomEvent('parentContext', {
|
|
5676
6035
|
detail: {
|
|
5677
6036
|
componentName: this.el.tagName.toLowerCase(),
|
|
5678
6037
|
identifier: this.activeStep
|
|
5679
|
-
}
|
|
6038
|
+
},
|
|
6039
|
+
bubbles: true,
|
|
6040
|
+
composed: true
|
|
5680
6041
|
});
|
|
5681
6042
|
linkElement.dispatchEvent(event);
|
|
5682
6043
|
}
|
|
5683
6044
|
articleClasses() {
|
|
5684
|
-
return [
|
|
5685
|
-
this.bg ? 'bg-inverse' : 'bg-default',
|
|
5686
|
-
'border-softer effect-focus-within relative rounded-lg border-2'
|
|
5687
|
-
].join(' ');
|
|
6045
|
+
return ['border-softer effect-focus-within relative rounded-lg border-2'].join(' ');
|
|
5688
6046
|
}
|
|
5689
|
-
/**
|
|
5690
|
-
* Parses the steps property into an array of Step objects.
|
|
5691
|
-
*/
|
|
5692
6047
|
get parsedSteps() {
|
|
5693
6048
|
return sharedUtils.parseData(this.steps);
|
|
5694
6049
|
}
|
|
5695
|
-
|
|
5696
|
-
|
|
6050
|
+
isStepDisabled(index) {
|
|
6051
|
+
if (Array.isArray(this.disableNext)) {
|
|
6052
|
+
return index < this.disableNext.length ? !!this.disableNext[index] : false;
|
|
6053
|
+
}
|
|
6054
|
+
return index === this.activeStep && !!this.disableNext;
|
|
6055
|
+
}
|
|
6056
|
+
isNextDisabledFor(index) {
|
|
6057
|
+
return this.isStepDisabled(index);
|
|
5697
6058
|
}
|
|
5698
|
-
/** Render the semantic heading element */
|
|
5699
6059
|
renderHeading(title, index$1) {
|
|
5700
6060
|
const Tag = this.headingLevel;
|
|
5701
6061
|
if (this.type === 'linear') {
|
|
5702
6062
|
const isOpen = this.activeStep === index$1;
|
|
5703
|
-
|
|
6063
|
+
// Check if jumping to this step crosses a disabled step
|
|
6064
|
+
let forwardBlocked = false;
|
|
6065
|
+
if (index$1 > this.activeStep) {
|
|
6066
|
+
for (let i = this.activeStep; i < index$1; i++) {
|
|
6067
|
+
if (this.isStepDisabled(i)) {
|
|
6068
|
+
forwardBlocked = true;
|
|
6069
|
+
break;
|
|
6070
|
+
}
|
|
6071
|
+
}
|
|
6072
|
+
}
|
|
5704
6073
|
const onKey = (e) => {
|
|
5705
6074
|
if (forwardBlocked) {
|
|
5706
6075
|
return;
|
|
@@ -5712,16 +6081,46 @@ const EdsStepsV2 = class {
|
|
|
5712
6081
|
};
|
|
5713
6082
|
return (index.h(Tag, { class: `eds-steps__title ${forwardBlocked ? 'is-disabled' : ''}`, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-disabled": forwardBlocked ? 'true' : 'false', "aria-expanded": isOpen, "aria-controls": `eds-step-panel-${index$1}`, onClick: () => !forwardBlocked && this.handleTitleClick(index$1), onKeyDown: onKey }, title));
|
|
5714
6083
|
}
|
|
5715
|
-
return index.h(Tag, { class: "eds-steps__title" }, title);
|
|
6084
|
+
return (index.h(Tag, { class: "eds-steps__title", onClick: () => this.handleTitleClick(index$1) }, title));
|
|
6085
|
+
}
|
|
6086
|
+
/** Render horizontal indicator item */
|
|
6087
|
+
renderHorizontalIndicator(step, index$1) {
|
|
6088
|
+
const isActive = this.activeStep === index$1;
|
|
6089
|
+
const isCompleted = this.activeStep > index$1;
|
|
6090
|
+
let forwardBlocked = false;
|
|
6091
|
+
if (index$1 > this.activeStep) {
|
|
6092
|
+
for (let i = this.activeStep; i < index$1; i++) {
|
|
6093
|
+
if (this.isStepDisabled(i)) {
|
|
6094
|
+
forwardBlocked = true;
|
|
6095
|
+
break;
|
|
6096
|
+
}
|
|
6097
|
+
}
|
|
6098
|
+
}
|
|
6099
|
+
const onKey = (e) => {
|
|
6100
|
+
if (forwardBlocked) {
|
|
6101
|
+
return;
|
|
6102
|
+
}
|
|
6103
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
6104
|
+
e.preventDefault();
|
|
6105
|
+
this.handleTitleClick(index$1);
|
|
6106
|
+
}
|
|
6107
|
+
};
|
|
6108
|
+
return (index.h("div", { class: `horizontal-step ${isActive ? 'is-active' : ''} ${isCompleted ? 'is-completed' : ''}`, onClick: () => !forwardBlocked && this.handleTitleClick(index$1), onKeyDown: onKey, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-label": `Step ${index$1 + 1}: ${step.title}`, "aria-current": isActive ? 'step' : undefined, "aria-disabled": forwardBlocked ? 'true' : 'false' }, index.h("div", { class: "step-indicator" }, index.h("span", { class: "step-number" }, index$1 + 1)), index.h("span", { class: `text-center text-default f-ui-03 ${forwardBlocked ? 'opacity-50' : ''}` }, step.title)));
|
|
5716
6109
|
}
|
|
5717
6110
|
render() {
|
|
5718
6111
|
const steps = this.parsedSteps;
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
6112
|
+
const marginClass = this.orientation === 'horizontal' ? 'mt-64' : 'mt-32';
|
|
6113
|
+
return (index.h("div", { key: '0f9dbb87f9cd269057183ee969addd55e85b2149', class: this.articleClasses() }, this.imageSrc ? (index.h("div", { class: "w-full mb-12 rounded-t-lg overflow-hidden border-2" }, index.h("eds-img", { src: this.imageSrc, width: this.imageWidth, "with-bg": "true", "lazy-load": "true", alt: "Step illustration" }))) : (this.message && (index.h("div", { class: "w-full bg-[#00A595] rounded-t-lg border-2" }, index.h("div", { class: "p-24" }, index.h("span", { class: "text-inverse f-heading-04" }, this.message))))), index.h("div", { key: 'd636d36c2e95d73c23c269b1faf67870eca97c16', class: "mt-16 pb-20 px-8" }, this.type === 'linear' && this.orientation === 'horizontal' ? (index.h("div", { class: "steps--horizontal", style: { '--step-count': steps.length.toString() } }, index.h("div", { class: "horizontal-indicators" }, steps.map((step, index) => this.renderHorizontalIndicator(step, index))), steps.map((step, index$1) => {
|
|
6114
|
+
const isLast = index$1 === steps.length - 1;
|
|
6115
|
+
if (this.activeStep !== index$1) {
|
|
6116
|
+
return null;
|
|
6117
|
+
}
|
|
6118
|
+
return (index.h("div", { class: "step-content", key: index$1, id: `eds-step-panel-${index$1}` }, index.h("slot", { name: `step-${index$1}` }, index.h("div", { class: "f-body-02 text-lighter", innerHTML: step.content })), index.h("div", { class: `flex items-center justify-between ${marginClass}` }, index.h("eds-button", { label: this.backLabel, intent: "ghost", icon: "chevron-left", iconPos: "left", iconSmall: true, onClick: this.handleBack, disabled: index$1 === 0, class: index$1 === 0 ? 'hidden' : 'block', size: "small" }), index.h("eds-button", { label: isLast ? this.finishLabel : this.nextLabel, intent: "primary", icon: "chevron-right", iconSmall: true, onClick: this.handleNext, disabled: this.isNextDisabledFor(index$1), size: "small", class: index$1 > 0 ? 'ml-8' : null })), index.h("slot", { name: `actions-${index$1}` })));
|
|
6119
|
+
}))) : this.type === 'linear' ? (index.h("div", { class: "steps" }, steps.map((step, index$1) => (index.h("div", { class: index$1 === 0 ? 'step' : 'step mt-16', key: index$1 }, this.renderHeading(step.title, index$1), this.activeStep === index$1 && (index.h("div", { class: "content grid gap-y-16", id: `eds-step-panel-${index$1}` }, index.h("slot", { name: `step-${index$1}` }, index.h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content })), index.h("div", { class: `flex items-center justify-between ${marginClass}` }, index.h("eds-button", { label: this.backLabel, intent: "ghost", icon: "chevron-left", iconPos: "left", iconSmall: true, onClick: this.handleBack, disabled: index$1 === 0, class: index$1 === 0 ? 'hidden' : 'block', size: "small" }), index.h("eds-button", { label: index$1 === steps.length - 1 ? this.finishLabel : this.nextLabel, intent: "primary", icon: "chevron-right", iconSmall: true, onClick: this.handleNext, disabled: this.isNextDisabledFor(index$1), size: "small", class: index$1 > 0 ? 'ml-8' : null }))))))))) : (index.h("div", { class: "steps space-y-8" }, steps.map((step, index$1) => (index.h("div", { class: "step", key: index$1 }, this.renderHeading(step.title, index$1), index.h("div", { class: "content", id: `eds-step-panel-${index$1}` }, index.h("div", { class: "content-body" }, index.h("slot", { name: `step-${index$1}` }, index.h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content }))))))))))));
|
|
5722
6120
|
}
|
|
5723
6121
|
get el() { return index.getElement(this); }
|
|
5724
6122
|
static get watchers() { return {
|
|
6123
|
+
"disableNext": ["handleDisableNextChange"],
|
|
5725
6124
|
"activeStep": ["activeStepChanged"]
|
|
5726
6125
|
}; }
|
|
5727
6126
|
};
|
|
@@ -5777,17 +6176,17 @@ const EdsSwitch = class {
|
|
|
5777
6176
|
: this.labelOff
|
|
5778
6177
|
: 'Toggle switch'
|
|
5779
6178
|
: undefined;
|
|
5780
|
-
return (index.h("div", { key: '
|
|
6179
|
+
return (index.h("div", { key: '0ee7bcdc3d6bb78881c310e36e5189e5ef99bab0', class: "switch-container" }, this.labelOff && (index.h("span", { key: '858c4a43ccc633530d4e13a6bfa8115194ff5082', id: `${switchId}-off`, class: "switch-label switch-label--off mr-8" }, this.labelOff)), index.h("button", { key: 'faa59b03c46dd814c4125534a88fd7564b02205a', id: switchId, tabindex: this.disabled ? '-1' : '0', type: "button", role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-labelledby": labelledBy.length > 0 ? labelledBy.join(' ') : undefined, "aria-label": accessibleLabel, class: {
|
|
5781
6180
|
switch: true,
|
|
5782
6181
|
'switch--checked': this.checked,
|
|
5783
6182
|
'switch--disabled': this.disabled
|
|
5784
|
-
}, onClick: this.toggleSwitch, onKeyDown: this.handleKeyDown, disabled: this.disabled }, index.h("span", { key: '
|
|
6183
|
+
}, onClick: this.toggleSwitch, onKeyDown: this.handleKeyDown, disabled: this.disabled }, index.h("span", { key: '74db0f827a4f50dd77b88e0d372cbef1adb10f87', class: "switch-handle" })), this.labelOn && (index.h("span", { key: '2648bb13d533bc9fde1dc04af9cfd7116dadd581', id: `${switchId}-on`, class: "switch-label switch-label--on ml-8" }, this.labelOn))));
|
|
5785
6184
|
}
|
|
5786
6185
|
get el() { return index.getElement(this); }
|
|
5787
6186
|
};
|
|
5788
6187
|
EdsSwitch.style = EdsSwitchStyle0;
|
|
5789
6188
|
|
|
5790
|
-
const edsTableCss = "table{text-indent:0;border-color:inherit;border-collapse:collapse;}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.p-4{padding:0.25rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-8{padding-left:0.5rem;padding-right:0.5rem}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}";
|
|
6189
|
+
const edsTableCss = "table{text-indent:0;border-color:inherit;border-collapse:collapse;}tr.table-row-default{background-color:transparent}tr.table-row-color:nth-child(even){background-color:var(--grey-100)}tr.table-row-color:nth-child(odd){background-color:transparent}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.p-4{padding:0.25rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-8{padding-left:0.5rem;padding-right:0.5rem}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}";
|
|
5791
6190
|
const EdsTableStyle0 = edsTableCss;
|
|
5792
6191
|
|
|
5793
6192
|
const EdsTable = class {
|
|
@@ -5823,6 +6222,24 @@ const EdsTable = class {
|
|
|
5823
6222
|
}
|
|
5824
6223
|
(_a = actionButtons[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
5825
6224
|
};
|
|
6225
|
+
this.handleSort = (column) => {
|
|
6226
|
+
if (this.sortColumn === column) {
|
|
6227
|
+
// Toggle direction if same column
|
|
6228
|
+
this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';
|
|
6229
|
+
}
|
|
6230
|
+
else {
|
|
6231
|
+
// New column, default to ascending
|
|
6232
|
+
this.sortColumn = column;
|
|
6233
|
+
this.sortDirection = 'asc';
|
|
6234
|
+
}
|
|
6235
|
+
analytics.sendAnalytics({
|
|
6236
|
+
category: 'ui-component',
|
|
6237
|
+
parentContext: null,
|
|
6238
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/sort`,
|
|
6239
|
+
name: column,
|
|
6240
|
+
action: this.sortDirection
|
|
6241
|
+
});
|
|
6242
|
+
};
|
|
5826
6243
|
this.data = null;
|
|
5827
6244
|
this.config = {};
|
|
5828
6245
|
this.rowsPerPage = 10;
|
|
@@ -5832,6 +6249,8 @@ const EdsTable = class {
|
|
|
5832
6249
|
this.columnSize = 'default';
|
|
5833
6250
|
this.actions = [];
|
|
5834
6251
|
this.actionTemplate = undefined;
|
|
6252
|
+
this.sortingEnabled = false;
|
|
6253
|
+
this.theme = 'color';
|
|
5835
6254
|
this.parsedActions = [];
|
|
5836
6255
|
this.dataColumns = [];
|
|
5837
6256
|
this.tbData = [];
|
|
@@ -5841,6 +6260,8 @@ const EdsTable = class {
|
|
|
5841
6260
|
this.totalRows = 0;
|
|
5842
6261
|
this.searchQuery = '';
|
|
5843
6262
|
this.containerWidth = 0;
|
|
6263
|
+
this.sortColumn = null;
|
|
6264
|
+
this.sortDirection = 'asc';
|
|
5844
6265
|
}
|
|
5845
6266
|
handleDataChange() {
|
|
5846
6267
|
this.parseData();
|
|
@@ -5923,10 +6344,10 @@ const EdsTable = class {
|
|
|
5923
6344
|
return this.tbData.filter((row) => Object.values(row).some((value) => value.toString().toLowerCase().includes(this.searchQuery.toLowerCase())));
|
|
5924
6345
|
}
|
|
5925
6346
|
getPaginatedRows() {
|
|
5926
|
-
const
|
|
5927
|
-
this.totalRows =
|
|
6347
|
+
const sortedRows = this.getSortedRows();
|
|
6348
|
+
this.totalRows = sortedRows.length;
|
|
5928
6349
|
const start = (this.currentPage - 1) * this.rowsPerPage;
|
|
5929
|
-
return
|
|
6350
|
+
return sortedRows.slice(start, start + this.rowsPerPage);
|
|
5930
6351
|
}
|
|
5931
6352
|
handlePageChange(newPage) {
|
|
5932
6353
|
this.currentPage = newPage;
|
|
@@ -6006,22 +6427,52 @@ const EdsTable = class {
|
|
|
6006
6427
|
capitalize(str) {
|
|
6007
6428
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
6008
6429
|
}
|
|
6430
|
+
getSortedRows() {
|
|
6431
|
+
const filtered = this.getFilteredRows();
|
|
6432
|
+
if (!this.sortColumn) {
|
|
6433
|
+
return filtered;
|
|
6434
|
+
}
|
|
6435
|
+
return [...filtered].sort((a, b) => {
|
|
6436
|
+
const aVal = a[this.sortColumn];
|
|
6437
|
+
const bVal = b[this.sortColumn];
|
|
6438
|
+
// Handle null/undefined
|
|
6439
|
+
if (aVal == null) {
|
|
6440
|
+
return 1;
|
|
6441
|
+
}
|
|
6442
|
+
if (bVal == null) {
|
|
6443
|
+
return -1;
|
|
6444
|
+
}
|
|
6445
|
+
// Compare values
|
|
6446
|
+
let comparison = 0;
|
|
6447
|
+
if (typeof aVal === 'number' && typeof bVal === 'number') {
|
|
6448
|
+
comparison = aVal - bVal;
|
|
6449
|
+
}
|
|
6450
|
+
else {
|
|
6451
|
+
comparison = String(aVal).localeCompare(String(bVal));
|
|
6452
|
+
}
|
|
6453
|
+
return this.sortDirection === 'asc' ? comparison : -comparison;
|
|
6454
|
+
});
|
|
6455
|
+
}
|
|
6009
6456
|
render() {
|
|
6010
6457
|
const currentContainerWidth = this.hostWidth && this.hostWidth.trim() !== '' ? Number(this.hostWidth) : this.containerWidth || 400;
|
|
6011
6458
|
const visibleColumnsCount = this.getVisibleColumnsCount();
|
|
6012
6459
|
const columnWidth = visibleColumnsCount > 0 ? Math.floor((currentContainerWidth / visibleColumnsCount) * this.divisionFactor()) : 100;
|
|
6013
6460
|
const paginatedRows = this.getPaginatedRows();
|
|
6014
6461
|
const lastPage = Math.ceil(this.totalRows / this.rowsPerPage);
|
|
6015
|
-
return (index.h("div", { key: '
|
|
6462
|
+
return (index.h("div", { key: '0601cea60a05d044a717219e6ff6385ef915defa' }, this.searchEnabled && (index.h("div", { key: 'de1affaf192dc5e63b16d534d2f518c206ab7010' }, index.h("eds-input-field", { key: 1, icon: "search", name: "search", "aria-label": "Search", type: "text", placeholder: "Search...", onInput: (event) => this.handleSearch(event) }))), index.h("div", { key: '49f71b5a2481d719cb8fe0547f05a5ae83ad5541', class: "mt-20" }, index.h("table", { key: 'b63ca6615ed681c741fb2d3ff2675f9cc061d194', class: "block overflow-x-auto mt-6 p-0" }, index.h("thead", { key: '817b534cca3c2492b69b3816a41b54ec850847ab' }, index.h("tr", { key: '6cb8735ac56c3fe2acc4a257815bc0d07009118c', class: `m-0 p-0 border border-softer table-row-${this.theme}` }, this.columns.map((col) => {
|
|
6016
6463
|
var _a;
|
|
6017
6464
|
if (col === 'actions') {
|
|
6018
6465
|
return (index.h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 4}px` } }));
|
|
6019
6466
|
}
|
|
6020
6467
|
if (!((_a = this.parsedConfig[col]) === null || _a === void 0 ? void 0 : _a.hidden)) {
|
|
6021
|
-
return (index.h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 4}px` } }, this.capitalize(col))
|
|
6468
|
+
return (index.h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 4}px` } }, index.h("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '0.25rem' } }, index.h("span", null, this.capitalize(col)), this.sortingEnabled && (index.h("eds-icon-wrapper", { icon: this.sortColumn === col
|
|
6469
|
+
? this.sortDirection === 'asc'
|
|
6470
|
+
? 'chevron-up'
|
|
6471
|
+
: 'chevron-down'
|
|
6472
|
+
: 'chevron-down', "aria-label": `Sort by ${col}`, onClick: () => this.handleSort(col), style: { cursor: 'pointer' } })))));
|
|
6022
6473
|
}
|
|
6023
6474
|
return null;
|
|
6024
|
-
}))), index.h("tbody", { key: '
|
|
6475
|
+
}))), index.h("tbody", { key: '3c8630ed1f47720688bfcdb78c5dbfc84cb238cf' }, paginatedRows.map((row) => (index.h("tr", { class: `m-0 p-0 border border-softer table-row-${this.theme}` }, this.columns.map((col) => {
|
|
6025
6476
|
var _a;
|
|
6026
6477
|
if (col === 'actions') {
|
|
6027
6478
|
return (index.h("td", { class: "text-center border border-softer m-0 f-ui-02 break-words actions-cell", style: { minWidth: `${columnWidth - 4}px` } }, index.h("div", { role: "toolbar", "aria-label": "Row actions", onKeyDown: this.onActionKeyDown, style: {
|
|
@@ -6036,7 +6487,7 @@ const EdsTable = class {
|
|
|
6036
6487
|
return (index.h("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${columnWidth - 4}px` } }, this.renderCell(row[col], col)));
|
|
6037
6488
|
}
|
|
6038
6489
|
return null;
|
|
6039
|
-
}))))))), this.shouldEnablePagination() && (index.h("div", { key: '
|
|
6490
|
+
}))))))), this.shouldEnablePagination() && (index.h("div", { key: '09faef418edc676bb2b60c2439e0652a92fe023d', class: "mt-20" }, index.h("eds-pagination", { key: '9403d33a37505c73fe3bec652ef93f533bdb4f03', currentPage: this.currentPage, lastPage: lastPage, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })))));
|
|
6040
6491
|
}
|
|
6041
6492
|
get hostEl() { return index.getElement(this); }
|
|
6042
6493
|
static get watchers() { return {
|
|
@@ -6211,12 +6662,12 @@ const EdsTabs = class {
|
|
|
6211
6662
|
}
|
|
6212
6663
|
}
|
|
6213
6664
|
render() {
|
|
6214
|
-
return (index.h("div", { key: '
|
|
6665
|
+
return (index.h("div", { key: '94766d744d61eb8d1eef51393621f85b06af822f', id: `${this.identifier}` }, index.h("div", { key: 'd76f26bd4e70baebab9fed6c61df26b496d899a5', class: "scroller-x overflow-x-auto relative z-[1] mx-auto px-16 pt-8 lg:px-28 after:border-soft before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']" }, index.h("nav", { key: '74afc95f82764cedb44b99a482bedc7b5f918196', role: "tablist", ref: (el) => (this.tabContainer = el), class: "inline-flex", "aria-label": this.navAriaLabel }, this.parsedTabs.map((tab, index$1) => {
|
|
6215
6666
|
const TabComponent = 'button';
|
|
6216
6667
|
const tabProps = this.getTabOptions(tab.active, index$1);
|
|
6217
6668
|
const isActive = index$1 === this.activeIndex;
|
|
6218
6669
|
return (index.h(TabComponent, Object.assign({}, tabProps, { type: "button", role: "tab", "aria-selected": tab.active ? 'true' : 'false', tabIndex: isActive ? 0 : -1, "aria-label": tab.ariaLabel || tab.label, "aria-controls": `panel-${index$1}`, id: `tab-${index$1}`, ref: (el) => this.setTabRef(el, index$1), onClick: () => this.handleTabClick(index$1, tab.label, true), onKeyDown: (e) => this.onKeyDown(e, index$1) }), tab.label || tab.ariaLabel));
|
|
6219
|
-
}))), index.h("div", { key: '
|
|
6670
|
+
}))), index.h("div", { key: '4652dc3741f95ccfac7d53e5e49607515f559ce1', class: "tab-panels" }, this.parsedTabs.map((_, index$1) => (index.h("div", { role: "tabpanel", id: `panel-${index$1}`, "aria-labelledby": `tab-${index$1}`, hidden: index$1 !== this.activeIndex, tabIndex: index$1 === this.activeIndex ? 0 : -1, class: "effect-focus" }, index.h("slot", { name: `panel-${index$1}` })))))));
|
|
6220
6671
|
}
|
|
6221
6672
|
get el() { return index.getElement(this); }
|
|
6222
6673
|
static get watchers() { return {
|
|
@@ -6261,7 +6712,7 @@ const EdsTag = class {
|
|
|
6261
6712
|
}
|
|
6262
6713
|
render() {
|
|
6263
6714
|
const classes = tagStyles({ intent: this.intent, size: this.size });
|
|
6264
|
-
return index.h("span", { key: '
|
|
6715
|
+
return index.h("span", { key: 'ef36f799cf3226ccf281428929e75326ea6a06e4', class: classes }, this.label);
|
|
6265
6716
|
}
|
|
6266
6717
|
};
|
|
6267
6718
|
EdsTag.style = EdsTagStyle0;
|
|
@@ -6357,7 +6808,7 @@ const EdsTooltip = class {
|
|
|
6357
6808
|
}
|
|
6358
6809
|
render() {
|
|
6359
6810
|
const positionClass = this.position === 'bottom' ? 'top-full mt-2' : 'bottom-full mb-2';
|
|
6360
|
-
return (index.h("div", { key: '
|
|
6811
|
+
return (index.h("div", { key: '1c56a6c10a841575d1450750d2aaf55f9f42f6ee', class: "relative w-full inline-block group" }, index.h("slot", { key: '631775de9a60642ec51de32708e0d6a0c2c27b66' }), index.h("div", { key: '9def7dbbc301f465b81ff0e77b182be90d0893de', class: `absolute ${positionClass}
|
|
6361
6812
|
rounded-xs bg-strongest text-inverse
|
|
6362
6813
|
f-ui-03-light pointer-events-none
|
|
6363
6814
|
z-10 px-4 opacity-0 transition-opacity duration-150 ease-in-out
|
|
@@ -6412,7 +6863,7 @@ const EdsUser = class {
|
|
|
6412
6863
|
render() {
|
|
6413
6864
|
const user = this.parsedUser;
|
|
6414
6865
|
const iconName = this.expanded ? 'chevron-down' : 'chevron-right';
|
|
6415
|
-
return (index.h("div", { key: '
|
|
6866
|
+
return (index.h("div", { key: 'a16f22ec9cc18d2904ea687cbcc56099ea6273ea', class: "block" }, index.h("div", { key: 'f2f52774b7d5fee5169a0e944f0f9d871421da89', class: "flex items-center" }, index.h("eds-dropdown", { key: '5232b88c109f2e4957f3582113750d49b1bc025c', ref: (el) => (this.dropdownEl = el), label: this.dropdownLabel, intent: this.intent, "aria-label": "User Menu", "dropdown-pos": "right", "dropdown-offset": "false", icon: iconName, class: "text-default", onDropdown: this.handleDropdown }, index.h("div", { key: '476d9ae9f4812611ae06d0dd1aecb08f0751742a', class: "min-w-[280px] p-8" }, index.h("div", { key: 'ad74767750213daf55029741a4ed4c8b32f55a27', class: "flex gap-x-16", "data-dropdown-no-close": true }, index.h("eds-avatar", { key: '64bcf2b15cc095143919d5e6a255498d77260607', "first-name": user.given_name, "last-name": user.family_name, initials: this.initials, color: "black" }), index.h("div", { key: 'b3850b7c774b5434fc41dd0fad6a88c9835d4946', class: "max-w-full" }, user.name && index.h("p", { key: '74027025ccd58fa4f4016699ebb3f4f541cea858', class: "f-ui-01 text-default w-full text-ellipsis" }, user.name), user.preferred_username && index.h("p", { key: '850f015e7a19a8f711cf22477daa5119d4211e15', class: "f-ui-03-light text-light mt-4" }, user.preferred_username), user.email && index.h("p", { key: '414e6ec14738be04b9b4e5e1fe99a4f263eb2e3b', class: "f-ui-03-light text-light mt-4" }, user.email))), index.h("div", { key: '9b12da0776f6d63461c5fd7201bdccb35f430610', class: "text-default flex w-full flex-col gap-y-8" }, index.h("slot", { key: '867b2ce8149f402ae879bd2fab689b252abed95c' })))))));
|
|
6416
6867
|
}
|
|
6417
6868
|
get hostEl() { return index.getElement(this); }
|
|
6418
6869
|
};
|
|
@@ -6444,6 +6895,7 @@ exports.eds_matomo_notice = EdsMatomoNotice;
|
|
|
6444
6895
|
exports.eds_nps = EdsNps;
|
|
6445
6896
|
exports.eds_pagination = EdsPagination;
|
|
6446
6897
|
exports.eds_rating = EdsRating;
|
|
6898
|
+
exports.eds_sidebar = EdsSidebar;
|
|
6447
6899
|
exports.eds_spinner = EdsSpinner;
|
|
6448
6900
|
exports.eds_steps = EdsSteps;
|
|
6449
6901
|
exports.eds_steps_v2 = EdsStepsV2;
|