@ebrains/components 0.9.3-beta → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/cjs/{analytics-d8fb3fdd.js → analytics-28713bf7.js} +2 -2
- package/dist/cjs/color-primary-palette_6.cjs.entry.js +15 -15
- package/dist/cjs/components-section.cjs.entry.js +23 -17
- 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/eds-accordion.cjs.entry.js +3 -3
- package/dist/cjs/eds-alert.cjs.entry.js +2 -2
- package/dist/cjs/eds-app-root.cjs.entry.js +2 -2
- package/dist/cjs/eds-avatar_34.cjs.entry.js +2731 -0
- package/dist/cjs/eds-card-project.cjs.entry.js +136 -8
- package/dist/cjs/eds-card-section.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 +3 -3
- package/dist/cjs/eds-code-block.cjs.entry.js +1 -1
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +2 -2
- package/dist/cjs/eds-feedback.cjs.entry.js +7 -2
- package/dist/cjs/eds-frame.cjs.entry.js +3 -3
- 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-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-close.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-copy.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-eu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-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-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 +1 -1
- package/dist/cjs/eds-icon-user.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +10 -8
- package/dist/cjs/eds-pagination_2.cjs.entry.js +6 -6
- package/dist/cjs/eds-progress-bar.cjs.entry.js +32 -5
- package/dist/cjs/eds-rating.cjs.entry.js +2 -2
- package/dist/cjs/eds-section-core_2.cjs.entry.js +4 -4
- package/dist/cjs/eds-spinner.cjs.entry.js +2 -2
- package/dist/cjs/eds-splash-screen.cjs.entry.js +60 -0
- package/dist/cjs/eds-switch.cjs.entry.js +14 -6
- package/dist/cjs/eds-timeline.cjs.entry.js +3 -3
- package/dist/cjs/eds-toast-manager.cjs.entry.js +33 -4
- package/dist/cjs/eds-toast.cjs.entry.js +5 -4
- 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-2f63169d.js → index-88c8039f.js} +37 -319
- 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 +2 -2
- 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-typography.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/eds-accordion/eds-accordion.css +0 -8
- package/dist/collection/components/eds-alert/eds-alert.css +1 -575
- package/dist/collection/components/eds-alert/eds-alert.stories.js +3 -1
- package/dist/collection/components/eds-avatar/eds-avatar.css +40 -25
- package/dist/collection/components/eds-avatar/eds-avatar.js +11 -21
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +5 -2
- package/dist/collection/components/eds-block-break/eds-block-break.css +2 -27
- package/dist/collection/components/eds-block-break/eds-block-break.js +9 -14
- package/dist/collection/components/eds-button/eds-button.css +318 -8312
- package/dist/collection/components/eds-button/eds-button.js +5 -59
- package/dist/collection/components/eds-button/eds-button.stories.js +4 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.css +5 -7
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +1 -20
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.css +10 -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.css +58 -0
- package/dist/collection/components/eds-charts/eds-gauge/eds-gauge.js +172 -0
- package/dist/collection/components/eds-charts/eds-gauge/eds-gauge.stories.js +57 -0
- package/dist/collection/components/eds-charts/eds-pie/eds-pie.css +135 -0
- package/dist/collection/components/eds-charts/eds-pie/eds-pie.js +229 -0
- package/dist/collection/components/eds-charts/eds-pie/eds-pie.stories.js +76 -0
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +33 -156
- package/dist/collection/components/eds-input-field/eds-input-field.js +42 -15
- package/dist/collection/components/eds-link/eds-link.css +384 -6247
- package/dist/collection/components/eds-link/eds-link.js +2 -1
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.css +96 -61
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +48 -3
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.stories.js +3 -4
- package/dist/collection/components/eds-rating/eds-rating.js +1 -1
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +5 -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 +13 -2
- package/dist/collection/components/eds-switch/eds-switch.js +13 -5
- package/dist/collection/components/eds-table/eds-table.js +4 -4
- package/dist/collection/components/eds-table/eds-table.stories.js +1 -11
- package/dist/collection/components/eds-tag/eds-tag.css +22 -12
- package/dist/collection/components/eds-tag/eds-tag.js +1 -1
- package/dist/collection/components/eds-timeline/eds-timeline.css +46 -7755
- package/dist/collection/components/eds-timeline/eds-timeline.js +4 -1
- package/dist/collection/components/eds-toast/eds-toast.js +7 -7
- package/dist/collection/components/eds-tooltip/eds-tooltip.css +89 -93
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +6 -120
- package/dist/collection/components/eds-tooltip/eds-tooltip.stories.js +5 -3
- 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/components-section/functional/angular.js +1 -1
- package/dist/collection/eds-docs-ui/components-section/functional/installation.js +1 -1
- package/dist/collection/eds-docs-ui/components-section/functional/overview.js +2 -2
- 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 +24 -1
- package/dist/collection/shared-ui/eds-feedback/eds-feedback.stories.js +9 -1
- package/dist/collection/shared-ui/eds-footer/eds-footer.css +4 -0
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +46 -2
- package/dist/collection/shared-ui/eds-footer/eds-footer.stories.js +16 -3
- package/dist/collection/shared-ui/eds-form/eds-form.js +42 -10
- package/dist/collection/shared-ui/eds-frame/eds-frame.css +147 -115
- package/dist/collection/shared-ui/eds-frame/eds-frame.js +1 -1
- package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.css +149 -117
- package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.js +1 -1
- package/dist/collection/shared-ui/eds-header/eds-header.css +178 -132
- package/dist/collection/shared-ui/eds-header/eds-header.js +21 -40
- package/dist/collection/shared-ui/eds-header/eds-header.stories.js +6 -5
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +8 -6
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.stories.js +1 -0
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/{components → shared-ui}/eds-steps/eds-steps.css +2 -35
- package/dist/collection/{components → shared-ui}/eds-steps/eds-steps.js +2 -2
- package/dist/collection/{components → shared-ui}/eds-steps/eds-steps.stories.js +1 -1
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.css +4 -128
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.stories.js +1 -1
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.css +268 -7686
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +10 -10
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.stories.js +20 -10
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/shared-ui/eds-user/eds-user.css +36 -7758
- 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/analytics.js +2 -2
- package/dist/collection/utils/color.js +8 -8
- package/dist/components/analytics.js +2 -2
- package/dist/components/components-section.js +22 -16
- package/dist/components/components.css +34 -516
- 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 +1 -1
- package/dist/components/eds-alert2.js +1 -1
- package/dist/components/eds-app-root.js +2 -20
- package/dist/components/eds-avatar2.js +4 -15
- package/dist/components/eds-block-break2.js +4 -4
- package/dist/components/eds-button2.js +6 -60
- package/dist/components/eds-card-desc2.js +2 -4
- package/dist/components/eds-card-generic2.js +2 -2
- package/dist/components/eds-card-project.js +131 -2
- package/dist/components/eds-card-tool.js +1 -1
- package/dist/components/eds-cookies-preference.js +1 -1
- package/dist/components/eds-feedback.js +7 -1
- package/dist/components/eds-footer2.js +7 -3
- package/dist/components/eds-form.js +17 -9
- package/dist/components/eds-frame.js +2 -2
- package/dist/components/eds-fullscreen-menu.js +1 -1
- package/dist/components/{eds-login.d.ts → eds-gauge.d.ts} +4 -4
- package/dist/components/eds-gauge.js +81 -0
- package/dist/components/eds-header.js +15 -34
- package/dist/components/eds-input-field2.js +26 -16
- package/dist/components/eds-input-select2.js +12 -84
- package/dist/components/eds-link2.js +3 -2
- package/dist/components/eds-matomo-notice2.js +8 -6
- package/dist/components/{eds-card-wrapper.d.ts → eds-pie.d.ts} +4 -4
- package/dist/components/eds-pie.js +127 -0
- package/dist/components/eds-progress-bar2.js +32 -4
- package/dist/components/eds-rating2.js +1 -1
- package/dist/components/eds-section-core2.js +3 -2
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/eds-steps-v2.js +1 -1
- package/dist/components/eds-steps2.js +1 -1
- package/dist/components/eds-switch.js +13 -5
- package/dist/components/eds-table2.js +4 -4
- package/dist/components/eds-tabs.js +11 -11
- package/dist/components/eds-tag2.js +2 -2
- package/dist/components/eds-timeline.js +2 -2
- package/dist/components/eds-toast-manager.js +31 -2
- package/dist/components/eds-toast2.js +4 -3
- package/dist/components/eds-tooltip.js +7 -88
- package/dist/components/eds-trl.js +1 -1
- package/dist/components/eds-user.js +10 -4
- 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-019555e2.entry.js +1 -0
- package/dist/components/p-04b4e9d0.entry.js +1 -0
- package/dist/components/p-0863352c.entry.js +1 -0
- package/dist/components/p-0d6434e1.entry.js +1 -0
- package/dist/components/p-0e94a89f.entry.js +1 -0
- package/dist/components/p-0ed92872.entry.js +1 -0
- package/dist/components/{p-c4db0829.entry.js → p-0eeddc13.entry.js} +1 -1
- package/dist/components/p-100909ce.entry.js +1 -0
- package/dist/components/{p-892362e0.entry.js → p-10db551c.entry.js} +1 -1
- package/dist/components/{p-aa2e6fec.entry.js → p-124b8747.entry.js} +1 -1
- package/dist/components/p-14a223fe.entry.js +1 -0
- package/dist/components/{p-e089797c.entry.js → p-1661f33c.entry.js} +1 -1
- package/dist/components/{p-05b272e5.entry.js → p-18ceadd2.entry.js} +1 -1
- package/dist/components/p-223ba66e.entry.js +1 -0
- package/dist/components/{p-751497f4.entry.js → p-24dab785.entry.js} +1 -1
- package/dist/components/p-26d6679b.entry.js +1 -0
- package/dist/components/p-2810d568.entry.js +1 -0
- package/dist/components/p-28ae3f3a.js +2 -0
- package/dist/components/p-2b1b2026.entry.js +1 -0
- package/dist/components/p-2c571550.entry.js +1 -0
- package/dist/components/p-326d9e55.entry.js +1 -0
- package/dist/components/p-36d6134f.entry.js +1 -0
- package/dist/components/p-3c642a30.entry.js +1 -0
- package/dist/components/p-46619042.entry.js +1 -0
- package/dist/components/{p-75d37c48.entry.js → p-46a6ab04.entry.js} +1 -1
- package/dist/components/{p-d83d2815.entry.js → p-50ea5b07.entry.js} +1 -1
- package/dist/components/p-511b23ec.entry.js +1 -0
- package/dist/components/p-5462923d.entry.js +1 -0
- package/dist/components/p-6199b8c0.entry.js +1 -0
- package/dist/components/{p-888c3471.entry.js → p-624e653e.entry.js} +1 -1
- package/dist/components/{p-0b99fd3c.entry.js → p-682f7376.entry.js} +1 -1
- package/dist/components/p-6907a47c.entry.js +1 -0
- package/dist/components/p-6ba42d02.entry.js +1 -0
- package/dist/components/p-6e929acb.entry.js +1 -0
- package/dist/components/p-6ede7101.entry.js +1 -0
- package/dist/components/p-70bac015.entry.js +1 -0
- package/dist/components/p-7af6b832.entry.js +1 -0
- package/dist/components/p-7f31622d.entry.js +1 -0
- package/dist/components/p-822ac246.entry.js +1 -0
- package/dist/components/p-848506b8.entry.js +1 -0
- package/dist/components/p-84fd3e40.entry.js +1 -0
- package/dist/components/p-85634ad2.entry.js +1 -0
- package/dist/components/{p-7a550385.entry.js → p-8ad05566.entry.js} +1 -1
- package/dist/components/{p-037975af.entry.js → p-8b016d76.entry.js} +1 -1
- package/dist/components/p-8bdf5841.entry.js +1 -0
- package/dist/components/p-8ff39cef.entry.js +1 -0
- package/dist/components/{p-29ad9c73.entry.js → p-a4f552b2.entry.js} +1 -1
- package/dist/components/p-a81cba86.entry.js +1 -0
- package/dist/components/p-abb2ad00.entry.js +1 -0
- package/dist/components/{p-b8ba7e5c.entry.js → p-adbd0d7b.entry.js} +1 -1
- package/dist/components/p-affe2b55.entry.js +1 -0
- package/dist/components/p-b31591db.entry.js +1 -0
- package/dist/components/{p-7db75d62.entry.js → p-b4abff90.entry.js} +1 -1
- package/dist/components/{p-67c72c20.entry.js → p-b50fc0d7.entry.js} +1 -1
- package/dist/components/p-b7efd666.entry.js +1 -0
- package/dist/components/p-ba784274.entry.js +1 -0
- package/dist/components/p-bb9af709.entry.js +1 -0
- package/dist/components/p-bfc62d3e.entry.js +1 -0
- package/dist/components/p-c0b22803.entry.js +1 -0
- package/dist/components/p-cdd491f5.entry.js +1 -0
- package/dist/components/{p-688e07d6.entry.js → p-cde3d7a4.entry.js} +1 -1
- package/dist/components/p-cfccddc3.entry.js +1 -0
- package/dist/components/p-d15065c3.js +1 -0
- package/dist/components/p-d268c96b.entry.js +1 -0
- package/dist/components/p-d437bae2.entry.js +1 -0
- package/dist/components/p-d456e649.entry.js +1 -0
- package/dist/components/p-dae8f66a.entry.js +1 -0
- package/dist/components/p-e1791844.entry.js +1 -0
- package/dist/components/p-e82edd4a.entry.js +1 -0
- package/dist/components/p-e9f608a8.entry.js +1 -0
- package/dist/components/{p-55e3683c.entry.js → p-ea97a94e.entry.js} +1 -1
- package/dist/components/{p-e2b00067.entry.js → p-eac593ee.entry.js} +1 -1
- package/dist/components/p-f26fd186.entry.js +1 -0
- package/dist/components/{p-7ac9881e.entry.js → p-f2c23162.entry.js} +1 -1
- package/dist/components/p-fc4edb18.entry.js +1 -0
- package/dist/components/p-fe1cba17.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 +1 -1
- package/dist/components/token-list2.js +1 -1
- package/dist/components/token-radii2.js +1 -1
- package/dist/components/token-ratios.js +1 -1
- package/dist/components/token-shadows2.js +1 -1
- package/dist/components/token-spacing.js +1 -1
- package/dist/components/token-typography.js +1 -1
- package/dist/esm/{analytics-44b1416b.js → analytics-d99780e3.js} +2 -2
- package/dist/esm/color-primary-palette_6.entry.js +15 -15
- package/dist/esm/components-section.entry.js +23 -17
- 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/eds-accordion.entry.js +3 -3
- package/dist/esm/eds-alert.entry.js +2 -2
- package/dist/esm/eds-app-root.entry.js +2 -2
- package/dist/esm/eds-avatar_34.entry.js +2694 -0
- package/dist/esm/eds-card-project.entry.js +133 -5
- package/dist/esm/eds-card-section.entry.js +1 -1
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +3 -3
- package/dist/esm/eds-code-block.entry.js +1 -1
- package/dist/esm/eds-cookies-preference.entry.js +2 -2
- package/dist/esm/eds-feedback.entry.js +7 -2
- package/dist/esm/eds-frame.entry.js +3 -3
- 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-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-close.entry.js +1 -1
- package/dist/esm/eds-icon-copy.entry.js +1 -1
- package/dist/esm/eds-icon-eu.entry.js +1 -1
- package/dist/esm/eds-icon-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-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 +1 -1
- package/dist/esm/eds-icon-user.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/esm/eds-matomo-notice.entry.js +10 -8
- package/dist/esm/eds-pagination_2.entry.js +6 -6
- package/dist/esm/eds-progress-bar.entry.js +32 -5
- package/dist/esm/eds-rating.entry.js +2 -2
- package/dist/esm/eds-section-core_2.entry.js +4 -4
- package/dist/esm/eds-spinner.entry.js +2 -2
- package/dist/esm/eds-splash-screen.entry.js +56 -0
- package/dist/esm/eds-switch.entry.js +14 -6
- package/dist/esm/eds-timeline.entry.js +3 -3
- package/dist/esm/eds-toast-manager.entry.js +32 -3
- package/dist/esm/eds-toast.entry.js +5 -4
- package/dist/esm/eds-trl.entry.js +2 -2
- package/dist/esm/incorrect-use-of-colors.entry.js +2 -2
- package/dist/esm/{index-8a71b9a7.js → index-fdb33359.js} +37 -319
- 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 +2 -2
- package/dist/esm/token-list_3.entry.js +4 -4
- package/dist/esm/token-ratios.entry.js +2 -2
- package/dist/esm/token-typography.entry.js +2 -2
- package/dist/hydrate/index.js +815 -2882
- package/dist/hydrate/index.mjs +815 -2882
- package/dist/types/components/eds-avatar/eds-avatar.d.ts +3 -4
- package/dist/types/components/eds-avatar/eds-avatar.stories.d.ts +2 -1
- package/dist/types/components/eds-block-break/eds-block-break.d.ts +2 -7
- package/dist/types/components/eds-button/eds-button.d.ts +0 -1
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.d.ts +0 -5
- package/dist/types/components/eds-charts/eds-gauge/eds-gauge.d.ts +14 -0
- package/dist/types/components/eds-charts/eds-gauge/eds-gauge.stories.d.ts +52 -0
- package/dist/types/components/eds-charts/eds-pie/eds-pie.d.ts +28 -0
- package/dist/types/components/eds-charts/eds-pie/eds-pie.stories.d.ts +60 -0
- package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +18 -116
- package/dist/types/components/eds-input-field/eds-input-field.d.ts +6 -0
- package/dist/types/components/eds-progress-bar/eds-progress-bar.d.ts +3 -3
- package/dist/types/components/eds-progress-bar/eds-progress-bar.stories.d.ts +3 -0
- package/dist/types/components/eds-section/eds-section-core/eds-section-core.d.ts +3 -0
- package/dist/types/components/eds-switch/eds-switch.d.ts +2 -1
- package/dist/types/components/eds-table/eds-table.stories.d.ts +0 -8
- package/dist/types/components/eds-timeline/eds-timeline.d.ts +3 -0
- package/dist/types/components/eds-toast/eds-toast.d.ts +3 -2
- package/dist/types/components/eds-tooltip/eds-tooltip.d.ts +2 -36
- package/dist/types/components.d.ts +211 -241
- package/dist/types/shared-ui/eds-feedback/eds-feedback.d.ts +4 -0
- package/dist/types/shared-ui/eds-feedback/eds-feedback.stories.d.ts +8 -4
- package/dist/types/shared-ui/eds-footer/eds-footer.d.ts +10 -0
- package/dist/types/shared-ui/eds-footer/eds-footer.stories.d.ts +10 -0
- package/dist/types/shared-ui/eds-form/eds-form.d.ts +1 -1
- package/dist/types/shared-ui/eds-header/eds-header.d.ts +5 -24
- package/dist/types/shared-ui/eds-header/eds-header.stories.d.ts +6 -3
- package/dist/types/shared-ui/eds-matomo-notice/eds-matomo-notice.d.ts +0 -1
- package/dist/types/shared-ui/eds-tabs/eds-tabs.stories.d.ts +0 -1
- package/package.json +14 -4
- package/dist/cjs/color-c00146a8.js +0 -134
- package/dist/cjs/eds-avatar_27.cjs.entry.js +0 -2404
- package/dist/cjs/eds-card-desc_2.cjs.entry.js +0 -78
- package/dist/cjs/eds-card-generic.cjs.entry.js +0 -92
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +0 -32
- package/dist/cjs/eds-login_2.cjs.entry.js +0 -2100
- package/dist/cjs/eds-tabs.cjs.entry.js +0 -130
- package/dist/cjs/eds-tooltip.cjs.entry.js +0 -109
- package/dist/cjs/toastManager-4e9535f3.js +0 -33
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +0 -86
- package/dist/collection/shared-ui/eds-login/eds-login.js +0 -190
- package/dist/components/color.js +0 -132
- package/dist/components/eds-card-wrapper.js +0 -49
- package/dist/components/eds-login.js +0 -6
- package/dist/components/eds-login2.js +0 -2076
- package/dist/components/p-05549a74.entry.js +0 -1
- package/dist/components/p-0e378e0e.entry.js +0 -1
- package/dist/components/p-13efafb9.js +0 -1
- package/dist/components/p-1ec25dc2.entry.js +0 -1
- package/dist/components/p-202f78cc.entry.js +0 -1
- package/dist/components/p-22b76c3c.entry.js +0 -1
- package/dist/components/p-22f9e720.js +0 -1
- package/dist/components/p-24300934.entry.js +0 -1
- package/dist/components/p-25f1cc6c.entry.js +0 -1
- package/dist/components/p-31ca07fd.entry.js +0 -1
- package/dist/components/p-342bc3d8.entry.js +0 -1
- package/dist/components/p-35068b80.entry.js +0 -1
- package/dist/components/p-3950debe.entry.js +0 -1
- package/dist/components/p-3d74d4b1.entry.js +0 -1
- package/dist/components/p-42f19373.entry.js +0 -1
- package/dist/components/p-4ecaedbc.entry.js +0 -1
- package/dist/components/p-5055eb25.entry.js +0 -1
- package/dist/components/p-5646902d.entry.js +0 -1
- package/dist/components/p-5ff68e7d.entry.js +0 -1
- package/dist/components/p-63cc5d3d.entry.js +0 -1
- package/dist/components/p-6506cf52.entry.js +0 -1
- package/dist/components/p-6aa17003.entry.js +0 -1
- package/dist/components/p-6e273e0f.entry.js +0 -1
- package/dist/components/p-6fcb754e.entry.js +0 -1
- package/dist/components/p-70c9af1e.entry.js +0 -1
- package/dist/components/p-7180a36b.entry.js +0 -1
- package/dist/components/p-7351cad3.entry.js +0 -1
- package/dist/components/p-75cc9f9e.entry.js +0 -1
- package/dist/components/p-7a31c31f.entry.js +0 -1
- package/dist/components/p-7cb60f9c.entry.js +0 -1
- package/dist/components/p-8a4d9b9b.entry.js +0 -1
- package/dist/components/p-8b7f5204.entry.js +0 -1
- package/dist/components/p-8db820ef.entry.js +0 -1
- package/dist/components/p-ae4f5e3a.entry.js +0 -1
- package/dist/components/p-b024183c.entry.js +0 -1
- package/dist/components/p-b115c3f1.entry.js +0 -1
- package/dist/components/p-b3a3ae59.entry.js +0 -1
- package/dist/components/p-b4595a9e.entry.js +0 -1
- package/dist/components/p-b817dceb.entry.js +0 -1
- package/dist/components/p-b8ca2127.entry.js +0 -1
- package/dist/components/p-ba6cc102.entry.js +0 -1
- package/dist/components/p-c51b5f04.entry.js +0 -1
- package/dist/components/p-c5a7d2b1.entry.js +0 -1
- package/dist/components/p-c5c782e7.entry.js +0 -1
- package/dist/components/p-c5f98369.entry.js +0 -1
- package/dist/components/p-c604063d.entry.js +0 -1
- package/dist/components/p-c9a19e93.entry.js +0 -1
- package/dist/components/p-cccacbd3.js +0 -2
- package/dist/components/p-d164a75d.entry.js +0 -1
- package/dist/components/p-d4c920fa.entry.js +0 -1
- package/dist/components/p-d82cc261.entry.js +0 -1
- package/dist/components/p-da6e49a9.entry.js +0 -1
- package/dist/components/p-dcd4de1f.entry.js +0 -1
- package/dist/components/p-e8a2d709.entry.js +0 -1
- package/dist/components/p-ea942740.entry.js +0 -1
- package/dist/components/p-eb0b93d5.js +0 -1
- package/dist/components/p-ece20356.entry.js +0 -1
- package/dist/components/p-ed6fd4b8.entry.js +0 -1
- package/dist/components/p-f3822d6b.entry.js +0 -1
- package/dist/components/p-f539febe.entry.js +0 -1
- package/dist/components/p-f7f4b247.entry.js +0 -1
- package/dist/components/p-fdbfa776.entry.js +0 -1
- package/dist/components/p-fe27f4a9.entry.js +0 -1
- package/dist/components/toastManager.js +0 -31
- package/dist/esm/color-2554aad6.js +0 -132
- package/dist/esm/eds-avatar_27.entry.js +0 -2374
- package/dist/esm/eds-card-desc_2.entry.js +0 -73
- package/dist/esm/eds-card-generic.entry.js +0 -88
- package/dist/esm/eds-card-wrapper.entry.js +0 -28
- package/dist/esm/eds-login_2.entry.js +0 -2095
- package/dist/esm/eds-tabs.entry.js +0 -126
- package/dist/esm/eds-tooltip.entry.js +0 -105
- package/dist/esm/toastManager-d9eee791.js +0 -31
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.d.ts +0 -23
- package/dist/types/shared-ui/eds-login/eds-login.d.ts +0 -67
- /package/dist/collection/components/eds-section/eds-section-core/{eds-section-core.stories.js → eds-section-core.donotstories.js} +0 -0
- /package/dist/collection/components/eds-timeline/{eds-timeline.stories.js → eds-timeline.donot-stories.js} +0 -0
- /package/dist/types/components/eds-section/eds-section-core/{eds-section-core.stories.d.ts → eds-section-core.donotstories.d.ts} +0 -0
- /package/dist/types/components/eds-timeline/{eds-timeline.stories.d.ts → eds-timeline.donot-stories.d.ts} +0 -0
- /package/dist/types/{components → shared-ui}/eds-steps/eds-steps.d.ts +0 -0
- /package/dist/types/{components → shared-ui}/eds-steps/eds-steps.stories.d.ts +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
// src/components/eds-pie/eds-pie.tsx
|
|
2
|
+
import { h, Host } from "@stencil/core";
|
|
3
|
+
export class EdsPie {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.size = 200;
|
|
6
|
+
this.slices = [];
|
|
7
|
+
this.thickness = 1;
|
|
8
|
+
this.display = 'value';
|
|
9
|
+
this.legend = true;
|
|
10
|
+
this.colorScheme = 'semantic';
|
|
11
|
+
}
|
|
12
|
+
parseSlices() {
|
|
13
|
+
if (typeof this.slices === 'string') {
|
|
14
|
+
try {
|
|
15
|
+
return JSON.parse(this.slices);
|
|
16
|
+
}
|
|
17
|
+
catch (_a) {
|
|
18
|
+
// eslint-disable-next-line
|
|
19
|
+
console.warn('eds-pie: invalid slices JSON');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return Array.isArray(this.slices) ? this.slices : [];
|
|
23
|
+
}
|
|
24
|
+
polarToCartesian(cx, cy, r, angle) {
|
|
25
|
+
const rad = (angle - 90) * (Math.PI / 180);
|
|
26
|
+
return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) };
|
|
27
|
+
}
|
|
28
|
+
describeArc(x, y, r, startAngle, endAngle) {
|
|
29
|
+
const start = this.polarToCartesian(x, y, r, endAngle);
|
|
30
|
+
const end = this.polarToCartesian(x, y, r, startAngle);
|
|
31
|
+
const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1';
|
|
32
|
+
return [`M ${start.x} ${start.y}`, `A ${r} ${r} 0 ${largeArcFlag} 0 ${end.x} ${end.y}`, `L ${x} ${y}`, 'Z'].join(' ');
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
const raw = this.parseSlices();
|
|
36
|
+
if (raw.length > EdsPie.MAX_SLICES) {
|
|
37
|
+
// eslint-disable-next-line
|
|
38
|
+
console.warn(`eds-pie: too many slices (${raw.length}), results may overlap.`);
|
|
39
|
+
}
|
|
40
|
+
const total = raw.reduce((sum, s) => sum + s.value, 0) || 1;
|
|
41
|
+
const palette = [...EdsPie.PALETTES[this.colorScheme]];
|
|
42
|
+
const sorted = [...raw].sort((a, b) => b.value - a.value);
|
|
43
|
+
let cumulative = 0;
|
|
44
|
+
const processed = sorted.map((s) => {
|
|
45
|
+
const angle = (s.value / total) * 360;
|
|
46
|
+
const start = cumulative, end = cumulative + angle;
|
|
47
|
+
cumulative = end;
|
|
48
|
+
const color = s.color || palette.shift() || 'var(--color-chart-neutral-1)';
|
|
49
|
+
return Object.assign(Object.assign({}, s), { start, end, color });
|
|
50
|
+
});
|
|
51
|
+
const diameter = this.size;
|
|
52
|
+
const radius = diameter / 2;
|
|
53
|
+
// clamp into [0.5, 1]
|
|
54
|
+
const tClamped = Math.min(Math.max(this.thickness, 0.5), 1);
|
|
55
|
+
const innerRadius = radius * (1 - tClamped);
|
|
56
|
+
const outerRadius = radius;
|
|
57
|
+
// **replace** the previous labelRadius line with this:
|
|
58
|
+
const labelRadius = (radius + innerRadius) / 2;
|
|
59
|
+
// Build ARIA description
|
|
60
|
+
const ariaLabel = processed
|
|
61
|
+
.map((s) => `${s.label}: ${this.display === 'percent' ? `${Math.round((s.value / total) * 100)}%` : s.value}`)
|
|
62
|
+
.join(', ');
|
|
63
|
+
return (h(Host, null, h("div", { class: "wrapper" }, h("svg", { width: diameter, height: diameter, role: "img", "aria-label": `Pie chart: ${ariaLabel}`, class: "pie-chart" }, h("title", null, "Pie chart"), h("g", null, processed.map((s) => (h("path", { key: s.id, d: this.describeArc(radius, radius, outerRadius, s.start, s.end), fill: s.color }))), innerRadius > 0 && h("circle", { cx: radius, cy: radius, r: innerRadius, fill: "var(--white)" }), processed.map((s) => {
|
|
64
|
+
const midAngle = s.start + (s.end - s.start) / 2;
|
|
65
|
+
const { x, y } = this.polarToCartesian(radius, radius, labelRadius, midAngle);
|
|
66
|
+
const text = this.display === 'percent' ? `${Math.round((s.value / total) * 100)}%` : String(s.value);
|
|
67
|
+
return (h("text", { key: s.id, x: x, y: y, class: "f-ui-02", "text-anchor": "middle", "alignment-baseline": "middle" }, text));
|
|
68
|
+
}))), this.legend && (h("ul", { class: "legend", role: "list" }, processed.map((s) => (h("li", { key: s.id, role: "listitem", tabindex: "0", class: "legend-item" }, h("span", { class: "legend-swatch", style: { backgroundColor: s.color } }), h("span", { class: "legend-label" }, s.label)))))))));
|
|
69
|
+
}
|
|
70
|
+
static get is() { return "eds-pie"; }
|
|
71
|
+
static get encapsulation() { return "shadow"; }
|
|
72
|
+
static get originalStyleUrls() {
|
|
73
|
+
return {
|
|
74
|
+
"$": ["eds-pie.css"]
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
static get styleUrls() {
|
|
78
|
+
return {
|
|
79
|
+
"$": ["eds-pie.css"]
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static get properties() {
|
|
83
|
+
return {
|
|
84
|
+
"size": {
|
|
85
|
+
"type": "number",
|
|
86
|
+
"mutable": false,
|
|
87
|
+
"complexType": {
|
|
88
|
+
"original": "number",
|
|
89
|
+
"resolved": "number",
|
|
90
|
+
"references": {}
|
|
91
|
+
},
|
|
92
|
+
"required": false,
|
|
93
|
+
"optional": false,
|
|
94
|
+
"docs": {
|
|
95
|
+
"tags": [],
|
|
96
|
+
"text": "Diameter in pixels"
|
|
97
|
+
},
|
|
98
|
+
"attribute": "size",
|
|
99
|
+
"reflect": false,
|
|
100
|
+
"defaultValue": "200"
|
|
101
|
+
},
|
|
102
|
+
"slices": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "PieSlice[] | string",
|
|
107
|
+
"resolved": "PieSlice[] | string",
|
|
108
|
+
"references": {
|
|
109
|
+
"PieSlice": {
|
|
110
|
+
"location": "global",
|
|
111
|
+
"id": "global::PieSlice"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": "Array or JSON string of slices"
|
|
120
|
+
},
|
|
121
|
+
"attribute": "slices",
|
|
122
|
+
"reflect": false,
|
|
123
|
+
"defaultValue": "[]"
|
|
124
|
+
},
|
|
125
|
+
"thickness": {
|
|
126
|
+
"type": "number",
|
|
127
|
+
"mutable": false,
|
|
128
|
+
"complexType": {
|
|
129
|
+
"original": "number",
|
|
130
|
+
"resolved": "number",
|
|
131
|
+
"references": {}
|
|
132
|
+
},
|
|
133
|
+
"required": false,
|
|
134
|
+
"optional": false,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": "Inner-radius fraction (always 0.5-1)"
|
|
138
|
+
},
|
|
139
|
+
"attribute": "thickness",
|
|
140
|
+
"reflect": false,
|
|
141
|
+
"defaultValue": "1"
|
|
142
|
+
},
|
|
143
|
+
"display": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "DisplayMode",
|
|
148
|
+
"resolved": "\"percent\" | \"value\"",
|
|
149
|
+
"references": {
|
|
150
|
+
"DisplayMode": {
|
|
151
|
+
"location": "global",
|
|
152
|
+
"id": "global::DisplayMode"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"required": false,
|
|
157
|
+
"optional": false,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": "Show raw value or percentage"
|
|
161
|
+
},
|
|
162
|
+
"attribute": "display",
|
|
163
|
+
"reflect": false,
|
|
164
|
+
"defaultValue": "'value'"
|
|
165
|
+
},
|
|
166
|
+
"legend": {
|
|
167
|
+
"type": "boolean",
|
|
168
|
+
"mutable": false,
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "boolean",
|
|
171
|
+
"resolved": "boolean",
|
|
172
|
+
"references": {}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": false,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [],
|
|
178
|
+
"text": "Show legend"
|
|
179
|
+
},
|
|
180
|
+
"attribute": "legend",
|
|
181
|
+
"reflect": false,
|
|
182
|
+
"defaultValue": "true"
|
|
183
|
+
},
|
|
184
|
+
"colorScheme": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "'semantic' | 'mono'",
|
|
189
|
+
"resolved": "\"mono\" | \"semantic\"",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": false,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": "Color scheme: semantic, brand, or mono"
|
|
197
|
+
},
|
|
198
|
+
"attribute": "color-scheme",
|
|
199
|
+
"reflect": false,
|
|
200
|
+
"defaultValue": "'semantic'"
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
EdsPie.MAX_SLICES = 9;
|
|
206
|
+
EdsPie.PALETTES = {
|
|
207
|
+
semantic: [
|
|
208
|
+
'var(--color-chart-accent)',
|
|
209
|
+
'var(--color-chart-strong)',
|
|
210
|
+
'var(--color-chart-accent-dark)',
|
|
211
|
+
'var(--color-chart-lighter)',
|
|
212
|
+
'var(--color-chart-accent-light)',
|
|
213
|
+
'var(--color-chart-lightest)',
|
|
214
|
+
'var(--color-chart-accent-lighter)',
|
|
215
|
+
'var(--color-chart-darker)',
|
|
216
|
+
'var(--color-chart-accent-lightest)'
|
|
217
|
+
],
|
|
218
|
+
mono: [
|
|
219
|
+
'var(--grey-700)',
|
|
220
|
+
'var(--grey-500)',
|
|
221
|
+
'var(--grey-300)',
|
|
222
|
+
'var(--grey-100)',
|
|
223
|
+
'var(--grey-800)',
|
|
224
|
+
'var(--grey-600)',
|
|
225
|
+
'var(--grey-400)',
|
|
226
|
+
'var(--grey-200)',
|
|
227
|
+
'var(--grey-900)'
|
|
228
|
+
]
|
|
229
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Charts/Pie',
|
|
3
|
+
component: 'eds-pie',
|
|
4
|
+
argTypes: {
|
|
5
|
+
size: {
|
|
6
|
+
control: 'number',
|
|
7
|
+
description: 'Diameter of the pie chart (in pixels)'
|
|
8
|
+
},
|
|
9
|
+
slices: {
|
|
10
|
+
control: 'object',
|
|
11
|
+
description: 'Array of slice objects or JSON string representation'
|
|
12
|
+
},
|
|
13
|
+
thickness: {
|
|
14
|
+
control: { type: 'range', min: 0.5, max: 1, step: 0.01 },
|
|
15
|
+
description: 'Inner mask thickness as fraction of radius (0.5–1)'
|
|
16
|
+
},
|
|
17
|
+
display: {
|
|
18
|
+
control: 'select',
|
|
19
|
+
options: ['value', 'percent'],
|
|
20
|
+
description: 'Show raw values or percentages in slice labels'
|
|
21
|
+
},
|
|
22
|
+
legend: {
|
|
23
|
+
control: 'boolean',
|
|
24
|
+
description: 'Toggle the legend display'
|
|
25
|
+
},
|
|
26
|
+
colorScheme: {
|
|
27
|
+
control: 'select',
|
|
28
|
+
options: ['semantic', 'mono'],
|
|
29
|
+
description: 'Color scheme: semantic or mono'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
size: 300,
|
|
34
|
+
slices: [
|
|
35
|
+
{ id: 'a', value: 10, label: 'Series A' },
|
|
36
|
+
{ id: 'b', value: 20, label: 'Series B' },
|
|
37
|
+
{ id: 'c', value: 30, label: 'Series C' }
|
|
38
|
+
],
|
|
39
|
+
thickness: 1,
|
|
40
|
+
display: 'value',
|
|
41
|
+
legend: true,
|
|
42
|
+
colorScheme: 'semantic'
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export const Default = {
|
|
46
|
+
render: (args) => `
|
|
47
|
+
<div class="flex items-center justify-center">
|
|
48
|
+
<eds-pie
|
|
49
|
+
size="${args.size}"
|
|
50
|
+
thickness="${args.thickness}"
|
|
51
|
+
display="${args.display}"
|
|
52
|
+
legend="${args.legend}"
|
|
53
|
+
color-scheme="${args.colorScheme}"
|
|
54
|
+
slices='${JSON.stringify(args.slices)}'
|
|
55
|
+
></eds-pie>
|
|
56
|
+
</div>
|
|
57
|
+
`
|
|
58
|
+
};
|
|
59
|
+
export const Thickness = {
|
|
60
|
+
render: (args) => `
|
|
61
|
+
<div class="flex items-center justify-center">
|
|
62
|
+
<eds-pie
|
|
63
|
+
size="${args.size}"
|
|
64
|
+
thickness="${args.thickness}"
|
|
65
|
+
display="${args.display}"
|
|
66
|
+
legend="${args.legend}"
|
|
67
|
+
color-scheme="${args.colorScheme}"
|
|
68
|
+
slices='${JSON.stringify(args.slices)}'
|
|
69
|
+
></eds-pie>
|
|
70
|
+
</div>
|
|
71
|
+
`,
|
|
72
|
+
args: {
|
|
73
|
+
size: 200,
|
|
74
|
+
thickness: 0.5
|
|
75
|
+
}
|
|
76
|
+
};
|
|
@@ -1,37 +1,16 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { toast } from "../../../utils/toastManager";
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Options can be provided in two formats:
|
|
7
|
-
* 1. Dynamic fetch configuration:
|
|
8
|
-
* [
|
|
9
|
-
* { endpoint: "http://localhost/api/applications", value: "_id", label: "title" }
|
|
10
|
-
* ]
|
|
11
|
-
* 2. Static options:
|
|
12
|
-
* [
|
|
13
|
-
* { value: "react", label: "React" },
|
|
14
|
-
* { value: "angular", label: "Angular" },
|
|
15
|
-
* { value: "vue", label: "Vue.js" },
|
|
16
|
-
* // etc.
|
|
17
|
-
* ]
|
|
18
|
-
*
|
|
19
|
-
* The component will automatically fetch data if a dynamic configuration is provided.
|
|
3
|
+
* `eds-input-select` is a lightweight, presentational select component.
|
|
4
|
+
* It accepts a static list of { value, label } options and emits a changeEvent when selection changes.
|
|
20
5
|
*/
|
|
21
6
|
/**
|
|
22
7
|
* @internal
|
|
23
8
|
*/
|
|
24
9
|
export class EdsInputSelect {
|
|
25
10
|
constructor() {
|
|
26
|
-
/**
|
|
27
|
-
* Event handler for the select input's change event.
|
|
28
|
-
* Emits the selected value.
|
|
29
|
-
*
|
|
30
|
-
* @param event The change event from the select input.
|
|
31
|
-
*/
|
|
32
11
|
this.handleChange = (event) => {
|
|
33
12
|
const target = event.target;
|
|
34
|
-
this.
|
|
13
|
+
this.edsselect.emit(target.value);
|
|
35
14
|
};
|
|
36
15
|
this.inputId = undefined;
|
|
37
16
|
this.name = undefined;
|
|
@@ -41,71 +20,18 @@ export class EdsInputSelect {
|
|
|
41
20
|
this.error = false;
|
|
42
21
|
this.required = false;
|
|
43
22
|
this.options = [];
|
|
44
|
-
this.labelKey = 'label';
|
|
45
|
-
this.valueKey = 'value';
|
|
46
23
|
this.value = undefined;
|
|
47
|
-
this.dynamicOptions = [];
|
|
48
|
-
this.loading = false;
|
|
49
|
-
this.dynamicValueKey = 'value';
|
|
50
|
-
this.dynamicLabelKey = 'label';
|
|
51
|
-
this.hasFetched = false;
|
|
52
|
-
}
|
|
53
|
-
componentWillLoad() {
|
|
54
|
-
this.loadOptions();
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Watches for changes in the `options` prop and loads the options accordingly.
|
|
58
|
-
*
|
|
59
|
-
* If the first object in the options array contains an "endpoint" key,
|
|
60
|
-
* the component will fetch options from the specified endpoint using the configured keys.
|
|
61
|
-
* Otherwise, it will treat the options as static.
|
|
62
|
-
*
|
|
63
|
-
* @async
|
|
64
|
-
*/
|
|
65
|
-
async loadOptions() {
|
|
66
|
-
// If the first option contains an "endpoint" key, assume dynamic fetch mode.
|
|
67
|
-
if (this.options && this.options.length > 0 && this.options[0].endpoint) {
|
|
68
|
-
if (this.hasFetched) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const config = this.options[0];
|
|
72
|
-
const endpoint = config.endpoint;
|
|
73
|
-
this.dynamicValueKey = config.value || 'value';
|
|
74
|
-
this.dynamicLabelKey = config.label || 'label';
|
|
75
|
-
this.loading = true;
|
|
76
|
-
try {
|
|
77
|
-
const response = await fetch(endpoint);
|
|
78
|
-
if (!response.ok) {
|
|
79
|
-
toast.show(`<eds-input-select> HTTP error! Status: ${response.status}`, 'error');
|
|
80
|
-
}
|
|
81
|
-
const data = await response.json();
|
|
82
|
-
// Assume the API returns an array of objects.
|
|
83
|
-
this.dynamicOptions = data;
|
|
84
|
-
this.hasFetched = true;
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
//console.error('Error fetching dynamic options:', error);
|
|
88
|
-
toast.show(`<eds-input-select> Error fetching dynamic options ${error}`, 'error');
|
|
89
|
-
}
|
|
90
|
-
finally {
|
|
91
|
-
this.loading = false;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
// No dynamic configuration found, assume static options.
|
|
96
|
-
this.dynamicOptions = this.options;
|
|
97
|
-
this.dynamicValueKey = this.valueKey;
|
|
98
|
-
this.dynamicLabelKey = this.labelKey;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
getValueByPath(obj, path) {
|
|
102
|
-
return path.split('.').reduce((acc, part) => acc && acc[part], obj);
|
|
103
24
|
}
|
|
104
25
|
render() {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
26
|
+
const selectId = this.inputId || this.name;
|
|
27
|
+
const placeholderText = this.placeholder || `Please select ${this.name}`;
|
|
28
|
+
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : undefined;
|
|
29
|
+
return (h("div", { key: '0e1bf5f1ebf30d675e0b4927e7812a305f58d2b9', class: "relative" }, h("select", { key: 'b92542caca12d77e3160baa84760b37bbbe172c7', id: selectId, name: this.name, class: {
|
|
30
|
+
input: true,
|
|
31
|
+
'input-error': this.error,
|
|
32
|
+
'px-4': true,
|
|
33
|
+
'py-2': true
|
|
34
|
+
}, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, disabled: this.disabled, required: this.required, onChange: this.handleChange }, h("option", { key: 'fa911a07fd0053f6c7e5044aac3e6d0846344899', value: "", disabled: true, hidden: true }, placeholderText), this.options.map((opt, index) => (h("option", { key: index, value: opt.value, selected: opt.value === this.value }, opt.label)))), h("span", { key: 'afa3c7ad3c583dec2ffc2fd5087d7695509a2a25', class: "bg-dark rounded-xs absolute top-1/2 right-[6px] flex h-28 w-28 -translate-y-1/2 items-center justify-center" }, h("eds-icon-wrapper", { key: '1bb2a24fc9798a7359b9b45019b1432ff2e50e70', class: "w-20 h-20", icon: "chevron-right" }))));
|
|
109
35
|
}
|
|
110
36
|
static get is() { return "eds-input-select"; }
|
|
111
37
|
static get properties() {
|
|
@@ -122,7 +48,7 @@ export class EdsInputSelect {
|
|
|
122
48
|
"optional": true,
|
|
123
49
|
"docs": {
|
|
124
50
|
"tags": [],
|
|
125
|
-
"text": "Optional id for the
|
|
51
|
+
"text": "Optional id for the select element; defaults to name"
|
|
126
52
|
},
|
|
127
53
|
"attribute": "input-id",
|
|
128
54
|
"reflect": false
|
|
@@ -139,7 +65,7 @@ export class EdsInputSelect {
|
|
|
139
65
|
"optional": false,
|
|
140
66
|
"docs": {
|
|
141
67
|
"tags": [],
|
|
142
|
-
"text": "
|
|
68
|
+
"text": "Name attribute of the select"
|
|
143
69
|
},
|
|
144
70
|
"attribute": "name",
|
|
145
71
|
"reflect": false
|
|
@@ -156,7 +82,7 @@ export class EdsInputSelect {
|
|
|
156
82
|
"optional": true,
|
|
157
83
|
"docs": {
|
|
158
84
|
"tags": [],
|
|
159
|
-
"text": "Placeholder
|
|
85
|
+
"text": "Placeholder shown as a disabled hidden option"
|
|
160
86
|
},
|
|
161
87
|
"attribute": "placeholder",
|
|
162
88
|
"reflect": false
|
|
@@ -173,7 +99,7 @@ export class EdsInputSelect {
|
|
|
173
99
|
"optional": false,
|
|
174
100
|
"docs": {
|
|
175
101
|
"tags": [],
|
|
176
|
-
"text": "
|
|
102
|
+
"text": "Disable the select"
|
|
177
103
|
},
|
|
178
104
|
"attribute": "disabled",
|
|
179
105
|
"reflect": false,
|
|
@@ -191,7 +117,7 @@ export class EdsInputSelect {
|
|
|
191
117
|
"optional": false,
|
|
192
118
|
"docs": {
|
|
193
119
|
"tags": [],
|
|
194
|
-
"text": "
|
|
120
|
+
"text": "Show associated message (help or error)"
|
|
195
121
|
},
|
|
196
122
|
"attribute": "has-message",
|
|
197
123
|
"reflect": false,
|
|
@@ -209,7 +135,7 @@ export class EdsInputSelect {
|
|
|
209
135
|
"optional": false,
|
|
210
136
|
"docs": {
|
|
211
137
|
"tags": [],
|
|
212
|
-
"text": "
|
|
138
|
+
"text": "Mark field as invalid"
|
|
213
139
|
},
|
|
214
140
|
"attribute": "error",
|
|
215
141
|
"reflect": false,
|
|
@@ -227,7 +153,7 @@ export class EdsInputSelect {
|
|
|
227
153
|
"optional": false,
|
|
228
154
|
"docs": {
|
|
229
155
|
"tags": [],
|
|
230
|
-
"text": "
|
|
156
|
+
"text": "Mark field as required"
|
|
231
157
|
},
|
|
232
158
|
"attribute": "required",
|
|
233
159
|
"reflect": false,
|
|
@@ -237,54 +163,23 @@ export class EdsInputSelect {
|
|
|
237
163
|
"type": "unknown",
|
|
238
164
|
"mutable": false,
|
|
239
165
|
"complexType": {
|
|
240
|
-
"original": "{
|
|
241
|
-
"resolved": "{
|
|
242
|
-
"references": {
|
|
166
|
+
"original": "Array<{ value: string | number; label: string }>",
|
|
167
|
+
"resolved": "{ value: string | number; label: string; }[]",
|
|
168
|
+
"references": {
|
|
169
|
+
"Array": {
|
|
170
|
+
"location": "global",
|
|
171
|
+
"id": "global::Array"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
243
174
|
},
|
|
244
175
|
"required": false,
|
|
245
176
|
"optional": false,
|
|
246
177
|
"docs": {
|
|
247
178
|
"tags": [],
|
|
248
|
-
"text": "
|
|
179
|
+
"text": "List of static options: { value, label }"
|
|
249
180
|
},
|
|
250
181
|
"defaultValue": "[]"
|
|
251
182
|
},
|
|
252
|
-
"labelKey": {
|
|
253
|
-
"type": "string",
|
|
254
|
-
"mutable": false,
|
|
255
|
-
"complexType": {
|
|
256
|
-
"original": "string",
|
|
257
|
-
"resolved": "string",
|
|
258
|
-
"references": {}
|
|
259
|
-
},
|
|
260
|
-
"required": false,
|
|
261
|
-
"optional": false,
|
|
262
|
-
"docs": {
|
|
263
|
-
"tags": [],
|
|
264
|
-
"text": "For static options, this property defines the key used to retrieve the display label."
|
|
265
|
-
},
|
|
266
|
-
"attribute": "label-key",
|
|
267
|
-
"reflect": false,
|
|
268
|
-
"defaultValue": "'label'"
|
|
269
|
-
},
|
|
270
|
-
"valueKey": {
|
|
271
|
-
"type": "string",
|
|
272
|
-
"mutable": false,
|
|
273
|
-
"complexType": {
|
|
274
|
-
"original": "string",
|
|
275
|
-
"resolved": "string",
|
|
276
|
-
"references": {}
|
|
277
|
-
},
|
|
278
|
-
"required": false,
|
|
279
|
-
"optional": false,
|
|
280
|
-
"docs": {
|
|
281
|
-
"tags": [],
|
|
282
|
-
"text": "For static options, this property defines the key used to retrieve the option value."
|
|
283
|
-
},
|
|
284
|
-
"attribute": "value-key",
|
|
285
|
-
"reflect": false,
|
|
286
|
-
"defaultValue": "'value'"
|
|
287
|
-
},
|
|
288
183
|
"value": {
|
|
289
184
|
"type": "any",
|
|
290
185
|
"mutable": false,
|
|
@@ -297,35 +192,23 @@ export class EdsInputSelect {
|
|
|
297
192
|
"optional": true,
|
|
298
193
|
"docs": {
|
|
299
194
|
"tags": [],
|
|
300
|
-
"text": "
|
|
195
|
+
"text": "Currently selected value"
|
|
301
196
|
},
|
|
302
197
|
"attribute": "value",
|
|
303
198
|
"reflect": false
|
|
304
199
|
}
|
|
305
200
|
};
|
|
306
201
|
}
|
|
307
|
-
static get states() {
|
|
308
|
-
return {
|
|
309
|
-
"dynamicOptions": {},
|
|
310
|
-
"loading": {},
|
|
311
|
-
"dynamicValueKey": {},
|
|
312
|
-
"dynamicLabelKey": {},
|
|
313
|
-
"hasFetched": {}
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
202
|
static get events() {
|
|
317
203
|
return [{
|
|
318
|
-
"method": "
|
|
319
|
-
"name": "
|
|
204
|
+
"method": "edsselect",
|
|
205
|
+
"name": "edsselect",
|
|
320
206
|
"bubbles": true,
|
|
321
207
|
"cancelable": true,
|
|
322
208
|
"composed": true,
|
|
323
209
|
"docs": {
|
|
324
|
-
"tags": [
|
|
325
|
-
|
|
326
|
-
"text": "changeEvent"
|
|
327
|
-
}],
|
|
328
|
-
"text": "Emitted when the value of the select input changes."
|
|
210
|
+
"tags": [],
|
|
211
|
+
"text": "Emitted when selection changes"
|
|
329
212
|
},
|
|
330
213
|
"complexType": {
|
|
331
214
|
"original": "string | number",
|
|
@@ -334,10 +217,4 @@ export class EdsInputSelect {
|
|
|
334
217
|
}
|
|
335
218
|
}];
|
|
336
219
|
}
|
|
337
|
-
static get watchers() {
|
|
338
|
-
return [{
|
|
339
|
-
"propName": "options",
|
|
340
|
-
"methodName": "loadOptions"
|
|
341
|
-
}];
|
|
342
|
-
}
|
|
343
220
|
}
|