@ebrains/components 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/clone-846acfdd.js +5 -0
- package/dist/cjs/color-primary-palette_6.cjs.entry.js +15 -15
- package/dist/cjs/components-section.cjs.entry.js +2 -2
- package/dist/cjs/components.cjs.js +2 -2
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +2 -2
- package/dist/cjs/docs-palettes.cjs.entry.js +2 -2
- package/dist/cjs/docs-tokens.cjs.entry.js +2 -2
- package/dist/cjs/edit-ff5b84d8.js +5 -0
- package/dist/cjs/{eds-avatar_26.cjs.entry.js → eds-accordion_33.cjs.entry.js} +3467 -157
- package/dist/cjs/eds-app-root.cjs.entry.js +2 -2
- package/dist/cjs/eds-card-desc_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-card-generic.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-project.cjs.entry.js +2 -2
- package/dist/cjs/eds-card-section.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tags.cjs.entry.js +2 -2
- package/dist/cjs/eds-card-tool.cjs.entry.js +2 -2
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +2 -2
- package/dist/cjs/eds-feedback.cjs.entry.js +2 -2
- package/dist/cjs/eds-footer.cjs.entry.js +9 -3
- package/dist/cjs/eds-frame.cjs.entry.js +2 -2
- package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +1 -1
- package/dist/cjs/eds-gauge.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-bin.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-bookmark.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-clone.cjs.entry.js +18 -0
- package/dist/cjs/eds-icon-close.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-copy.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-draft.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-edit.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-eu.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-external.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-loader.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-menu.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-minus.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-more.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-paper.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-plus.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-portal.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-private.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-public.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-search.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-star.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-start.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-success.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-thumbs-down.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-thumbs-up.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-tutorial.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-unknown.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-updown.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-user.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-view.cjs.entry.js +18 -0
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +2 -2
- package/dist/cjs/eds-modal.cjs.entry.js +3 -3
- package/dist/cjs/eds-pie.cjs.entry.js +1 -1
- package/dist/cjs/eds-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/eds-section-core_2.cjs.entry.js +4 -4
- package/dist/cjs/eds-social-networks.cjs.entry.js +2 -2
- package/dist/cjs/eds-spinner.cjs.entry.js +2 -2
- package/dist/cjs/eds-splash-screen.cjs.entry.js +1 -1
- package/dist/cjs/eds-timeline.cjs.entry.js +2 -2
- package/dist/cjs/eds-toast-manager.cjs.entry.js +2 -2
- package/dist/cjs/eds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/eds-trl.cjs.entry.js +2 -2
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +2 -2
- package/dist/cjs/{index-88c8039f.js → index-0249a32e.js} +15 -28
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/logo-space.cjs.entry.js +2 -2
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +3 -3
- package/dist/cjs/logo-variations-tabs.cjs.entry.js +2 -2
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +2 -2
- package/dist/cjs/svg-repository.cjs.entry.js +8 -4
- package/dist/cjs/token-list_3.cjs.entry.js +4 -4
- package/dist/cjs/token-ratios.cjs.entry.js +2 -2
- package/dist/cjs/token-spacing.cjs.entry.js +2 -2
- package/dist/cjs/token-typography.cjs.entry.js +2 -2
- package/dist/cjs/view-80d5c6c8.js +5 -0
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/eds-accordion/eds-accordion.js +1 -1
- package/dist/collection/components/eds-alert/eds-alert.js +30 -3
- 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.css +4 -0
- package/dist/collection/components/eds-button/eds-button.js +19 -8
- 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-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-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 +36 -0
- 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-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 +1 -1
- 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 +36 -0
- 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 +3 -2
- package/dist/collection/components/eds-link/eds-link.js +27 -7
- package/dist/collection/components/eds-link/eds-link.stories.js +3 -1
- 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-npm.stories.js +36 -0
- package/dist/collection/components/eds-nps/eds-nps.css +73 -0
- package/dist/collection/components/eds-nps/eds-nps.js +163 -0
- package/dist/collection/components/eds-pagination/eds-pagination.css +4 -0
- package/dist/collection/components/eds-pagination/eds-pagination.js +130 -50
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- package/dist/collection/components/eds-rating/eds-rating.js +25 -3
- 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-spinner/eds-spinner.js +1 -1
- package/dist/collection/components/eds-switch/eds-switch.css +15 -5
- package/dist/collection/components/eds-switch/eds-switch.js +26 -4
- package/dist/collection/components/eds-table/eds-table.js +38 -37
- package/dist/collection/components/eds-table/eds-table.stories.js +1 -1
- package/dist/collection/components/eds-tag/eds-tag.js +1 -1
- package/dist/collection/components/eds-timeline/eds-timeline.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/eds-docs-ui/colors/color-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/secondary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/support.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/secondary.js +7 -7
- package/dist/collection/eds-docs-ui/colors/gradient-palette/support.js +3 -3
- package/dist/collection/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/components-section/components-section.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/docs-tokens/docs-tokens.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +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-feedback/eds-feedback.js +1 -1
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +8 -2
- package/dist/collection/shared-ui/eds-form/eds-form.js +26 -4
- package/dist/collection/shared-ui/eds-form/eds-form.stories.js +1 -1
- package/dist/collection/shared-ui/eds-frame/eds-frame.js +1 -1
- package/dist/collection/shared-ui/eds-header/eds-header.js +1 -1
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.css +26 -5
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +89 -31
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/shared-ui/eds-user/eds-user.js +1 -1
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/collection/utils/eds-form/formValidators.js +33 -0
- package/dist/components/clone.js +3 -0
- package/dist/components/components-section.js +1 -1
- package/dist/components/components.css +7 -9
- 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/edit.js +1 -1
- package/dist/components/eds-accordion2.js +1 -1
- package/dist/components/eds-alert2.js +21 -5
- 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 +21 -10
- package/dist/components/eds-card-desc2.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 +8 -2
- package/dist/components/eds-form.js +80 -22
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-gauge.js +1 -1
- package/dist/components/eds-header.js +1 -1
- 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.d.ts +11 -0
- package/dist/components/eds-icon-clone.js +33 -0
- package/dist/components/eds-icon-close.js +1 -1
- package/dist/components/eds-icon-copy.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 +1 -1
- package/dist/components/eds-icon-user.js +1 -1
- package/dist/components/eds-icon-view.d.ts +11 -0
- package/dist/components/eds-icon-view.js +33 -0
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +2 -2
- package/dist/components/eds-input-field2.js +4 -3
- package/dist/components/eds-input-footer2.js +1 -1
- package/dist/components/eds-input-label2.js +1 -1
- package/dist/components/eds-input-range2.js +1 -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 +27 -7
- package/dist/components/eds-logo2.js +1 -1
- package/dist/components/eds-modal.js +2 -2
- package/dist/components/eds-nps.d.ts +11 -0
- package/dist/components/eds-nps.js +6 -0
- package/dist/components/eds-nps2.js +120 -0
- package/dist/components/eds-pagination2.js +119 -52
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating2.js +25 -3
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/eds-switch.js +27 -5
- package/dist/components/eds-table2.js +45 -20
- package/dist/components/eds-tabs.js +90 -32
- 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-tooltip.js +1 -1
- package/dist/components/eds-trl.js +8 -2
- package/dist/components/eds-user.js +3 -9
- package/dist/components/incorrect-use-of-colors.js +9 -3
- package/dist/components/logo-space.js +8 -2
- 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-05654483.entry.js +1 -0
- package/dist/components/{p-9e53eca3.entry.js → p-09079c5c.entry.js} +1 -1
- package/dist/components/p-10997947.entry.js +1 -0
- package/dist/components/p-19e69c03.entry.js +1 -0
- package/dist/components/p-1ab1ea29.entry.js +1 -0
- package/dist/components/p-1bcf743d.entry.js +1 -0
- package/dist/components/{p-9d18d7b1.entry.js → p-1d18106d.entry.js} +1 -1
- package/dist/components/{p-adbd0d7b.entry.js → p-265150a1.entry.js} +1 -1
- package/dist/components/p-27c4a06e.js +1 -0
- package/dist/components/{p-e35e156d.entry.js → p-2e0c3fc4.entry.js} +1 -1
- package/dist/components/{p-6d3b5818.entry.js → p-2ef4dd11.entry.js} +1 -1
- package/dist/components/p-3360e1e2.entry.js +1 -0
- package/dist/components/{p-93e6ba0f.entry.js → p-38bc21e9.entry.js} +1 -1
- package/dist/components/p-3b29e0fd.entry.js +1 -0
- package/dist/components/p-42457a0f.entry.js +1 -0
- package/dist/components/p-4a6a72db.entry.js +1 -0
- package/dist/components/p-4b33909d.entry.js +1 -0
- package/dist/components/p-4bf4bc93.entry.js +1 -0
- package/dist/components/{p-773a119a.entry.js → p-4c84fcf4.entry.js} +1 -1
- package/dist/components/p-4eb2cf7f.js +1 -0
- package/dist/components/p-5367bb59.entry.js +1 -0
- package/dist/components/p-547a53d6.entry.js +1 -0
- package/dist/components/p-560fc3a4.entry.js +1 -0
- package/dist/components/p-5a58f1c1.entry.js +1 -0
- package/dist/components/p-5b55f951.entry.js +1 -0
- package/dist/components/p-5ba49cf2.entry.js +1 -0
- package/dist/components/p-5dd85979.entry.js +1 -0
- package/dist/components/{p-356846cd.entry.js → p-5f348b0e.entry.js} +1 -1
- package/dist/components/p-634b6ca2.entry.js +1 -0
- package/dist/components/{p-b073d78f.entry.js → p-64b7a6fc.entry.js} +1 -1
- package/dist/components/{p-02d94d2d.entry.js → p-6614881d.entry.js} +1 -1
- package/dist/components/{p-2839899a.entry.js → p-67ec46b4.entry.js} +1 -1
- package/dist/components/p-6b988c76.entry.js +1 -0
- package/dist/components/p-6cd6ff0c.entry.js +1 -0
- package/dist/components/{p-f6ca2aa6.entry.js → p-706a106c.entry.js} +1 -1
- package/dist/components/p-71ee4af2.entry.js +1 -0
- package/dist/components/{p-794f11e7.entry.js → p-743f9f8f.entry.js} +1 -1
- package/dist/components/p-789f54cb.entry.js +1 -0
- package/dist/components/{p-8c0b0121.entry.js → p-79afd8aa.entry.js} +1 -1
- package/dist/components/{p-b3a40663.entry.js → p-7a3f2576.entry.js} +1 -1
- package/dist/components/p-7a5623b5.entry.js +1 -0
- package/dist/components/p-7ca6db64.entry.js +1 -0
- package/dist/components/p-7fa46b01.entry.js +1 -0
- package/dist/components/{p-3e183368.entry.js → p-8627afc0.entry.js} +1 -1
- package/dist/components/p-86eff0cb.entry.js +1 -0
- package/dist/components/p-89048f87.entry.js +1 -0
- package/dist/components/p-8cf98230.entry.js +1 -0
- package/dist/components/{p-8dee879d.entry.js → p-8d363a3c.entry.js} +1 -1
- package/dist/components/p-9261d27c.entry.js +1 -0
- package/dist/components/p-97323c46.entry.js +1 -0
- package/dist/components/p-9b90296c.entry.js +1 -0
- package/dist/components/{p-1f5c19b9.entry.js → p-9c1c5e8d.entry.js} +1 -1
- package/dist/components/p-9cb14b1f.entry.js +1 -0
- package/dist/components/p-9f0a34b4.entry.js +1 -0
- package/dist/components/p-a8ca8346.entry.js +1 -0
- package/dist/components/{p-43468b0f.entry.js → p-ab3b0a53.entry.js} +1 -1
- package/dist/components/p-b0d38b78.entry.js +1 -0
- package/dist/components/{p-66f4cdd9.entry.js → p-b31babda.entry.js} +1 -1
- package/dist/components/p-b6ee4250.entry.js +1 -0
- package/dist/components/{p-0687532c.entry.js → p-b88a2267.entry.js} +1 -1
- package/dist/components/{p-024789cc.entry.js → p-b9a1aba3.entry.js} +1 -1
- package/dist/components/p-b9fdcb1b.entry.js +1 -0
- package/dist/components/{p-73c74835.entry.js → p-ba9f41de.entry.js} +1 -1
- package/dist/components/p-beacaa4f.entry.js +1 -0
- package/dist/components/p-bfa23535.entry.js +1 -0
- package/dist/components/p-c4ac0528.entry.js +1 -0
- package/dist/components/p-cb114bf4.entry.js +1 -0
- package/dist/components/p-cd05a97b.entry.js +1 -0
- package/dist/components/{p-3a331c68.entry.js → p-cd787744.entry.js} +1 -1
- package/dist/components/p-cdc1c8e8.entry.js +1 -0
- package/dist/components/{p-4e473b4e.entry.js → p-d1927da7.entry.js} +1 -1
- package/dist/components/{p-564431ad.entry.js → p-d1d1943b.entry.js} +1 -1
- package/dist/components/{p-543f2347.entry.js → p-d2e485a1.entry.js} +1 -1
- package/dist/components/{p-e2e7250a.entry.js → p-d95d7353.entry.js} +1 -1
- package/dist/components/{p-76905315.entry.js → p-e0ada7e0.entry.js} +1 -1
- package/dist/components/{p-70e8e66f.entry.js → p-e210ddbb.entry.js} +1 -1
- package/dist/components/p-e5892379.entry.js +1 -0
- package/dist/components/p-e8374410.entry.js +1 -0
- package/dist/components/p-e90da4ba.entry.js +1 -0
- package/dist/components/p-ec706eed.entry.js +1 -0
- package/dist/components/{p-28ae3f3a.js → p-efbc374c.js} +2 -2
- package/dist/components/p-f2abe4d8.js +1 -0
- package/dist/components/p-f32963ff.entry.js +9 -0
- package/dist/components/p-f40dd50d.entry.js +1 -0
- package/dist/components/p-f6012c17.entry.js +1 -0
- package/dist/components/p-fcba31fa.entry.js +1 -0
- package/dist/components/primary.js +1 -1
- package/dist/components/primary2.js +1 -1
- package/dist/components/secondary.js +1 -1
- package/dist/components/secondary2.js +7 -7
- package/dist/components/support.js +1 -1
- package/dist/components/support2.js +3 -3
- package/dist/components/svg-repository.js +13 -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/view.js +3 -0
- package/dist/esm/clone-dab56639.js +3 -0
- package/dist/esm/color-primary-palette_6.entry.js +15 -15
- package/dist/esm/components-section.entry.js +2 -2
- package/dist/esm/components.js +3 -3
- package/dist/esm/correct-use-of-colors.entry.js +2 -2
- package/dist/esm/docs-palettes.entry.js +2 -2
- package/dist/esm/docs-tokens.entry.js +2 -2
- package/dist/esm/edit-3893a517.js +3 -0
- package/dist/esm/{eds-avatar_26.entry.js → eds-accordion_33.entry.js} +3462 -159
- package/dist/esm/eds-app-root.entry.js +2 -2
- package/dist/esm/eds-card-desc_2.entry.js +3 -3
- package/dist/esm/eds-card-generic.entry.js +1 -1
- package/dist/esm/eds-card-project.entry.js +2 -2
- package/dist/esm/eds-card-section.entry.js +1 -1
- package/dist/esm/eds-card-tags.entry.js +2 -2
- package/dist/esm/eds-card-tool.entry.js +2 -2
- package/dist/esm/eds-cookies-preference.entry.js +2 -2
- package/dist/esm/eds-feedback.entry.js +2 -2
- package/dist/esm/eds-footer.entry.js +9 -3
- package/dist/esm/eds-frame.entry.js +2 -2
- package/dist/esm/eds-fullscreen-menu.entry.js +1 -1
- package/dist/esm/eds-gauge.entry.js +2 -2
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +2 -2
- package/dist/esm/eds-icon-arrow-right.entry.js +2 -2
- package/dist/esm/eds-icon-bin.entry.js +2 -2
- package/dist/esm/eds-icon-bluesky.entry.js +2 -2
- package/dist/esm/eds-icon-bookmark.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-down.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-left.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-right.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-up.entry.js +2 -2
- package/dist/esm/eds-icon-clone.entry.js +14 -0
- package/dist/esm/eds-icon-close.entry.js +2 -2
- package/dist/esm/eds-icon-copy.entry.js +2 -2
- package/dist/esm/eds-icon-draft.entry.js +2 -2
- package/dist/esm/eds-icon-edit.entry.js +3 -3
- package/dist/esm/eds-icon-eu.entry.js +2 -2
- package/dist/esm/eds-icon-external.entry.js +2 -2
- package/dist/esm/eds-icon-facebook.entry.js +2 -2
- package/dist/esm/eds-icon-gitlab.entry.js +2 -2
- package/dist/esm/eds-icon-linkedin.entry.js +2 -2
- package/dist/esm/eds-icon-loader.entry.js +2 -2
- package/dist/esm/eds-icon-mastodon.entry.js +2 -2
- package/dist/esm/eds-icon-menu.entry.js +2 -2
- package/dist/esm/eds-icon-minus.entry.js +2 -2
- package/dist/esm/eds-icon-more.entry.js +2 -2
- package/dist/esm/eds-icon-paper.entry.js +2 -2
- package/dist/esm/eds-icon-plus.entry.js +2 -2
- package/dist/esm/eds-icon-portal.entry.js +2 -2
- package/dist/esm/eds-icon-private.entry.js +2 -2
- package/dist/esm/eds-icon-public.entry.js +2 -2
- package/dist/esm/eds-icon-search.entry.js +2 -2
- package/dist/esm/eds-icon-star.entry.js +2 -2
- package/dist/esm/eds-icon-start.entry.js +2 -2
- package/dist/esm/eds-icon-success.entry.js +2 -2
- package/dist/esm/eds-icon-thumbs-down.entry.js +2 -2
- package/dist/esm/eds-icon-thumbs-up.entry.js +2 -2
- package/dist/esm/eds-icon-tutorial.entry.js +2 -2
- package/dist/esm/eds-icon-twitter.entry.js +2 -2
- package/dist/esm/eds-icon-unknown.entry.js +2 -2
- package/dist/esm/eds-icon-updown.entry.js +2 -2
- package/dist/esm/eds-icon-user.entry.js +2 -2
- package/dist/esm/eds-icon-view.entry.js +14 -0
- package/dist/esm/eds-icon-youtube.entry.js +2 -2
- package/dist/esm/eds-modal.entry.js +3 -3
- package/dist/esm/eds-pie.entry.js +1 -1
- package/dist/esm/eds-progress-bar.entry.js +2 -2
- package/dist/esm/eds-section-core_2.entry.js +4 -4
- package/dist/esm/eds-social-networks.entry.js +2 -2
- package/dist/esm/eds-spinner.entry.js +2 -2
- package/dist/esm/eds-splash-screen.entry.js +1 -1
- package/dist/esm/eds-timeline.entry.js +2 -2
- package/dist/esm/eds-toast-manager.entry.js +2 -2
- package/dist/esm/eds-tooltip.entry.js +2 -2
- package/dist/esm/eds-trl.entry.js +2 -2
- package/dist/esm/incorrect-use-of-colors.entry.js +2 -2
- package/dist/esm/{index-fdb33359.js → index-e84b871c.js} +15 -28
- package/dist/esm/loader.js +3 -3
- package/dist/esm/logo-space.entry.js +2 -2
- package/dist/esm/logo-variations-horizontal_2.entry.js +3 -3
- package/dist/esm/logo-variations-tabs.entry.js +2 -2
- package/dist/esm/logo-wrong-usage.entry.js +2 -2
- package/dist/esm/svg-repository.entry.js +8 -4
- package/dist/esm/token-list_3.entry.js +4 -4
- package/dist/esm/token-ratios.entry.js +2 -2
- package/dist/esm/token-spacing.entry.js +2 -2
- package/dist/esm/token-typography.entry.js +2 -2
- package/dist/esm/view-e900f2d4.js +3 -0
- package/dist/hydrate/index.js +690 -257
- package/dist/hydrate/index.mjs +690 -257
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/svgs/src/lib/svgs.d.ts +3 -1
- package/dist/types/components/eds-alert/eds-alert.d.ts +6 -0
- package/dist/types/components/eds-button/eds-button.d.ts +1 -0
- package/dist/types/components/eds-icons/eds-icon-clone/eds-icon-clone.d.ts +10 -0
- package/dist/types/components/eds-icons/eds-icon-view/eds-icon-view.d.ts +10 -0
- package/dist/types/components/eds-link/eds-link.d.ts +1 -0
- package/dist/types/components/eds-nps/eds-npm.stories.d.ts +28 -0
- package/dist/types/components/eds-nps/eds-nps.d.ts +20 -0
- package/dist/types/components/eds-pagination/eds-pagination.d.ts +23 -2
- package/dist/types/components/eds-rating/eds-rating.d.ts +3 -1
- package/dist/types/components/eds-switch/eds-switch.d.ts +1 -0
- package/dist/types/components/eds-table/eds-table.d.ts +3 -4
- package/dist/types/components/eds-table/eds-table.stories.d.ts +7 -2
- package/dist/types/components.d.ts +133 -12
- package/dist/types/shared-ui/eds-form/eds-form.d.ts +1 -0
- package/dist/types/shared-ui/eds-tabs/eds-tabs.d.ts +7 -9
- package/dist/types/utils/eds-form/formValidators.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/edit-5714c144.js +0 -5
- package/dist/cjs/eds-accordion.cjs.entry.js +0 -87
- package/dist/cjs/eds-alert.cjs.entry.js +0 -104
- package/dist/cjs/eds-breadcrumb.cjs.entry.js +0 -145
- package/dist/cjs/eds-code-block.cjs.entry.js +0 -2489
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +0 -125
- package/dist/cjs/eds-switch.cjs.entry.js +0 -46
- package/dist/components/p-023bc47c.entry.js +0 -1
- package/dist/components/p-02df910c.entry.js +0 -1
- package/dist/components/p-0be79e08.entry.js +0 -1
- package/dist/components/p-0e74d8b4.entry.js +0 -1
- package/dist/components/p-11efb1d1.entry.js +0 -1
- package/dist/components/p-1791ce82.entry.js +0 -1
- package/dist/components/p-19d586e6.entry.js +0 -1
- package/dist/components/p-2679926c.entry.js +0 -1
- package/dist/components/p-2d1a7471.entry.js +0 -1
- package/dist/components/p-2ff16a39.entry.js +0 -1
- package/dist/components/p-32e18e48.entry.js +0 -1
- package/dist/components/p-38e99d4b.entry.js +0 -1
- package/dist/components/p-4088ae0e.entry.js +0 -1
- package/dist/components/p-4277fb1a.entry.js +0 -1
- package/dist/components/p-42a73db4.entry.js +0 -1
- package/dist/components/p-44055e68.entry.js +0 -1
- package/dist/components/p-4a5d0dcd.entry.js +0 -1
- package/dist/components/p-4a7412ec.entry.js +0 -1
- package/dist/components/p-4b88d84c.entry.js +0 -1
- package/dist/components/p-50f43dfd.entry.js +0 -1
- package/dist/components/p-562afa88.entry.js +0 -1
- package/dist/components/p-5aa4065a.entry.js +0 -1
- package/dist/components/p-5ae1c931.entry.js +0 -1
- package/dist/components/p-634258e6.entry.js +0 -1
- package/dist/components/p-68f45098.entry.js +0 -1
- package/dist/components/p-73a44c48.entry.js +0 -1
- package/dist/components/p-7dbe791f.entry.js +0 -1
- package/dist/components/p-7ec52188.entry.js +0 -1
- package/dist/components/p-7fc84bb2.js +0 -1
- package/dist/components/p-82559816.entry.js +0 -1
- package/dist/components/p-85683b18.entry.js +0 -1
- package/dist/components/p-8681e5d8.entry.js +0 -1
- package/dist/components/p-877d13d9.entry.js +0 -1
- package/dist/components/p-911b1c0b.entry.js +0 -1
- package/dist/components/p-960aa103.entry.js +0 -1
- package/dist/components/p-996005b7.entry.js +0 -1
- package/dist/components/p-aa5e75b4.entry.js +0 -1
- package/dist/components/p-ae9393b6.entry.js +0 -1
- package/dist/components/p-af137162.entry.js +0 -1
- package/dist/components/p-b630e51a.entry.js +0 -1
- package/dist/components/p-bb9af709.entry.js +0 -1
- package/dist/components/p-c2dc3692.entry.js +0 -1
- package/dist/components/p-c91b4eec.entry.js +0 -1
- package/dist/components/p-caff3355.entry.js +0 -1
- package/dist/components/p-ce66ea37.entry.js +0 -1
- package/dist/components/p-d4f239d7.entry.js +0 -1
- package/dist/components/p-d7251d4d.entry.js +0 -1
- package/dist/components/p-deb9bbed.entry.js +0 -1
- package/dist/components/p-ed4d9bf5.entry.js +0 -1
- package/dist/components/p-ed7696a2.entry.js +0 -1
- package/dist/components/p-f2416727.entry.js +0 -1
- package/dist/components/p-f28b5da7.entry.js +0 -1
- package/dist/components/p-f3839914.entry.js +0 -1
- package/dist/components/p-f42b6251.entry.js +0 -1
- package/dist/components/p-f7a31196.entry.js +0 -1
- package/dist/components/p-f973c83b.entry.js +0 -1
- package/dist/components/p-fe167c78.entry.js +0 -9
- package/dist/esm/edit-1dc8d11b.js +0 -3
- package/dist/esm/eds-accordion.entry.js +0 -83
- package/dist/esm/eds-alert.entry.js +0 -100
- package/dist/esm/eds-breadcrumb.entry.js +0 -141
- package/dist/esm/eds-code-block.entry.js +0 -2485
- package/dist/esm/eds-matomo-notice.entry.js +0 -121
- package/dist/esm/eds-switch.entry.js +0 -42
- /package/dist/collection/shared-ui/eds-toast-manager/{eds-toast-manager.stories.js → eds-toast-manager.st.js} +0 -0
- /package/dist/types/shared-ui/eds-toast-manager/{eds-toast-manager.stories.d.ts → eds-toast-manager.st.d.ts} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.flex {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
.justify-between {
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
}
|
|
7
|
+
.mt-4 {
|
|
8
|
+
margin-top: 0.25rem;
|
|
9
|
+
}
|
|
10
|
+
.mt-8 {
|
|
11
|
+
margin-top: 0.5rem;
|
|
12
|
+
}
|
|
13
|
+
.ml-4 {
|
|
14
|
+
margin-left: 0.25rem;
|
|
15
|
+
}
|
|
16
|
+
.mr-4 {
|
|
17
|
+
margin-right: 0.25rem;
|
|
18
|
+
}
|
|
19
|
+
.grid {
|
|
20
|
+
display: grid;
|
|
21
|
+
}
|
|
22
|
+
.grid-col-span-1 {
|
|
23
|
+
--container-grid-columns: 1;
|
|
24
|
+
grid-column: span 1 / span 1;
|
|
25
|
+
}
|
|
26
|
+
.grid-cols-11 {
|
|
27
|
+
grid-template-columns: repeat(11, minmax(0, 1fr));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.grid-cols-11[class*="grid-line-x"][class*="grid-line-x"] > *:nth-child(n)::before {
|
|
31
|
+
border-bottom-width: 1px;
|
|
32
|
+
}
|
|
33
|
+
.grid-cols-11[class*="grid-line-xfull"] > *:nth-child(n)::before {
|
|
34
|
+
inset-inline-start: calc(var(--inner-gutter) / -2);
|
|
35
|
+
inset-inline-end: calc(var(--inner-gutter) / -2);
|
|
36
|
+
}
|
|
37
|
+
.grid-cols-11[class*="grid-line-x"] > *:nth-child(11n+1)::before {
|
|
38
|
+
inset-inline-start: 0;
|
|
39
|
+
}
|
|
40
|
+
.grid-cols-11[class*="grid-line-x"] > *:nth-child(11n+11)::before {
|
|
41
|
+
inset-inline-end: 0;
|
|
42
|
+
}
|
|
43
|
+
.grid-cols-11[class*="grid-line-x"] > *:nth-child(11n+1):nth-last-child(-n+11)::before {
|
|
44
|
+
border-bottom-width: 0;
|
|
45
|
+
}
|
|
46
|
+
.grid-cols-11[class*="grid-line-x"] > *:nth-child(11n+1):nth-last-child(-n+11) ~ *::before {
|
|
47
|
+
border-bottom-width: 0;
|
|
48
|
+
}
|
|
49
|
+
.grid-cols-11[class*="grid-line-y"][class*="grid-line-y"] > *:nth-child(n)::after {
|
|
50
|
+
border-inline-end-width: 1px;
|
|
51
|
+
}
|
|
52
|
+
.grid-cols-11[class*="grid-line-y"][class*="grid-line-y"] > *:nth-child(11n+11)::after {
|
|
53
|
+
border-inline-end-width: 0;
|
|
54
|
+
}
|
|
55
|
+
.grid-cols-11[class*="grid-line-y"][class*="grid-line-y"] > *:nth-child(-n+11)::after {
|
|
56
|
+
top: 0;
|
|
57
|
+
}
|
|
58
|
+
.grid-cols-11[class*="grid-line-y"][class*="grid-line-y"] > *:nth-child(11n+1):nth-last-child(-n+11)::after {
|
|
59
|
+
bottom: 0;
|
|
60
|
+
}
|
|
61
|
+
.grid-cols-11[class*="grid-line-y"][class*="grid-line-y"] > *:nth-child(11n+1):nth-last-child(-n+11) ~ li::after {
|
|
62
|
+
bottom: 0;
|
|
63
|
+
}
|
|
64
|
+
.f-ui-04 {
|
|
65
|
+
font-family: var(--f-ui-04-fontFamily);
|
|
66
|
+
font-weight: var(--f-ui-04-fontWeight);
|
|
67
|
+
font-size: var(--f-ui-04-fontSize);
|
|
68
|
+
line-height: var(--f-ui-04-lineHeight);
|
|
69
|
+
letter-spacing: var(--f-ui-04-letterSpacing);
|
|
70
|
+
}
|
|
71
|
+
.text-light {
|
|
72
|
+
color: var(--grey-700);
|
|
73
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class EdsNps {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.min = 0;
|
|
5
|
+
this.max = 10;
|
|
6
|
+
this.question = undefined;
|
|
7
|
+
this.leftLabel = undefined;
|
|
8
|
+
this.rightLabel = undefined;
|
|
9
|
+
this.selectedValue = null;
|
|
10
|
+
}
|
|
11
|
+
handleClick(value) {
|
|
12
|
+
this.selectedValue = value;
|
|
13
|
+
this.nps.emit(value);
|
|
14
|
+
}
|
|
15
|
+
handleKeyNav(e) {
|
|
16
|
+
const radios = Array.from(this.el.shadowRoot.querySelectorAll('eds-button'));
|
|
17
|
+
const currentIndex = radios.findIndex((r) => r.tabIndex === 0);
|
|
18
|
+
switch (e.key) {
|
|
19
|
+
case 'ArrowRight':
|
|
20
|
+
case 'ArrowLeft': {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
const delta = e.key === 'ArrowRight' ? 1 : -1;
|
|
23
|
+
const nextIndex = Math.min(this.max, Math.max(0, currentIndex + delta));
|
|
24
|
+
this.activateRadio(radios, nextIndex);
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
case 'Home': {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
this.activateRadio(radios, 0);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case 'End': {
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
this.activateRadio(radios, this.max);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
case 'Enter':
|
|
38
|
+
case ' ': {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
if (currentIndex >= 0) {
|
|
41
|
+
this.handleClick(this.min + currentIndex);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
case 'Escape': {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
if (currentIndex >= 0) {
|
|
48
|
+
radios[currentIndex].blur();
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
activateRadio(radios, index) {
|
|
57
|
+
const target = radios[index];
|
|
58
|
+
const value = this.min + index;
|
|
59
|
+
this.handleClick(value);
|
|
60
|
+
target.focus();
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
const count = this.max - this.min + 1;
|
|
64
|
+
const fallback = 0;
|
|
65
|
+
return (h("div", { key: 'd675e1e4ecc306511c0324d0b76ee66237cb6738', class: "eds-nps" }, h("eds-input-label", { key: '2eede06f6ee166c36b0cf315a35435c89c3c0ba5', id: "nps-question", name: "nps-question", label: this.question }), h("div", { key: '16105649fe6b3b229127c9a741367a6381db774f', role: "group", id: "nps-buttons", "aria-labelledby": "nps-question", class: "grid grid-cols-11", onKeyDown: (e) => this.handleKeyNav(e) }, Array.from({ length: count }, (_, i) => {
|
|
66
|
+
const val = this.min + i;
|
|
67
|
+
const isSelected = val === this.selectedValue;
|
|
68
|
+
const tabIndex = this.selectedValue === null ? (i === fallback ? 0 : -1) : isSelected ? 0 : -1;
|
|
69
|
+
return (h("div", { class: "grid-col-span-1", key: val }, h("eds-button", { tabindex: tabIndex, label: `${val}`, "aria-label": `${val}`, intent: isSelected ? 'primary' : 'ghost', "extra-class": "!block !px-0 w-full", triggerClick: () => this.handleClick(val) })));
|
|
70
|
+
})), h("div", { key: 'e7bd70a4f1a8083d9c3e08fdf8de55999a27d92d', class: "flex justify-between mt-8" }, h("span", { key: 'ea3fbbac20a162e7cf5f2d5e3321c8bc9297014e', class: "f-ui-04 text-light ml-4" }, this.leftLabel), h("span", { key: '3ff59cde0c532587ead8b8a1eaaff6c630e7e7ac', class: "f-ui-04 text-light mr-4" }, this.rightLabel))));
|
|
71
|
+
}
|
|
72
|
+
static get is() { return "eds-nps"; }
|
|
73
|
+
static get encapsulation() { return "shadow"; }
|
|
74
|
+
static get originalStyleUrls() {
|
|
75
|
+
return {
|
|
76
|
+
"$": ["eds-nps.css"]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get styleUrls() {
|
|
80
|
+
return {
|
|
81
|
+
"$": ["eds-nps.css"]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static get properties() {
|
|
85
|
+
return {
|
|
86
|
+
"question": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "string",
|
|
91
|
+
"resolved": "string",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": "The question prompt for the NPS scale."
|
|
99
|
+
},
|
|
100
|
+
"attribute": "question",
|
|
101
|
+
"reflect": false
|
|
102
|
+
},
|
|
103
|
+
"leftLabel": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"mutable": false,
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "string",
|
|
108
|
+
"resolved": "string",
|
|
109
|
+
"references": {}
|
|
110
|
+
},
|
|
111
|
+
"required": false,
|
|
112
|
+
"optional": false,
|
|
113
|
+
"docs": {
|
|
114
|
+
"tags": [],
|
|
115
|
+
"text": "Label displayed under the min value."
|
|
116
|
+
},
|
|
117
|
+
"attribute": "left-label",
|
|
118
|
+
"reflect": false
|
|
119
|
+
},
|
|
120
|
+
"rightLabel": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"mutable": false,
|
|
123
|
+
"complexType": {
|
|
124
|
+
"original": "string",
|
|
125
|
+
"resolved": "string",
|
|
126
|
+
"references": {}
|
|
127
|
+
},
|
|
128
|
+
"required": false,
|
|
129
|
+
"optional": false,
|
|
130
|
+
"docs": {
|
|
131
|
+
"tags": [],
|
|
132
|
+
"text": "Label displayed under the max value."
|
|
133
|
+
},
|
|
134
|
+
"attribute": "right-label",
|
|
135
|
+
"reflect": false
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
static get states() {
|
|
140
|
+
return {
|
|
141
|
+
"selectedValue": {}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static get events() {
|
|
145
|
+
return [{
|
|
146
|
+
"method": "nps",
|
|
147
|
+
"name": "nps",
|
|
148
|
+
"bubbles": true,
|
|
149
|
+
"cancelable": true,
|
|
150
|
+
"composed": true,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "Event emitted when the NPS value changes."
|
|
154
|
+
},
|
|
155
|
+
"complexType": {
|
|
156
|
+
"original": "number",
|
|
157
|
+
"resolved": "number",
|
|
158
|
+
"references": {}
|
|
159
|
+
}
|
|
160
|
+
}];
|
|
161
|
+
}
|
|
162
|
+
static get elementRef() { return "el"; }
|
|
163
|
+
}
|
|
@@ -6,22 +6,72 @@ import { h } from "@stencil/core";
|
|
|
6
6
|
* - Supports two display modes: "default" (shows numbered page links) and "navigator" (shows Previous/Next buttons).
|
|
7
7
|
* - Emits a `page` event when the page is changed in "default" mode.
|
|
8
8
|
* - Automatically generates pagination links based on the `currentPage` and `lastPage`.
|
|
9
|
+
* - Full keyboard navigation support with arrow keys, Home, End
|
|
10
|
+
* - Proper ARIA labels and screen reader support
|
|
9
11
|
*
|
|
10
12
|
* This component is designed for flexible and accessible pagination controls, suitable for various display needs.
|
|
11
13
|
*/
|
|
12
14
|
export class EdsPagination {
|
|
13
15
|
constructor() {
|
|
16
|
+
/**
|
|
17
|
+
* Handles keyboard navigation within the pagination
|
|
18
|
+
*/
|
|
19
|
+
this.handleKeyDown = (e) => {
|
|
20
|
+
if (this.mode !== 'default' || !this.useButtons) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const navigableItems = this.getNavigableItems();
|
|
24
|
+
if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
const increment = e.key === 'ArrowRight' ? 1 : -1;
|
|
27
|
+
let currentIndex = this.focusedIndex;
|
|
28
|
+
// If no item is focused, start from current page or first item
|
|
29
|
+
if (currentIndex === -1) {
|
|
30
|
+
const currentPageIndex = navigableItems.findIndex((item) => item.type === 'page' && item.page === this.currentPage);
|
|
31
|
+
currentIndex = currentPageIndex !== -1 ? currentPageIndex : 0;
|
|
32
|
+
}
|
|
33
|
+
let newIndex = currentIndex + increment;
|
|
34
|
+
// Wrap around navigation
|
|
35
|
+
if (newIndex >= navigableItems.length) {
|
|
36
|
+
newIndex = 0;
|
|
37
|
+
}
|
|
38
|
+
else if (newIndex < 0) {
|
|
39
|
+
newIndex = navigableItems.length - 1;
|
|
40
|
+
}
|
|
41
|
+
this.focusedIndex = newIndex;
|
|
42
|
+
this.focusPaginationItem(newIndex);
|
|
43
|
+
}
|
|
44
|
+
else if (e.key === 'Home') {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
this.focusedIndex = 0;
|
|
47
|
+
this.focusPaginationItem(0);
|
|
48
|
+
}
|
|
49
|
+
else if (e.key === 'End') {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
const lastIndex = navigableItems.length - 1;
|
|
52
|
+
this.focusedIndex = lastIndex;
|
|
53
|
+
this.focusPaginationItem(lastIndex);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Handles focus events for pagination items
|
|
58
|
+
*/
|
|
59
|
+
this.handleItemFocus = (index) => {
|
|
60
|
+
this.focusedIndex = index;
|
|
61
|
+
};
|
|
14
62
|
this.currentPage = undefined;
|
|
15
63
|
this.lastPage = undefined;
|
|
16
64
|
this.perPage = 10;
|
|
17
65
|
this.total = 0;
|
|
18
66
|
this.url = '';
|
|
19
67
|
this.mode = 'default';
|
|
68
|
+
this.useButtons = true;
|
|
20
69
|
this.prevLabel = 'Prev';
|
|
21
70
|
this.nextLabel = 'Next';
|
|
22
71
|
this.prevUrl = '';
|
|
23
72
|
this.nextUrl = '';
|
|
24
73
|
this.links = [];
|
|
74
|
+
this.focusedIndex = -1;
|
|
25
75
|
}
|
|
26
76
|
/** Lifecycle hook to generate pagination links on component load */
|
|
27
77
|
componentWillLoad() {
|
|
@@ -30,24 +80,17 @@ export class EdsPagination {
|
|
|
30
80
|
}
|
|
31
81
|
}
|
|
32
82
|
componentDidLoad() {
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
this.emitContext(links[0]);
|
|
41
|
-
|
|
42
|
-
// Emit context for the last link, if it's different from the first
|
|
43
|
-
if (links.length > 1) {
|
|
44
|
-
this.emitContext(links[links.length - 1]);
|
|
45
|
-
}
|
|
46
|
-
}*/
|
|
83
|
+
// Only emit context for links, not buttons
|
|
84
|
+
if (!this.useButtons) {
|
|
85
|
+
const links = this.hostEl.shadowRoot.querySelectorAll('eds-link');
|
|
86
|
+
links.forEach((lnk) => {
|
|
87
|
+
this.emitContext(lnk);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
47
90
|
}
|
|
48
91
|
/**
|
|
49
92
|
* Emits a custom event called `parentContext` for a given link element.
|
|
50
|
-
* This event provides context information about the
|
|
93
|
+
* This event provides context information about the pagination component.
|
|
51
94
|
*
|
|
52
95
|
* @param linkElement - The link element to which the event will be dispatched.
|
|
53
96
|
*/
|
|
@@ -65,6 +108,34 @@ export class EdsPagination {
|
|
|
65
108
|
this.generateLinks();
|
|
66
109
|
}
|
|
67
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Gets all navigable pagination items for keyboard navigation
|
|
113
|
+
*/
|
|
114
|
+
getNavigableItems() {
|
|
115
|
+
const items = [];
|
|
116
|
+
// Previous button
|
|
117
|
+
items.push({ type: 'prev', disabled: this.isFirstPage() });
|
|
118
|
+
// Page numbers
|
|
119
|
+
this.links.forEach((link) => {
|
|
120
|
+
if (typeof link === 'object') {
|
|
121
|
+
items.push({ type: 'page', page: parseInt(link.label), disabled: false });
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
// Next button
|
|
125
|
+
items.push({ type: 'next', disabled: this.isLastPage() });
|
|
126
|
+
return items.filter((item) => !item.disabled);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Focuses a specific pagination item by index
|
|
130
|
+
*/
|
|
131
|
+
focusPaginationItem(index) {
|
|
132
|
+
var _a;
|
|
133
|
+
const buttons = (_a = this.hostEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.pagination-button');
|
|
134
|
+
const targetButton = buttons === null || buttons === void 0 ? void 0 : buttons[index];
|
|
135
|
+
if (targetButton) {
|
|
136
|
+
targetButton.focus();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
68
139
|
/**
|
|
69
140
|
* Checks if the current page is the first page
|
|
70
141
|
* @returns {boolean} - true if current page is the first page
|
|
@@ -87,7 +158,7 @@ export class EdsPagination {
|
|
|
87
158
|
generateLink(page) {
|
|
88
159
|
const urlHasQuery = this.url.includes('?');
|
|
89
160
|
return {
|
|
90
|
-
ariaLabel: `
|
|
161
|
+
ariaLabel: `Go to page ${page}`,
|
|
91
162
|
url: `${this.url}${urlHasQuery ? '&' : '?'}page=${page}`,
|
|
92
163
|
label: page.toString(),
|
|
93
164
|
current: this.currentPage === page,
|
|
@@ -107,7 +178,6 @@ export class EdsPagination {
|
|
|
107
178
|
* Creates a pagination range based on delta, current, and total pages
|
|
108
179
|
* @param {number} current - Current page number
|
|
109
180
|
* @param {number} total - Total number of pages
|
|
110
|
-
* @param {number} delta - Range of pages to display around the current page
|
|
111
181
|
* @returns {(number | string)[]} - Range of page numbers or ellipses
|
|
112
182
|
*/
|
|
113
183
|
getPaginationGenerator(current, total) {
|
|
@@ -122,7 +192,7 @@ export class EdsPagination {
|
|
|
122
192
|
else {
|
|
123
193
|
// Always show the first page
|
|
124
194
|
range.push(1);
|
|
125
|
-
// Add ellipsis if there
|
|
195
|
+
// Add ellipsis if there's a gap between the first page and the current range start
|
|
126
196
|
if (current - delta > 2) {
|
|
127
197
|
range.push('...');
|
|
128
198
|
}
|
|
@@ -130,7 +200,7 @@ export class EdsPagination {
|
|
|
130
200
|
for (let i = Math.max(2, current - delta); i <= Math.min(total - 1, current + delta); i++) {
|
|
131
201
|
range.push(i);
|
|
132
202
|
}
|
|
133
|
-
// Add ellipsis if there
|
|
203
|
+
// Add ellipsis if there's a gap between the current range end and the last page
|
|
134
204
|
if (current + delta < total - 1) {
|
|
135
205
|
range.push('...');
|
|
136
206
|
}
|
|
@@ -145,9 +215,11 @@ export class EdsPagination {
|
|
|
145
215
|
*/
|
|
146
216
|
pageResults() {
|
|
147
217
|
if (this.total > 0) {
|
|
218
|
+
const start = this.perPage * ((this.currentPage || 1) - 1) + 1;
|
|
219
|
+
const end = Math.min(this.perPage * (this.currentPage || 1), this.total);
|
|
148
220
|
return this.total > this.perPage
|
|
149
|
-
?
|
|
150
|
-
:
|
|
221
|
+
? `Showing ${start} to ${end} of ${this.total} results`
|
|
222
|
+
: `Showing ${this.total} result${this.total !== 1 ? 's' : ''}`;
|
|
151
223
|
}
|
|
152
224
|
return '';
|
|
153
225
|
}
|
|
@@ -160,7 +232,9 @@ export class EdsPagination {
|
|
|
160
232
|
if (this.mode === 'navigator') {
|
|
161
233
|
return; // No page clicking logic for navigator mode
|
|
162
234
|
}
|
|
163
|
-
|
|
235
|
+
if (this.useButtons) {
|
|
236
|
+
event.preventDefault(); // Prevent default for buttons
|
|
237
|
+
}
|
|
164
238
|
if (newPage !== this.currentPage) {
|
|
165
239
|
this.links = this.links.map((link) => typeof link === 'object' ? Object.assign(Object.assign({}, link), { current: parseInt(link.label) === newPage }) : link);
|
|
166
240
|
const pageChangeEvent = new CustomEvent('page', {
|
|
@@ -173,38 +247,25 @@ export class EdsPagination {
|
|
|
173
247
|
}
|
|
174
248
|
}
|
|
175
249
|
render() {
|
|
176
|
-
|
|
177
|
-
|
|
250
|
+
const navigableIndex = -1; // Track index for keyboard navigation
|
|
251
|
+
return (h("div", { key: '753a7e573a09e7fcb66eac9e11e00f690c49543d' }, this.total > 0 && this.mode === 'default' && (h("p", { key: '6286d71622614a835d471812a55d5c6bef37a13e', class: "f-ui-03 text-light mb-28 w-full text-center", "aria-live": "polite", id: "pagination-info" }, h("span", { key: 'daa7bfa31e736a40c46641fed88653d51eeabc67', class: "text-light sr-only" }, "Results:"), this.pageResults())), this.mode === 'navigator' || (this.lastPage && this.lastPage > 1) ? (h("nav", { "aria-label": "Pagination Navigation", "aria-describedby": this.mode === 'default' ? 'pagination-info' : undefined, onKeyDown: this.handleKeyDown }, h("ul", { class: "flex items-center justify-center gap-x-8", role: "list" }, h("li", { class: "mr-auto" }, this.useButtons ? (h("div", { class: "pagination-button-wrapper", onFocus: () => this.handleItemFocus(navigableIndex) }, 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) => {
|
|
252
|
+
if (this.mode === 'default' && !this.isFirstPage()) {
|
|
253
|
+
this.handlePageClick(event, (this.currentPage || 1) - 1);
|
|
254
|
+
}
|
|
255
|
+
} }))) : (h("eds-link", { label: this.prevLabel, url: this.mode === 'navigator'
|
|
256
|
+
? this.prevUrl || '#'
|
|
178
257
|
: this.isFirstPage()
|
|
179
258
|
? '#'
|
|
180
|
-
: this.generateLink(this.currentPage - 1).url, disabled: this.mode === 'navigator'
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if (this.isFirstPage()) {
|
|
185
|
-
event.preventDefault(); // Prevent click if disabled
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
this.handlePageClick(event, (this.currentPage || 1) - 1);
|
|
189
|
-
}
|
|
259
|
+
: this.generateLink(this.currentPage - 1).url, 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: "strong", "hide-label-on-small-screen": true, class: "!p-8 lg:!pr-12" }))), this.mode === 'default' &&
|
|
260
|
+
this.links.map((link, index) => (h("li", { key: index, class: "f-ui-02 flex h-36 items-center justify-center" }, typeof link === 'string' ? (h("span", { class: "flex items-center justify-center", "aria-hidden": "true" }, link)) : this.useButtons ? (h("div", { class: "pagination-button-wrapper", onFocus: () => this.handleItemFocus(navigableIndex) }, h("eds-button", { label: link.label, "aria-label": link.current ? `Current page, page ${link.label}` : `Go to page ${link.label}`, "aria-current": link.current ? 'page' : undefined, size: "small", "extra-class": "!p-8 pagination-button", intent: link.current ? 'secondary' : 'ghost', onClick: (event) => this.handlePageClick(event, parseInt(link.label)) }))) : (h("eds-link", { url: link.url, "aria-label": link.ariaLabel, label: link.label, current: link.current, "aria-current": link.current ? 'page' : undefined, size: "small", class: "!p-8", intent: link.current ? 'secondary' : 'ghost', onClick: (event) => this.handlePageClick(event, parseInt(link.label)) }))))), h("li", { class: "ml-auto" }, this.useButtons ? (h("div", { class: "pagination-button-wrapper", onFocus: () => this.handleItemFocus(navigableIndex) }, h("eds-button", { label: this.nextLabel, disabled: this.mode === 'navigator' ? !this.nextUrl : this.isLastPage(), "aria-label": "Go to next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "ghost", "extra-class": "!p-8 lg:!pl-12 pagination-button", onClick: (event) => {
|
|
261
|
+
if (this.mode === 'default' && !this.isLastPage()) {
|
|
262
|
+
this.handlePageClick(event, (this.currentPage || 1) + 1);
|
|
190
263
|
}
|
|
191
|
-
} })), this.mode === '
|
|
192
|
-
|
|
193
|
-
? this.nextUrl || '#' // Use nextUrl if provided, otherwise disable with '#'
|
|
264
|
+
} }))) : (h("eds-link", { label: this.nextLabel, url: this.mode === 'navigator'
|
|
265
|
+
? this.nextUrl || '#'
|
|
194
266
|
: this.isLastPage()
|
|
195
267
|
? '#'
|
|
196
|
-
: this.generateLink(this.currentPage + 1).url, disabled: this.mode === 'navigator'
|
|
197
|
-
? !this.nextUrl // Disable if nextUrl is not provided
|
|
198
|
-
: this.isLastPage(), "aria-label": "Next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "strong", "hide-label-on-small-screen": true, class: "!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors", onClick: (event) => {
|
|
199
|
-
if (this.mode === 'default') {
|
|
200
|
-
if (this.isLastPage()) {
|
|
201
|
-
event.preventDefault(); // Prevent click if disabled
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
this.handlePageClick(event, (this.currentPage || 1) + 1);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
} }))))) : null));
|
|
268
|
+
: this.generateLink(this.currentPage + 1).url, disabled: this.mode === 'navigator' ? !this.nextUrl : this.isLastPage(), "aria-label": "Go to next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "strong", "hide-label-on-small-screen": true, class: "!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors" })))))) : null));
|
|
208
269
|
}
|
|
209
270
|
static get is() { return "eds-pagination"; }
|
|
210
271
|
static get encapsulation() { return "shadow"; }
|
|
@@ -326,6 +387,24 @@ export class EdsPagination {
|
|
|
326
387
|
"reflect": false,
|
|
327
388
|
"defaultValue": "'default'"
|
|
328
389
|
},
|
|
390
|
+
"useButtons": {
|
|
391
|
+
"type": "boolean",
|
|
392
|
+
"mutable": false,
|
|
393
|
+
"complexType": {
|
|
394
|
+
"original": "boolean",
|
|
395
|
+
"resolved": "boolean",
|
|
396
|
+
"references": {}
|
|
397
|
+
},
|
|
398
|
+
"required": false,
|
|
399
|
+
"optional": false,
|
|
400
|
+
"docs": {
|
|
401
|
+
"tags": [],
|
|
402
|
+
"text": "Whether to use buttons (for JavaScript pagination) or links (for URL navigation)"
|
|
403
|
+
},
|
|
404
|
+
"attribute": "use-buttons",
|
|
405
|
+
"reflect": false,
|
|
406
|
+
"defaultValue": "true"
|
|
407
|
+
},
|
|
329
408
|
"prevLabel": {
|
|
330
409
|
"type": "string",
|
|
331
410
|
"mutable": false,
|
|
@@ -402,7 +481,8 @@ export class EdsPagination {
|
|
|
402
481
|
}
|
|
403
482
|
static get states() {
|
|
404
483
|
return {
|
|
405
|
-
"links": {}
|
|
484
|
+
"links": {},
|
|
485
|
+
"focusedIndex": {}
|
|
406
486
|
};
|
|
407
487
|
}
|
|
408
488
|
static get elementRef() { return "hostEl"; }
|
|
@@ -39,7 +39,7 @@ export class EdsProgressBar {
|
|
|
39
39
|
]
|
|
40
40
|
.filter(Boolean)
|
|
41
41
|
.join(' ');
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: '2a620231eaa84ba7e89e05da48175624fdc92d31', role: "progressbar", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": progressValue, "aria-valuetext": `${progressValue}%`, class: outerClasses }, h("div", { key: '660e2c84ad358c0de1d9548b730308505e79bcd6', class: fillClasses, style: { width: `${progressValue}%` } }), h("div", { key: '4d0fa2a209d315b658f80906b95a0bf255c82c78', class: "absolute inset-0 flex items-center justify-center pointer-events-none z-10" }, h("span", { key: '0d423e16659d84b2d050f7d60ced4aefeeef9022', class: "text-default f-body-02" }, progressValue, "%"))));
|
|
43
43
|
}
|
|
44
44
|
static get is() { return "eds-progress-bar"; }
|
|
45
45
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class EdsRating {
|
|
3
3
|
constructor() {
|
|
4
|
+
this.buttonRefs = [];
|
|
4
5
|
this.ratingType = 'star';
|
|
5
6
|
this.ratingCount = 5;
|
|
6
7
|
this.selectedRating = 0;
|
|
@@ -34,16 +35,37 @@ export class EdsRating {
|
|
|
34
35
|
* Handles the click event on a star.
|
|
35
36
|
* @param rating - The selected rating value.
|
|
36
37
|
*/
|
|
37
|
-
|
|
38
|
+
onSelect(rating) {
|
|
38
39
|
this.selectedRating = rating;
|
|
39
40
|
this.rating.emit(rating);
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
const btn = this.buttonRefs[rating - 1];
|
|
43
|
+
btn === null || btn === void 0 ? void 0 : btn.focus();
|
|
44
|
+
}, 0);
|
|
45
|
+
}
|
|
46
|
+
handleKeyNav(e) {
|
|
47
|
+
const { key } = e;
|
|
48
|
+
if (!['ArrowRight', 'ArrowLeft', 'ArrowDown', 'ArrowUp'].includes(key)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
const increment = key === 'ArrowRight' || key === 'ArrowDown' ? 1 : -1;
|
|
53
|
+
let next = (this.selectedRating || 1) + increment;
|
|
54
|
+
if (next > this.ratingCount) {
|
|
55
|
+
next = 1;
|
|
56
|
+
}
|
|
57
|
+
if (next < 1) {
|
|
58
|
+
next = this.ratingCount;
|
|
59
|
+
}
|
|
60
|
+
this.onSelect(next);
|
|
40
61
|
}
|
|
41
62
|
render() {
|
|
42
|
-
return (h("div", { key: '
|
|
63
|
+
return (h("div", { key: 'bd72970d86f2dbb21d58671fc85feea3011749b3', id: "rating-buttons", role: "radiogroup", "aria-labelledby": "rating", class: "stars flex space-x-1 my-8", onKeyDown: (e) => this.handleKeyNav(e) }, Array.from({ length: this.ratingCount }, (_, index) => {
|
|
43
64
|
const starRating = index + 1;
|
|
44
65
|
const isSelected = starRating <= this.selectedRating;
|
|
45
66
|
// Use the mapping text if available; otherwise, fall back to a generic label.
|
|
46
|
-
|
|
67
|
+
const checked = this.selectedRating === starRating;
|
|
68
|
+
return (h("eds-button", { ref: (el) => (this.buttonRefs[index] = el), icon: this.ratingType, role: "radio", "aria-checked": checked, "aria-label": `${starRating} ${this.ratingType}${starRating > 1 ? 's' : ''}`, onClick: () => this.onSelect(starRating), tabIndex: checked || (this.selectedRating === 0 && index === 0) ? 0 : -1, intent: isSelected ? 'primary' : 'ghost', size: "large", "extra-class": "p-2" // Optional padding or styling for the star button
|
|
47
69
|
}));
|
|
48
70
|
})));
|
|
49
71
|
}
|
|
@@ -20,7 +20,7 @@ export class EdsSectionCore {
|
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
const TagType = this.tag; // Set dynamic tag type (div or section)
|
|
23
|
-
return (h(TagType, { key: '
|
|
23
|
+
return (h(TagType, { key: 'b77b5af1c6f3acbc2696a9608b55199ed4110d71' }, h("eds-section-heading", { key: '464dd4c67d69d1ef3ed1d932081c3195a2b51503', headingLevel: this.headingLevel, sectionTitle: this.sectionTitle }), h("slot", { key: 'b5dbd4f55aee2df3bcbc44e21a134544ffd733f7' })));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "eds-section-core"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -36,12 +36,12 @@ export class EdsSectionHeading {
|
|
|
36
36
|
render() {
|
|
37
37
|
const TagType = this.tag; // Dynamically set tag type for the container
|
|
38
38
|
const HeadingTag = this.headingLevel; // Dynamically set heading level
|
|
39
|
-
return (h(TagType, { key: '
|
|
39
|
+
return (h(TagType, { key: '4ae69ea354156a0e35a8884a63d7556ead8ada24', class: {
|
|
40
40
|
'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8': true,
|
|
41
41
|
container: this.withContainer,
|
|
42
42
|
'pt-48': this.spacingLarge,
|
|
43
43
|
'pt-28': !this.spacingLarge
|
|
44
|
-
} }, h(HeadingTag, { key: '
|
|
44
|
+
} }, h(HeadingTag, { key: 'a3549fb733687c3ff31f17bdc362275eb0b29e31', class: this.getHeadingClass() }, this.sectionTitle)));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "eds-section-heading"; }
|
|
47
47
|
static get properties() {
|
|
@@ -71,7 +71,7 @@ export class EdsSpinner {
|
|
|
71
71
|
alignItems: 'center',
|
|
72
72
|
justifyContent: 'center'
|
|
73
73
|
};
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'cbf9cead7c7c6bc5314c074f7249c920eb60d326' }, h("div", { key: 'd22c71a76af3f53c649e547538e0f1627cd9ecd0', class: "spinner-overlay", style: overlayStyle }, h("span", { key: '83b42f7ee9ba4d356bd82097989b8be1db8a8ef9', class: "spinner", style: spinnerStyle }), this.message && h("p", { key: '0a2c4efe46b8f86a037d29de699534441bf7585e', class: "f-body-01" }, this.message))));
|
|
75
75
|
}
|
|
76
76
|
static get is() { return "eds-spinner"; }
|
|
77
77
|
static get encapsulation() { return "shadow"; }
|