@ebrains/components 0.2.0-alpha.0 → 0.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{color-3ffe3072.js → color-88793e49.js} +2 -2
- package/dist/cjs/color-primary-palette_6.cjs.entry.js +14 -14
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/{eds-alert_28.cjs.entry.js → eds-accordion_33.cjs.entry.js} +773 -162
- package/dist/cjs/eds-card-project.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-section.cjs.entry.js +18 -7
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +48 -1
- package/dist/cjs/eds-components-section.cjs.entry.js +44 -24
- package/dist/cjs/eds-docs-palettes.cjs.entry.js +1 -1
- package/dist/cjs/eds-docs-tokens.cjs.entry.js +1 -1
- package/dist/cjs/eds-login.cjs.entry.js +1 -1
- package/dist/cjs/eds-logo-variations.cjs.entry.js +27 -0
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +1 -1
- package/dist/cjs/{eds-pagination.cjs.entry.js → eds-pagination_2.cjs.entry.js} +184 -9
- package/dist/cjs/eds-progress-bar.cjs.entry.js +29 -0
- package/dist/cjs/eds-rating.cjs.entry.js +5 -7
- package/dist/cjs/eds-svg-repository.cjs.entry.js +7 -1
- package/dist/cjs/eds-tabs-content.cjs.entry.js +3 -3
- package/dist/cjs/eds-tabs.cjs.entry.js +27 -6
- package/dist/cjs/eds-timeline.cjs.entry.js +77 -0
- package/dist/cjs/eds-tooltip.cjs.entry.js +11 -1
- package/dist/cjs/eds-trl.cjs.entry.js +51 -0
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/index-f08e4f5c.js +20 -44
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-space.cjs.entry.js +1 -1
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +36 -0
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +2 -2
- package/dist/cjs/token-list_3.cjs.entry.js +3 -3
- package/dist/cjs/token-ratios.cjs.entry.js +1 -1
- package/dist/cjs/token-spacing.cjs.entry.js +1 -1
- package/dist/cjs/token-typography.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/eds-accordion/eds-accordion.js +11 -20
- package/dist/collection/components/eds-alert/eds-alert.js +5 -7
- package/dist/collection/components/eds-alert/eds-alert.stories.js +4 -4
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +24 -22
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +14 -12
- package/dist/collection/components/eds-button/eds-button.js +3 -3
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +9 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +14 -8
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.stories.js +1 -1
- package/dist/collection/components/eds-code-block/eds-code-block.js +57 -2
- package/dist/collection/components/eds-code-block/eds-code-block.stories.js +78 -0
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +11 -21
- package/dist/collection/components/eds-form/eds-form.js +41 -31
- package/dist/collection/components/eds-form/eds-form.stories.js +0 -3
- package/dist/collection/components/eds-frame/eds-frame.stories.js +19 -18
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +142 -14
- package/dist/collection/components/eds-link/eds-link.js +3 -4
- package/dist/collection/components/eds-modal/eds-modal.css +16 -0
- package/dist/collection/components/eds-modal/eds-modal.js +71 -29
- package/dist/collection/components/eds-modal/eds-modal.stories.js +34 -18
- package/dist/collection/components/eds-pagination/eds-pagination.js +13 -9
- package/dist/collection/components/eds-rating/eds-rating.js +8 -10
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.stories.js +12 -11
- package/dist/collection/components/eds-table/eds-table.css +4 -0
- package/dist/collection/components/eds-table/eds-table.js +83 -12
- package/dist/collection/components/eds-table/eds-table.stories.js +14 -93
- package/dist/collection/components/eds-timeline/eds-timeline.js +27 -16
- package/dist/collection/components/eds-toast/eds-toast.js +21 -0
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +10 -1
- package/dist/collection/components/eds-trl/eds-trl.js +29 -22
- 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 -5
- package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +1 -1
- package/dist/collection/eds-docs-ui/eds-components-section/eds-components-section.js +3 -6
- package/dist/collection/eds-docs-ui/eds-docs-palettes/eds-docs-palettes.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-tokens/eds-docs-tokens.js +1 -1
- package/dist/collection/eds-docs-ui/eds-logo-variations/eds-logo-variations.js +44 -0
- package/dist/collection/eds-docs-ui/eds-svg-repository/eds-svg-repository.js +7 -1
- package/dist/collection/eds-docs-ui/functional/angular.js +1 -1
- package/dist/collection/eds-docs-ui/functional/installation.js +1 -1
- package/dist/collection/eds-docs-ui/functional/overview.js +1 -1
- package/dist/collection/eds-docs-ui/functional/react.js +1 -1
- package/dist/collection/eds-docs-ui/functional/vue.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.css +21 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.js +2 -54
- package/dist/collection/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.js +4 -13
- package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.css +4 -0
- package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.js +1 -1
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +22 -10
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +13 -11
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +1 -1
- package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.js +4 -3
- package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.stories.js +77 -0
- package/dist/collection/shared-ui/eds-header/eds-header.js +9 -5
- package/dist/collection/shared-ui/eds-header/eds-header.stories.js +16 -10
- package/dist/collection/shared-ui/eds-login/eds-login.js +3 -2
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +4 -4
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.stories.js +21 -0
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +29 -8
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.stories.js +22 -4
- package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.js +2 -2
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.css +48 -34
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/shared-ui/eds-user/eds-user.js +12 -6
- package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.js +1 -11
- package/dist/components/analytics.js +2 -2
- package/dist/components/components.css +29 -10
- package/dist/components/components.esm.js +1 -1
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/eds-accordion2.js +12 -20
- package/dist/components/eds-alert2.js +5 -7
- package/dist/components/eds-avatar2.js +1 -1
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +14 -12
- package/dist/components/eds-button2.js +1 -1
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-generic2.js +3 -3
- package/dist/components/eds-card-section.js +18 -7
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-wrapper.js +1 -1
- package/dist/components/eds-code-block2.js +48 -1
- package/dist/components/eds-components-section.js +44 -24
- package/dist/components/eds-docs-palettes.js +1 -1
- package/dist/components/eds-docs-tokens.js +1 -1
- package/dist/components/eds-dropdown2.js +12 -21
- package/dist/components/eds-footer2.js +1 -1
- package/dist/components/eds-form.js +37 -12
- package/dist/components/eds-header.js +6 -2
- package/dist/components/eds-input-select2.js +70 -2
- package/dist/components/eds-link2.js +3 -4
- package/dist/components/eds-login.js +3 -2
- package/dist/components/eds-logo-variations.d.ts +11 -0
- package/dist/components/eds-logo-variations.js +60 -0
- package/dist/components/eds-modal.js +56 -30
- package/dist/components/eds-pagination2.js +13 -9
- package/dist/components/eds-rating.js +6 -8
- package/dist/components/eds-social-networks.js +2 -2
- package/dist/components/eds-social-networks2.js +6 -6
- package/dist/components/eds-svg-repository.js +7 -1
- package/dist/components/eds-table2.js +50 -14
- package/dist/components/eds-tabs-content.js +2 -2
- package/dist/components/eds-tabs.js +26 -5
- package/dist/components/eds-timeline.js +24 -10
- package/dist/components/eds-toast-manager.js +1 -1
- package/dist/components/eds-toast2.js +21 -0
- package/dist/components/eds-tooltip.js +11 -1
- package/dist/components/eds-trl.js +94 -15
- package/dist/components/eds-user-modal2.js +1 -5
- package/dist/components/eds-user2.js +12 -6
- package/dist/components/incorrect-use-of-colors.js +20 -2
- package/dist/components/logo-space.js +1 -1
- package/dist/components/logo-variations-horizontal.js +2 -50
- package/dist/components/logo-variations-horizontal2.js +37 -0
- package/dist/components/logo-variations-vertical.js +2 -50
- package/dist/components/logo-variations-vertical2.js +42 -0
- package/dist/components/logo-wrong-usage.js +2 -2
- package/dist/components/p-005de86f.entry.js +1 -0
- package/dist/components/{p-5eb32f03.entry.js → p-0910d733.entry.js} +1 -1
- package/dist/components/{p-c9c3cc49.entry.js → p-22e6d7d5.entry.js} +1 -1
- package/dist/components/p-2851ff44.entry.js +1 -0
- package/dist/components/p-29648b47.entry.js +1 -0
- package/dist/components/p-2dda1ec4.entry.js +1 -0
- package/dist/components/{p-d9788b54.entry.js → p-35ec730b.entry.js} +1 -1
- package/dist/components/{p-bb60412b.entry.js → p-435a14c1.entry.js} +1 -1
- package/dist/components/{p-e6bfbf51.entry.js → p-5398d652.entry.js} +2 -2
- package/dist/components/p-57c964c5.entry.js +1 -0
- package/dist/components/p-5a43503a.entry.js +1 -0
- package/dist/components/{p-e20ed2c7.entry.js → p-610db2b2.entry.js} +1 -1
- package/dist/components/p-6378fb3e.entry.js +1 -0
- package/dist/components/p-762c8c83.entry.js +1 -0
- package/dist/components/p-7802e966.entry.js +1 -0
- package/dist/components/p-832dc95a.entry.js +1 -0
- package/dist/components/p-855aa1a3.entry.js +1 -0
- package/dist/components/{p-1bcfbaf1.entry.js → p-87830085.entry.js} +1 -1
- package/dist/components/p-8ddc67a1.entry.js +1 -0
- package/dist/components/p-ab32b3fc.entry.js +1 -0
- package/dist/components/p-ac0112d5.entry.js +1 -0
- package/dist/components/p-acb16e1c.entry.js +1 -0
- package/dist/components/p-ae5dbd41.entry.js +1 -0
- package/dist/components/p-b04eff31.entry.js +1 -0
- package/dist/components/p-b86a4985.js +1 -0
- package/dist/components/{p-9722811d.entry.js → p-ba6bafef.entry.js} +1 -1
- package/dist/components/{p-6fc62452.entry.js → p-c3b294a0.entry.js} +1 -1
- package/dist/components/p-c6038449.entry.js +1 -0
- package/dist/components/p-c72c8fb0.entry.js +1 -0
- package/dist/components/p-d53b7a75.entry.js +1 -0
- package/dist/components/{p-b717f95a.entry.js → p-d571d530.entry.js} +1 -1
- package/dist/components/p-dd6daa96.entry.js +1 -0
- package/dist/components/{p-73bd0c97.entry.js → p-df94285c.entry.js} +1 -1
- package/dist/components/primary.js +1 -1
- package/dist/components/primary2.js +1 -1
- package/dist/components/secondary.js +1 -1
- package/dist/components/secondary2.js +7 -7
- package/dist/components/support.js +1 -1
- package/dist/components/support2.js +3 -3
- package/dist/components/token-list2.js +1 -1
- package/dist/components/token-radii2.js +1 -1
- package/dist/components/token-ratios.js +1 -1
- package/dist/components/token-shadows2.js +1 -1
- package/dist/components/token-spacing.js +1 -1
- package/dist/components/token-typography.js +1 -1
- package/dist/esm/{color-0ba8ed56.js → color-bb472c37.js} +2 -2
- package/dist/esm/color-primary-palette_6.entry.js +14 -14
- package/dist/esm/components.js +1 -1
- package/dist/esm/correct-use-of-colors.entry.js +1 -1
- package/dist/esm/{eds-alert_28.entry.js → eds-accordion_33.entry.js} +767 -161
- package/dist/esm/eds-card-project.entry.js +1 -1
- package/dist/esm/eds-card-section.entry.js +18 -7
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +1 -1
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +49 -2
- package/dist/esm/eds-components-section.entry.js +44 -24
- package/dist/esm/eds-docs-palettes.entry.js +1 -1
- package/dist/esm/eds-docs-tokens.entry.js +1 -1
- package/dist/esm/eds-login.entry.js +1 -1
- package/dist/esm/eds-logo-variations.entry.js +23 -0
- package/dist/esm/eds-matomo-notice.entry.js +1 -1
- package/dist/esm/{eds-pagination.entry.js → eds-pagination_2.entry.js} +184 -10
- package/dist/esm/eds-progress-bar.entry.js +25 -0
- package/dist/esm/eds-rating.entry.js +5 -7
- package/dist/esm/eds-svg-repository.entry.js +8 -2
- package/dist/esm/eds-tabs-content.entry.js +3 -3
- package/dist/esm/eds-tabs.entry.js +27 -6
- package/dist/esm/eds-timeline.entry.js +73 -0
- package/dist/esm/eds-tooltip.entry.js +11 -1
- package/dist/esm/eds-trl.entry.js +47 -0
- package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
- package/dist/esm/index-e96badea.js +20 -44
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-space.entry.js +1 -1
- package/dist/esm/logo-variations-horizontal_2.entry.js +31 -0
- package/dist/esm/logo-wrong-usage.entry.js +2 -2
- package/dist/esm/token-list_3.entry.js +3 -3
- package/dist/esm/token-ratios.entry.js +1 -1
- package/dist/esm/token-spacing.entry.js +1 -1
- package/dist/esm/token-typography.entry.js +1 -1
- package/dist/hydrate/index.js +1116 -783
- package/dist/hydrate/index.mjs +1116 -783
- package/dist/types/components/eds-accordion/eds-accordion.d.ts +5 -12
- package/dist/types/components/eds-avatar/eds-avatar.stories.d.ts +0 -18
- package/dist/types/components/eds-breadcrump/eds-breadcrump.d.ts +1 -5
- package/dist/types/components/eds-button/eds-button.d.ts +2 -2
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.d.ts +8 -0
- package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.d.ts +6 -2
- package/dist/types/components/eds-code-block/eds-code-block.d.ts +43 -3
- package/dist/types/components/eds-code-block/eds-code-block.stories.d.ts +54 -0
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +0 -7
- package/dist/types/components/eds-form/eds-form.d.ts +3 -6
- package/dist/types/components/eds-form/eds-form.stories.d.ts +0 -5
- package/dist/types/components/eds-frame/eds-frame.stories.d.ts +0 -2
- package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +108 -2
- package/dist/types/components/eds-link/eds-link.d.ts +1 -1
- package/dist/types/components/eds-modal/eds-modal.d.ts +18 -3
- package/dist/types/components/eds-modal/eds-modal.stories.d.ts +9 -0
- package/dist/types/components/eds-rating/eds-rating.d.ts +4 -6
- package/dist/types/components/eds-section/eds-section-core/eds-section-core.stories.d.ts +0 -1
- package/dist/types/components/eds-table/eds-table.d.ts +9 -1
- package/dist/types/components/eds-table/eds-table.stories.d.ts +6 -67
- package/dist/types/components/eds-timeline/eds-timeline.d.ts +9 -12
- package/dist/types/components/eds-toast/eds-toast.d.ts +9 -0
- package/dist/types/components/eds-trl/eds-trl.d.ts +4 -1
- package/dist/types/components.d.ts +217 -56
- package/dist/types/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.d.ts +0 -4
- package/dist/types/eds-docs-ui/eds-logo-variations/eds-logo-variations.d.ts +9 -0
- package/dist/types/eds-docs-ui/eds-svg-repository/eds-svg-repository.d.ts +2 -0
- package/dist/types/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.d.ts +1 -7
- package/dist/types/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.d.ts +1 -1
- package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +1 -1
- package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +42 -2
- package/dist/types/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.d.ts +8 -2
- package/dist/types/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.stories.d.ts +29 -0
- package/dist/types/shared-ui/eds-header/eds-header.d.ts +7 -1
- package/dist/types/shared-ui/eds-header/eds-header.stories.d.ts +9 -1
- package/dist/types/shared-ui/eds-social-networks/eds-social-networks.d.ts +1 -1
- package/dist/types/shared-ui/eds-social-networks/eds-social-networks.stories.d.ts +13 -0
- package/dist/types/shared-ui/eds-tabs/eds-tabs.d.ts +18 -1
- package/dist/types/shared-ui/eds-user/eds-user.d.ts +1 -2
- package/package.json +3 -3
- package/dist/cjs/eds-accordion.cjs.entry.js +0 -93
- package/dist/cjs/eds-block-break.cjs.entry.js +0 -21
- package/dist/cjs/eds-breadcrumb.cjs.entry.js +0 -153
- package/dist/cjs/eds-footer.cjs.entry.js +0 -50
- package/dist/cjs/eds-frame.cjs.entry.js +0 -91
- package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +0 -100
- package/dist/cjs/eds-modal.cjs.entry.js +0 -86
- package/dist/cjs/eds-social-networks.cjs.entry.js +0 -66
- package/dist/cjs/eds-table.cjs.entry.js +0 -143
- package/dist/cjs/logo-variations-horizontal.cjs.entry.js +0 -31
- package/dist/cjs/logo-variations-vertical.cjs.entry.js +0 -31
- package/dist/collection/components/eds-trl/eds-trl.css +0 -0
- package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.css +0 -0
- package/dist/components/p-02e2a62f.entry.js +0 -1
- package/dist/components/p-04e47e04.entry.js +0 -1
- package/dist/components/p-0a3b2576.entry.js +0 -1
- package/dist/components/p-0c99ef81.entry.js +0 -1
- package/dist/components/p-272d249f.entry.js +0 -1
- package/dist/components/p-2d8508cd.entry.js +0 -1
- package/dist/components/p-32f282a9.entry.js +0 -1
- package/dist/components/p-373673ca.js +0 -1
- package/dist/components/p-3a2e8ef3.entry.js +0 -1
- package/dist/components/p-3afafa59.entry.js +0 -1
- package/dist/components/p-3b40559e.entry.js +0 -1
- package/dist/components/p-42b4ecff.entry.js +0 -1
- package/dist/components/p-49958f77.entry.js +0 -1
- package/dist/components/p-54c75346.entry.js +0 -1
- package/dist/components/p-551c0b58.entry.js +0 -1
- package/dist/components/p-559b6ec9.entry.js +0 -1
- package/dist/components/p-5ae9722b.entry.js +0 -1
- package/dist/components/p-79887c2c.entry.js +0 -1
- package/dist/components/p-9000b245.entry.js +0 -1
- package/dist/components/p-96c4deda.entry.js +0 -1
- package/dist/components/p-b14ef448.entry.js +0 -1
- package/dist/components/p-b203eb1b.entry.js +0 -1
- package/dist/components/p-b33941a0.entry.js +0 -1
- package/dist/components/p-bca40434.entry.js +0 -1
- package/dist/components/p-df93db96.entry.js +0 -1
- package/dist/components/p-ebed87b8.entry.js +0 -1
- package/dist/components/p-ff5de62c.entry.js +0 -1
- package/dist/components/p-ffec8755.entry.js +0 -1
- package/dist/esm/eds-accordion.entry.js +0 -89
- package/dist/esm/eds-block-break.entry.js +0 -17
- package/dist/esm/eds-breadcrumb.entry.js +0 -149
- package/dist/esm/eds-footer.entry.js +0 -46
- package/dist/esm/eds-frame.entry.js +0 -87
- package/dist/esm/eds-fullscreen-menu.entry.js +0 -96
- package/dist/esm/eds-modal.entry.js +0 -82
- package/dist/esm/eds-social-networks.entry.js +0 -62
- package/dist/esm/eds-table.entry.js +0 -139
- package/dist/esm/logo-variations-horizontal.entry.js +0 -27
- package/dist/esm/logo-variations-vertical.entry.js +0 -27
- /package/dist/collection/shared-ui/eds-social-networks/{eds-social-network.css → eds-social-networks.css} +0 -0
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { toast } from "../../../utils/toastManager";
|
|
3
|
+
/**
|
|
4
|
+
* A custom select input component that supports both static and dynamic options.
|
|
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.
|
|
20
|
+
*/
|
|
2
21
|
/**
|
|
3
22
|
* @internal
|
|
4
23
|
*/
|
|
5
24
|
export class EdsInputSelect {
|
|
6
25
|
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
|
+
*/
|
|
7
32
|
this.handleChange = (event) => {
|
|
8
33
|
const target = event.target;
|
|
9
34
|
this.changeEvent.emit(target.value);
|
|
@@ -16,10 +41,60 @@ export class EdsInputSelect {
|
|
|
16
41
|
this.error = false;
|
|
17
42
|
this.required = false;
|
|
18
43
|
this.options = [];
|
|
44
|
+
this.labelKey = 'label';
|
|
45
|
+
this.valueKey = 'value';
|
|
19
46
|
this.value = undefined;
|
|
47
|
+
this.dynamicOptions = [];
|
|
48
|
+
this.loading = false;
|
|
49
|
+
this.dynamicValueKey = 'value';
|
|
50
|
+
this.dynamicLabelKey = 'label';
|
|
51
|
+
}
|
|
52
|
+
componentWillLoad() {
|
|
53
|
+
this.loadOptions();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Watches for changes in the `options` prop and loads the options accordingly.
|
|
57
|
+
*
|
|
58
|
+
* If the first object in the options array contains an "endpoint" key,
|
|
59
|
+
* the component will fetch options from the specified endpoint using the configured keys.
|
|
60
|
+
* Otherwise, it will treat the options as static.
|
|
61
|
+
*
|
|
62
|
+
* @async
|
|
63
|
+
*/
|
|
64
|
+
async loadOptions() {
|
|
65
|
+
// If the first option contains an "endpoint" key, assume dynamic fetch mode.
|
|
66
|
+
if (this.options && this.options.length > 0 && this.options[0].endpoint) {
|
|
67
|
+
const config = this.options[0];
|
|
68
|
+
const endpoint = config.endpoint;
|
|
69
|
+
this.dynamicValueKey = config.value || 'value';
|
|
70
|
+
this.dynamicLabelKey = config.label || 'label';
|
|
71
|
+
this.loading = true;
|
|
72
|
+
try {
|
|
73
|
+
const response = await fetch(endpoint);
|
|
74
|
+
if (!response.ok) {
|
|
75
|
+
toast.show(`<eds-input-select> HTTP error! Status: ${response.status}`, 'error');
|
|
76
|
+
}
|
|
77
|
+
const data = await response.json();
|
|
78
|
+
// Assume the API returns an array of objects.
|
|
79
|
+
this.dynamicOptions = data;
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
//console.error('Error fetching dynamic options:', error);
|
|
83
|
+
toast.show(`<eds-input-select> Error fetching dynamic options ${error}`, 'error');
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
this.loading = false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
// No dynamic configuration found, assume static options.
|
|
91
|
+
this.dynamicOptions = this.options;
|
|
92
|
+
this.dynamicValueKey = this.valueKey;
|
|
93
|
+
this.dynamicLabelKey = this.labelKey;
|
|
94
|
+
}
|
|
20
95
|
}
|
|
21
96
|
render() {
|
|
22
|
-
return (h("div", { key: '
|
|
97
|
+
return (h("div", { key: 'd37107564a86281b3a3920a5eb128f47f6fd4ceb', class: "relative" }, h("select", { key: 'a69cd907ef6732ec42a99fd46bbf9a52ef03735a', id: this.inputId || this.name, name: this.name, class: `input invalid:text-lightest pr-32 ${this.error ? 'input-error' : ''}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": this.hasMessage || this.error ? `${this.name}-error` : '', disabled: this.disabled || this.loading, required: this.required, onChange: this.handleChange }, h("option", { key: '8b84a2b7edd7e989411908b16f35c46853889d8e', value: "", disabled: true, hidden: true }, this.loading ? 'Loading options...' : `Please select ${this.name}`), this.dynamicOptions.map((option, index) => (h("option", { key: index, value: option[this.dynamicValueKey] }, option[this.dynamicLabelKey])))), h("span", { key: 'dbccb6161aafc2dc31cc6dd5b3d8c812545eab9a', class: `bg-dark rounded-xs absolute top-1/2 right-[6px] flex h-28 w-28 -translate-y-1/2 items-center justify-center ${this.disabled || this.loading ? 'text-lightest bg-transparent' : ''}` }, h("eds-icon-wrapper", { key: 'b0fd24cb54185d8558dfabcb94d05b6257caacd1', class: "w-20 h-20", icon: "chevron-right" }))));
|
|
23
98
|
}
|
|
24
99
|
static get is() { return "eds-input-select"; }
|
|
25
100
|
static get properties() {
|
|
@@ -36,7 +111,7 @@ export class EdsInputSelect {
|
|
|
36
111
|
"optional": true,
|
|
37
112
|
"docs": {
|
|
38
113
|
"tags": [],
|
|
39
|
-
"text": ""
|
|
114
|
+
"text": "Optional id for the input. If not provided, the component uses the `name` property."
|
|
40
115
|
},
|
|
41
116
|
"attribute": "input-id",
|
|
42
117
|
"reflect": false
|
|
@@ -53,7 +128,7 @@ export class EdsInputSelect {
|
|
|
53
128
|
"optional": false,
|
|
54
129
|
"docs": {
|
|
55
130
|
"tags": [],
|
|
56
|
-
"text": ""
|
|
131
|
+
"text": "The name attribute of the select input. Also used as the fallback id."
|
|
57
132
|
},
|
|
58
133
|
"attribute": "name",
|
|
59
134
|
"reflect": false
|
|
@@ -70,7 +145,7 @@ export class EdsInputSelect {
|
|
|
70
145
|
"optional": true,
|
|
71
146
|
"docs": {
|
|
72
147
|
"tags": [],
|
|
73
|
-
"text": ""
|
|
148
|
+
"text": "Placeholder text (not used in the native select, but can be used for custom implementations)."
|
|
74
149
|
},
|
|
75
150
|
"attribute": "placeholder",
|
|
76
151
|
"reflect": false
|
|
@@ -87,7 +162,7 @@ export class EdsInputSelect {
|
|
|
87
162
|
"optional": false,
|
|
88
163
|
"docs": {
|
|
89
164
|
"tags": [],
|
|
90
|
-
"text": ""
|
|
165
|
+
"text": "If true, the select input will be disabled."
|
|
91
166
|
},
|
|
92
167
|
"attribute": "disabled",
|
|
93
168
|
"reflect": false,
|
|
@@ -105,7 +180,7 @@ export class EdsInputSelect {
|
|
|
105
180
|
"optional": false,
|
|
106
181
|
"docs": {
|
|
107
182
|
"tags": [],
|
|
108
|
-
"text": ""
|
|
183
|
+
"text": "If true, indicates that there is an associated message (help or error)."
|
|
109
184
|
},
|
|
110
185
|
"attribute": "has-message",
|
|
111
186
|
"reflect": false,
|
|
@@ -123,7 +198,7 @@ export class EdsInputSelect {
|
|
|
123
198
|
"optional": false,
|
|
124
199
|
"docs": {
|
|
125
200
|
"tags": [],
|
|
126
|
-
"text": ""
|
|
201
|
+
"text": "If true, the select input is in an error state."
|
|
127
202
|
},
|
|
128
203
|
"attribute": "error",
|
|
129
204
|
"reflect": false,
|
|
@@ -141,7 +216,7 @@ export class EdsInputSelect {
|
|
|
141
216
|
"optional": false,
|
|
142
217
|
"docs": {
|
|
143
218
|
"tags": [],
|
|
144
|
-
"text": ""
|
|
219
|
+
"text": "If true, the select input is marked as required."
|
|
145
220
|
},
|
|
146
221
|
"attribute": "required",
|
|
147
222
|
"reflect": false,
|
|
@@ -151,18 +226,54 @@ export class EdsInputSelect {
|
|
|
151
226
|
"type": "unknown",
|
|
152
227
|
"mutable": false,
|
|
153
228
|
"complexType": {
|
|
154
|
-
"original": "{
|
|
155
|
-
"resolved": "{
|
|
229
|
+
"original": "{ [key: string]: any }[]",
|
|
230
|
+
"resolved": "{ [key: string]: any; }[]",
|
|
156
231
|
"references": {}
|
|
157
232
|
},
|
|
158
233
|
"required": false,
|
|
159
234
|
"optional": false,
|
|
160
235
|
"docs": {
|
|
161
236
|
"tags": [],
|
|
162
|
-
"text": ""
|
|
237
|
+
"text": "Options can be provided in two formats:\n\n1. Dynamic fetch configuration:\n [\n { endpoint: \"http://localhost/api/applications\", value: \"_id\", label: \"title\" }\n ]\n\n2. Static options:\n [\n { value: \"react\", label: \"React\" },\n { value: \"angular\", label: \"Angular\" },\n { value: \"vue\", label: \"Vue.js\" },\n // etc.\n ]"
|
|
163
238
|
},
|
|
164
239
|
"defaultValue": "[]"
|
|
165
240
|
},
|
|
241
|
+
"labelKey": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"mutable": false,
|
|
244
|
+
"complexType": {
|
|
245
|
+
"original": "string",
|
|
246
|
+
"resolved": "string",
|
|
247
|
+
"references": {}
|
|
248
|
+
},
|
|
249
|
+
"required": false,
|
|
250
|
+
"optional": false,
|
|
251
|
+
"docs": {
|
|
252
|
+
"tags": [],
|
|
253
|
+
"text": "For static options, this property defines the key used to retrieve the display label."
|
|
254
|
+
},
|
|
255
|
+
"attribute": "label-key",
|
|
256
|
+
"reflect": false,
|
|
257
|
+
"defaultValue": "'label'"
|
|
258
|
+
},
|
|
259
|
+
"valueKey": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "string",
|
|
264
|
+
"resolved": "string",
|
|
265
|
+
"references": {}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": false,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": "For static options, this property defines the key used to retrieve the option value."
|
|
272
|
+
},
|
|
273
|
+
"attribute": "value-key",
|
|
274
|
+
"reflect": false,
|
|
275
|
+
"defaultValue": "'value'"
|
|
276
|
+
},
|
|
166
277
|
"value": {
|
|
167
278
|
"type": "any",
|
|
168
279
|
"mutable": false,
|
|
@@ -175,13 +286,21 @@ export class EdsInputSelect {
|
|
|
175
286
|
"optional": true,
|
|
176
287
|
"docs": {
|
|
177
288
|
"tags": [],
|
|
178
|
-
"text": ""
|
|
289
|
+
"text": "The currently selected value."
|
|
179
290
|
},
|
|
180
291
|
"attribute": "value",
|
|
181
292
|
"reflect": false
|
|
182
293
|
}
|
|
183
294
|
};
|
|
184
295
|
}
|
|
296
|
+
static get states() {
|
|
297
|
+
return {
|
|
298
|
+
"dynamicOptions": {},
|
|
299
|
+
"loading": {},
|
|
300
|
+
"dynamicValueKey": {},
|
|
301
|
+
"dynamicLabelKey": {}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
185
304
|
static get events() {
|
|
186
305
|
return [{
|
|
187
306
|
"method": "changeEvent",
|
|
@@ -190,8 +309,11 @@ export class EdsInputSelect {
|
|
|
190
309
|
"cancelable": true,
|
|
191
310
|
"composed": true,
|
|
192
311
|
"docs": {
|
|
193
|
-
"tags": [
|
|
194
|
-
|
|
312
|
+
"tags": [{
|
|
313
|
+
"name": "event",
|
|
314
|
+
"text": "changeEvent"
|
|
315
|
+
}],
|
|
316
|
+
"text": "Emitted when the value of the select input changes."
|
|
195
317
|
},
|
|
196
318
|
"complexType": {
|
|
197
319
|
"original": "string | number",
|
|
@@ -200,4 +322,10 @@ export class EdsInputSelect {
|
|
|
200
322
|
}
|
|
201
323
|
}];
|
|
202
324
|
}
|
|
325
|
+
static get watchers() {
|
|
326
|
+
return [{
|
|
327
|
+
"propName": "options",
|
|
328
|
+
"methodName": "loadOptions"
|
|
329
|
+
}];
|
|
330
|
+
}
|
|
203
331
|
}
|
|
@@ -149,12 +149,11 @@ export class EdsLink {
|
|
|
149
149
|
this.hideLabelOnSmallScreen = false;
|
|
150
150
|
this.extraClass = undefined;
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
handleParentContext(event) {
|
|
153
153
|
if (event.target !== this.el) {
|
|
154
154
|
// Ignore the event if it's not targeted at this specific instance
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
//console.log(event.detail);
|
|
158
157
|
this.parentContext = event.detail;
|
|
159
158
|
event.stopPropagation();
|
|
160
159
|
}
|
|
@@ -205,7 +204,7 @@ export class EdsLink {
|
|
|
205
204
|
const labelClasses = this.hideLabelOnSmallScreen
|
|
206
205
|
? 'hidden lg:flex' // Tailwind example: hidden on small screens, visible on larger
|
|
207
206
|
: '';
|
|
208
|
-
return (h(ComponentType, { key: '
|
|
207
|
+
return (h(ComponentType, { key: '58eb3c1c5c192c2855424864c9e3e9c7a5fe3378', class: `${classes || ''} ${this.extraClass || ''}`, href: !this.disabled ? this.url : undefined, target: this.external && !this.disabled ? '_blank' : undefined, rel: this.external && !this.disabled ? 'noopener noreferrer' : undefined, "aria-label": this.label || this.ariaLabel || undefined, "aria-disabled": this.disabled ? 'true' : null, download: this.download ? '' : undefined, onClick: (event) => this.handleClick(event) }, h("span", { key: 'd4033ba589552f60f8dc7559434a3c035d226de4', class: "z-1 relative inline-flex items-center justify-center" }, this.renderLeftIcon(), h("span", { key: 'ca520cc66febaf8c8ddfd2fd8ee8a13b71a3078d', class: labelClasses }, this.label), this.renderRightIcon())));
|
|
209
208
|
}
|
|
210
209
|
static get is() { return "eds-link"; }
|
|
211
210
|
static get encapsulation() { return "shadow"; }
|
|
@@ -473,7 +472,7 @@ export class EdsLink {
|
|
|
473
472
|
static get listeners() {
|
|
474
473
|
return [{
|
|
475
474
|
"name": "parentContext",
|
|
476
|
-
"method": "
|
|
475
|
+
"method": "handleParentContext",
|
|
477
476
|
"target": undefined,
|
|
478
477
|
"capture": false,
|
|
479
478
|
"passive": false
|
|
@@ -92,10 +92,26 @@
|
|
|
92
92
|
left: 50%;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
.left-20 {
|
|
96
|
+
left: 1.25rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.right-20 {
|
|
100
|
+
right: 1.25rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
95
103
|
.top-1\/2 {
|
|
96
104
|
top: 50%;
|
|
97
105
|
}
|
|
98
106
|
|
|
107
|
+
.top-20 {
|
|
108
|
+
top: 1.25rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.bottom-20 {
|
|
112
|
+
bottom: 1.25rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
99
115
|
.grow {
|
|
100
116
|
flex-grow: 1;
|
|
101
117
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { sendAnalytics } from "../../../../../../../packages/utils/src/index";
|
|
1
2
|
import { h } from "@stencil/core";
|
|
2
3
|
//import { sendAnalytics } from '@ebrains/utils';
|
|
3
4
|
/**
|
|
@@ -16,33 +17,59 @@ export class EdsModal {
|
|
|
16
17
|
this.title = '';
|
|
17
18
|
this.truncate = true;
|
|
18
19
|
this.truncateLines = '1';
|
|
20
|
+
this.position = 'middle';
|
|
19
21
|
}
|
|
20
22
|
getTruncateClass() {
|
|
21
23
|
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
|
|
22
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Returns the Tailwind CSS classes to position the modal based on the `position` prop.
|
|
27
|
+
*
|
|
28
|
+
* @private
|
|
29
|
+
* @returns {string} The concatenated CSS classes for modal positioning.
|
|
30
|
+
*/
|
|
31
|
+
getModalPositionClasses() {
|
|
32
|
+
switch (this.position) {
|
|
33
|
+
case 'top':
|
|
34
|
+
return 'left-1/2 top-20 -translate-x-1/2';
|
|
35
|
+
case 'bottom':
|
|
36
|
+
return 'left-1/2 bottom-20 -translate-x-1/2';
|
|
37
|
+
case 'left':
|
|
38
|
+
return 'left-20 top-1/2 -translate-y-1/2';
|
|
39
|
+
case 'right':
|
|
40
|
+
return 'right-20 top-1/2 -translate-y-1/2';
|
|
41
|
+
case 'middle':
|
|
42
|
+
default:
|
|
43
|
+
return 'left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
23
46
|
/**
|
|
24
47
|
* Opens the modal.
|
|
25
48
|
*/
|
|
26
49
|
async open() {
|
|
50
|
+
var _a;
|
|
27
51
|
this.isOpen = true;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
52
|
+
sendAnalytics({
|
|
53
|
+
category: 'ui-component',
|
|
54
|
+
parentContext: null,
|
|
55
|
+
tag: this.el.tagName.toLowerCase(),
|
|
56
|
+
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
57
|
+
action: 'opened'
|
|
58
|
+
});
|
|
34
59
|
}
|
|
35
60
|
/**
|
|
36
61
|
* Closes the modal.
|
|
37
62
|
*/
|
|
38
63
|
async close() {
|
|
64
|
+
var _a;
|
|
39
65
|
this.isOpen = false;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
66
|
+
sendAnalytics({
|
|
67
|
+
category: 'ui-component',
|
|
68
|
+
parentContext: null,
|
|
69
|
+
tag: this.el.tagName.toLowerCase(),
|
|
70
|
+
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
71
|
+
action: 'closed'
|
|
72
|
+
});
|
|
46
73
|
}
|
|
47
74
|
/**
|
|
48
75
|
* Toggles the modal open or closed.
|
|
@@ -56,30 +83,27 @@ export class EdsModal {
|
|
|
56
83
|
*/
|
|
57
84
|
componentDidLoad() {
|
|
58
85
|
// Emit context for each eds-link element after the component is fully loaded
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
this.emitContext(btn);
|
|
62
|
-
});
|
|
86
|
+
//const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
87
|
+
//this.emitContext(btn);
|
|
63
88
|
}
|
|
64
89
|
/**
|
|
65
90
|
* Emits a custom event called `parentContext` for a given button element.
|
|
66
91
|
* This event provides context information about the eds-modal component.
|
|
67
|
-
*
|
|
68
|
-
* @param btnElement - The link element to which the event will be dispatched.
|
|
69
92
|
*/
|
|
70
|
-
emitContext(btnElement) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
93
|
+
/*emitContext(btnElement: HTMLElement) {
|
|
94
|
+
const event = new CustomEvent<ParentContextDetail>('parentContext', {
|
|
95
|
+
detail: {
|
|
96
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
97
|
+
identifier: null
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
btnElement.dispatchEvent(event);
|
|
102
|
+
}*/
|
|
79
103
|
render() {
|
|
80
|
-
return (h("div", { key: '
|
|
104
|
+
return (h("div", { key: 'eedcdc49c9f4a16ef4537ec02335757aa1143bd9', class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-50 flex` }, this.isOpen && (h("div", { key: '2b24903b85895fd5eca389d6897aa85c892e762f', class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
|
|
81
105
|
,
|
|
82
|
-
onClick: () => this.close() })), h("div", { key: '
|
|
106
|
+
onClick: () => this.close() })), h("div", { key: 'd135a2d9eff1764b6335b9b16be54d8fec7d4112', class: `max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center` }, h("div", { key: 'bc8ea6f95443f01d3e5b88953581e1f2eae4009c', class: "flex justify-between items-center border-b-2 border-softer pb-8" }, h("span", { key: '872b9a4bf44db478d38f18d3459a816c119f352d', class: `f-heading-04 text-lighter ${this.getTruncateClass()}` }, this.title), h("eds-button", { key: 'bdf27a3f564d295383985cb1f0ce7df7f13a97fb', intent: "tertiary", icon: "close", "aria-label": "Close modal", onClick: () => this.close(), "extra-class": "ml-8" })), h("div", { key: '600cc4d544d0a41d9d2be74aedbb0d2fe2028141', class: "pt-8" }, h("slot", { key: '8ce560804a6d960b4075e4b6d1607dda6530c08d' })))));
|
|
83
107
|
}
|
|
84
108
|
static get is() { return "eds-modal"; }
|
|
85
109
|
static get encapsulation() { return "shadow"; }
|
|
@@ -148,6 +172,24 @@ export class EdsModal {
|
|
|
148
172
|
"attribute": "truncate-lines",
|
|
149
173
|
"reflect": false,
|
|
150
174
|
"defaultValue": "'1'"
|
|
175
|
+
},
|
|
176
|
+
"position": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"mutable": false,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "'middle' | 'top' | 'bottom' | 'left' | 'right'",
|
|
181
|
+
"resolved": "\"bottom\" | \"left\" | \"middle\" | \"right\" | \"top\"",
|
|
182
|
+
"references": {}
|
|
183
|
+
},
|
|
184
|
+
"required": false,
|
|
185
|
+
"optional": false,
|
|
186
|
+
"docs": {
|
|
187
|
+
"tags": [],
|
|
188
|
+
"text": "Specifies the position of the modal.\n\nAcceptable values are:\n- `\"middle\"` (default): The modal is centered both vertically and horizontally.\n- `\"top\"`: The modal is positioned near the top of the viewport.\n- `\"bottom\"`: The modal is positioned near the bottom of the viewport.\n- `\"left\"`: The modal is positioned on the left side of the viewport, centered vertically.\n- `\"right\"`: The modal is positioned on the right side of the viewport, centered vertically."
|
|
189
|
+
},
|
|
190
|
+
"attribute": "position",
|
|
191
|
+
"reflect": false,
|
|
192
|
+
"defaultValue": "'middle'"
|
|
151
193
|
}
|
|
152
194
|
};
|
|
153
195
|
}
|
|
@@ -7,41 +7,55 @@ export default {
|
|
|
7
7
|
control: 'text',
|
|
8
8
|
description: 'Title of the modal',
|
|
9
9
|
defaultValue: 'Default Modal Title'
|
|
10
|
+
},
|
|
11
|
+
position: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['middle', 'top', 'bottom', 'left', 'right'],
|
|
14
|
+
description: 'Position of the modal in the viewport'
|
|
10
15
|
}
|
|
16
|
+
},
|
|
17
|
+
args: {
|
|
18
|
+
title: 'Default Modal Title',
|
|
19
|
+
position: 'middle'
|
|
11
20
|
}
|
|
12
21
|
};
|
|
13
|
-
const Template = ({ title }) => {
|
|
22
|
+
const Template = ({ title, position }) => {
|
|
14
23
|
const openModal = () => {
|
|
15
|
-
|
|
24
|
+
var _a;
|
|
25
|
+
// Open the first instance of eds-modal on the page
|
|
26
|
+
(_a = document.querySelector('eds-modal')) === null || _a === void 0 ? void 0 : _a.open();
|
|
16
27
|
};
|
|
17
28
|
return html `
|
|
18
|
-
<!-- Modal component with dynamic title -->
|
|
19
|
-
<eds-modal title="${title}">
|
|
29
|
+
<!-- Modal component with dynamic title and position -->
|
|
30
|
+
<eds-modal title="${title}" position="${position}">
|
|
20
31
|
<p>This is the content inside the modal.</p>
|
|
21
32
|
</eds-modal>
|
|
22
33
|
|
|
23
|
-
<!--
|
|
24
|
-
<eds-button intent="primary" label="Open Modal
|
|
34
|
+
<!-- Button to control modal -->
|
|
35
|
+
<eds-button intent="primary" label="Open Modal" @click="${openModal}"></eds-button>
|
|
25
36
|
`;
|
|
26
37
|
};
|
|
27
38
|
export const Default = Template.bind({});
|
|
28
39
|
Default.args = {
|
|
29
|
-
title: 'Default Modal Title'
|
|
40
|
+
title: 'Default Modal Title',
|
|
41
|
+
position: 'middle'
|
|
30
42
|
};
|
|
31
|
-
const TemplateWithForm = ({ title }) => {
|
|
43
|
+
const TemplateWithForm = ({ title, position }) => {
|
|
32
44
|
const openModal = () => {
|
|
33
|
-
|
|
45
|
+
var _a;
|
|
46
|
+
(_a = document.querySelector('eds-modal')) === null || _a === void 0 ? void 0 : _a.open();
|
|
34
47
|
};
|
|
35
|
-
return html `
|
|
36
|
-
|
|
48
|
+
return html `
|
|
49
|
+
<!-- Modal with eds-form inside the slot -->
|
|
50
|
+
<eds-modal title="${title}" position="${position}">
|
|
37
51
|
<eds-form
|
|
38
52
|
name="extended-form"
|
|
39
53
|
endpoint="http://127.0.0.1:5000/api/data"
|
|
40
54
|
fields='[
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
55
|
+
{"name": "username", "label": "Username", "type": "text", "required": true, "maxlength": 10},
|
|
56
|
+
{"name": "email", "label": "Email", "type": "email", "required": true},
|
|
57
|
+
{"name": "number", "label": "Number", "type": "number", "required": true}
|
|
58
|
+
]'
|
|
45
59
|
success-message="Form submitted successfully!"
|
|
46
60
|
error-message="Please fix the errors in the form."
|
|
47
61
|
submit-btn="true"
|
|
@@ -50,15 +64,17 @@ const TemplateWithForm = ({ title }) => {
|
|
|
50
64
|
></eds-form>
|
|
51
65
|
</eds-modal>
|
|
52
66
|
|
|
53
|
-
<!--
|
|
67
|
+
<!-- Button to control modal -->
|
|
54
68
|
<eds-button
|
|
55
69
|
intent="primary"
|
|
56
70
|
label="Open Modal with Form"
|
|
57
71
|
@click="${openModal}"
|
|
58
72
|
style="margin-right: 10px;"
|
|
59
|
-
></eds-button
|
|
73
|
+
></eds-button>
|
|
74
|
+
`;
|
|
60
75
|
};
|
|
61
76
|
export const ModalWithForm = TemplateWithForm.bind({});
|
|
62
77
|
ModalWithForm.args = {
|
|
63
|
-
title: 'Extended Form Modal'
|
|
78
|
+
title: 'Extended Form Modal',
|
|
79
|
+
position: 'middle'
|
|
64
80
|
};
|
|
@@ -32,14 +32,18 @@ export class EdsPagination {
|
|
|
32
32
|
componentDidLoad() {
|
|
33
33
|
// Emit context for each eds-link element after the component is fully loaded
|
|
34
34
|
const links = this.hostEl.shadowRoot.querySelectorAll('eds-link');
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
links.forEach((lnk) => {
|
|
36
|
+
this.emitContext(lnk);
|
|
37
|
+
});
|
|
38
|
+
/*if (links.length > 0) {
|
|
39
|
+
// Emit context for the first link
|
|
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
|
+
}*/
|
|
43
47
|
}
|
|
44
48
|
/**
|
|
45
49
|
* Emits a custom event called `parentContext` for a given link element.
|
|
@@ -169,7 +173,7 @@ export class EdsPagination {
|
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
render() {
|
|
172
|
-
return (h("div", { key: '
|
|
176
|
+
return (h("div", { key: '584e0918b070eac25a7c4bfceff59b000b60076c' }, this.total > 0 && this.mode === 'default' && (h("p", { key: 'c688bd8e1f1d15904fc274454093f03213f59e38', class: "f-ui-03 text-lightest mb-28 w-full text-center" }, h("span", { key: 'c2472919bad41f76e26d518da27509e545ed9db6', class: "sr-only" }, "Results:"), this.pageResults())), this.mode === 'navigator' || (this.lastPage && this.lastPage > 1) ? (h("nav", { "aria-label": "Pagination" }, h("ul", { class: "flex items-center justify-center gap-x-8" }, h("li", { class: "mr-auto" }, h("eds-link", { label: this.prevLabel, url: this.mode === 'navigator'
|
|
173
177
|
? this.prevUrl || '#' // Use prevUrl if provided, otherwise disable with '#'
|
|
174
178
|
: this.isFirstPage()
|
|
175
179
|
? '#'
|
|
@@ -7,10 +7,8 @@ export class EdsRating {
|
|
|
7
7
|
this.selectedRating = 0;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Parses the `
|
|
11
|
-
* Returns an empty array if parsing fails
|
|
12
|
-
*
|
|
13
|
-
* @returns {any[]} Array of parsed link objects
|
|
10
|
+
* Parses the `textMapping` prop into an array of strings.
|
|
11
|
+
* Returns an empty array if parsing fails.
|
|
14
12
|
*/
|
|
15
13
|
get parsedMappings() {
|
|
16
14
|
if (typeof this.textMapping === 'object') {
|
|
@@ -22,7 +20,7 @@ export class EdsRating {
|
|
|
22
20
|
}
|
|
23
21
|
catch (e) {
|
|
24
22
|
// eslint-disable-next-line
|
|
25
|
-
console.error('Error parsing
|
|
23
|
+
console.error('Error parsing textMapping prop:', e);
|
|
26
24
|
return [];
|
|
27
25
|
}
|
|
28
26
|
}
|
|
@@ -37,10 +35,10 @@ export class EdsRating {
|
|
|
37
35
|
this.ratingChange.emit(rating);
|
|
38
36
|
}
|
|
39
37
|
render() {
|
|
40
|
-
return (h("div", { key: '
|
|
38
|
+
return (h("div", { key: 'c9147c2635f091d93f329d2b56a5fee8dce9126c', class: "relative w-full flex flex-col" }, h("span", { key: '39a84bc3d9bcd4b729a35737c883eca7144d13ac', class: "f-body-01" }, this.label), h("div", { key: '3cb84acf399cac0b23393c71df2f2b36aab4f43e', class: "stars" }, Array.from({ length: this.stars }, (_, index) => (h("span", { class: {
|
|
41
39
|
star: true,
|
|
42
40
|
filled: index < this.selectedRating
|
|
43
|
-
}, onClick: () => this.handleClick(index + 1) }, "\u2605")))), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && (h("span", { key: '
|
|
41
|
+
}, onClick: () => this.handleClick(index + 1) }, "\u2605")))), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && (h("span", { key: '60605ec21b542825da0dad629fc1618d9cf63b25', class: "f-ui-04 text-lighter" }, this.parsedMappings[this.selectedRating - 1]))));
|
|
44
42
|
}
|
|
45
43
|
static get is() { return "eds-rating"; }
|
|
46
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -93,11 +91,11 @@ export class EdsRating {
|
|
|
93
91
|
"defaultValue": "'Rate your experience'"
|
|
94
92
|
},
|
|
95
93
|
"textMapping": {
|
|
96
|
-
"type": "
|
|
94
|
+
"type": "string",
|
|
97
95
|
"mutable": false,
|
|
98
96
|
"complexType": {
|
|
99
|
-
"original": "string |
|
|
100
|
-
"resolved": "
|
|
97
|
+
"original": "string | string[]",
|
|
98
|
+
"resolved": "string | string[]",
|
|
101
99
|
"references": {}
|
|
102
100
|
},
|
|
103
101
|
"required": false,
|