@ebrains/components 3.1.0 → 3.2.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-primary-palette_6.cjs.entry.js +14 -14
- package/dist/cjs/components-section.cjs.entry.js +1 -1
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/docs-palettes.cjs.entry.js +1 -1
- package/dist/cjs/docs-tokens.cjs.entry.js +1 -1
- package/dist/cjs/eds-accordion_53.cjs.entry.js +367 -248
- package/dist/cjs/eds-app-root.cjs.entry.js +1 -1
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +1 -1
- package/dist/cjs/eds-frame.cjs.entry.js +1 -1
- package/dist/cjs/eds-gitlab-contributors.cjs.entry.js +26 -30
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-eu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-input-search.cjs.entry.js +1 -1
- package/dist/cjs/eds-modal.cjs.entry.js +18 -9
- package/dist/cjs/eds-pie.cjs.entry.js +2 -2
- package/dist/cjs/eds-section-core_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-timeline.cjs.entry.js +1 -1
- package/dist/cjs/eds-toast-manager.cjs.entry.js +1 -1
- package/dist/cjs/eds-trl-badge.cjs.entry.js +14 -11
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-space.cjs.entry.js +58 -1
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +2 -2
- package/dist/cjs/logo-variations-tabs.cjs.entry.js +1 -1
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +1 -1
- package/dist/cjs/svg-repository.cjs.entry.js +1 -1
- package/dist/cjs/token-list_3.cjs.entry.js +3 -3
- package/dist/cjs/token-ratios.cjs.entry.js +1 -1
- package/dist/cjs/token-spacing.cjs.entry.js +1 -1
- package/dist/cjs/token-typography.cjs.entry.js +8 -2
- package/dist/collection/components/eds-accordion/eds-accordion.js +2 -5
- package/dist/collection/components/eds-alert/eds-alert.css +14 -0
- package/dist/collection/components/eds-alert/eds-alert.js +2 -1
- package/dist/collection/components/eds-button/eds-button.js +6 -10
- package/dist/collection/components/eds-button/eds-button.stories.js +4 -1
- package/dist/collection/components/eds-cards/eds-card-app/eds-card-app.js +2 -5
- 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-cta/eds-card-cta.js +2 -5
- package/dist/collection/components/eds-cards/eds-card-cta/eds-card-cta.stories.js +4 -1
- package/dist/collection/components/eds-cards/eds-card-feature/eds-card-feature.js +2 -5
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +2 -4
- package/dist/collection/components/eds-cards/eds-card-hero/eds-card-hero.js +6 -7
- package/dist/collection/components/eds-cards/eds-card-stat/eds-card-stat.js +6 -7
- package/dist/collection/components/eds-charts/eds-pie/eds-pie.js +2 -2
- package/dist/collection/components/eds-code-block/eds-code-block.css +72 -106
- package/dist/collection/components/eds-code-block/eds-code-block.js +1 -1
- package/dist/collection/components/eds-footer/eds-footer.js +23 -18
- package/dist/collection/components/eds-footer/eds-footer.stories.js +3 -4
- package/dist/collection/components/eds-form/eds-form.css +456 -0
- package/dist/collection/components/eds-form/eds-form.js +218 -14
- package/dist/collection/components/eds-form/eds-form.stories.js +110 -3
- package/dist/collection/components/eds-frame/eds-frame.js +1 -1
- package/dist/collection/components/eds-header/eds-header.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-bluesky/eds-icon-bluesky.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-facebook/eds-icon-facebook.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-linkedin/eds-icon-linkedin.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-mastodon/eds-icon-mastodon.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-twitter/eds-icon-twitter.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-youtube/eds-icon-youtube.js +1 -1
- package/dist/collection/components/eds-img/eds-img.js +2 -2
- package/dist/collection/components/eds-input-dropzone/eds-input-dropzone.js +7 -4
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.css +10 -0
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.css +17 -5
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-range/eds-input-range.js +15 -5
- package/dist/collection/components/eds-input-elements/eds-input-search/eds-input-search.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +6 -2
- package/dist/collection/components/eds-input-field/eds-input-field.css +219 -0
- package/dist/collection/components/eds-input-field/eds-input-field.js +7 -2
- package/dist/collection/components/eds-input-field/eds-input-field.stories.js +35 -7
- package/dist/collection/components/eds-input-file/eds-input-file.js +5 -3
- package/dist/collection/components/eds-link/eds-link.js +4 -8
- package/dist/collection/components/eds-logo/eds-logo.js +13 -66
- package/dist/collection/components/eds-logo/eds-logo.stories.js +36 -17
- package/dist/collection/components/eds-modal/eds-modal.js +18 -9
- package/dist/collection/components/eds-modal/eds-modal.stories.js +3 -1
- package/dist/collection/components/eds-nps/eds-nps.js +2 -2
- package/dist/collection/components/eds-pagination/eds-pagination.js +1 -1
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -8
- package/dist/collection/components/eds-rating/eds-rating.js +1 -1
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +1 -1
- package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +2 -2
- package/dist/collection/components/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/components/eds-spinner/eds-spinner.js +1 -1
- package/dist/collection/components/eds-steps/eds-steps.css +56 -25
- package/dist/collection/components/eds-steps/eds-steps.js +27 -7
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.css +93 -28
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.js +57 -10
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.stories.js +80 -17
- package/dist/collection/components/eds-switch/eds-switch.css +26 -3
- package/dist/collection/components/eds-switch/eds-switch.js +10 -7
- package/dist/collection/components/eds-switch/eds-switch.stories.js +20 -1
- package/dist/collection/components/eds-table/eds-table.js +1 -3
- package/dist/collection/components/eds-table/eds-table.stories.js +2 -6
- package/dist/collection/components/eds-tabs/eds-tabs.js +4 -11
- package/dist/collection/components/eds-tabs/eds-tabs.stories.js +2 -2
- package/dist/collection/components/eds-tag/eds-tag.js +1 -1
- package/dist/collection/components/eds-timeline/eds-timeline.js +1 -1
- package/dist/collection/components/eds-toast/eds-toast.css +146 -0
- package/dist/collection/components/eds-toast/eds-toast.js +106 -4
- package/dist/collection/components/eds-toast/eds-toast.stories.js +102 -5
- package/dist/collection/components/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +1 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.stories.js +7 -1
- package/dist/collection/components/eds-user/eds-user.js +2 -5
- package/dist/collection/components/eds-user/eds-user.stories.js +8 -11
- package/dist/collection/eds-docs-ui/colors/color-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/secondary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/support.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/secondary.js +7 -7
- package/dist/collection/eds-docs-ui/colors/gradient-palette/support.js +3 -3
- package/dist/collection/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/components-section/components-section.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/docs-tokens/docs-tokens.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +8 -2
- 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 +58 -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-gitlab-contributors/eds-gitlab-contributors.js +26 -30
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.js +18 -12
- package/dist/collection/shared-ui/eds-kg-learning-resources/eds-kg-learning-resources.js +15 -19
- package/dist/collection/shared-ui/eds-kg-web-services-select/eds-kg-web-services-select.js +2 -2
- package/dist/collection/shared-ui/eds-kg-web-services-select/eds-kg-web-services-select.stories.js +1 -3
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.stories.js +1 -1
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.css +11 -1
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.js +37 -16
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.stories.js +10 -5
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.js +14 -11
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.stories.js +4 -1
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/collection/utils/eds-form/safeFormat.js +1 -5
- package/dist/components/components-section.js +1 -1
- package/dist/components/components.css +9 -7
- package/dist/components/components.esm.js +1 -1
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/docs-palettes.js +1 -1
- package/dist/components/docs-tokens.js +1 -1
- package/dist/components/eds-accordion2.js +2 -5
- package/dist/components/eds-alert2.js +3 -2
- package/dist/components/eds-app-root.js +1 -1
- package/dist/components/eds-button2.js +5 -9
- package/dist/components/eds-card-app.js +2 -5
- package/dist/components/eds-card-cta.js +2 -5
- package/dist/components/eds-card-feature.js +2 -5
- package/dist/components/eds-card-generic2.js +2 -4
- package/dist/components/eds-card-hero.js +6 -7
- package/dist/components/eds-card-stat.js +6 -7
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-code-block2.js +2 -2
- package/dist/components/eds-cookies-preference.js +1 -1
- package/dist/components/eds-footer2.js +23 -18
- package/dist/components/eds-form.js +101 -38
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-gitlab-contributors.js +26 -30
- package/dist/components/eds-global-search.js +18 -12
- package/dist/components/eds-header.js +1 -1
- package/dist/components/eds-icon-bluesky.js +1 -1
- package/dist/components/eds-icon-eu.js +1 -1
- package/dist/components/eds-icon-facebook.js +1 -1
- package/dist/components/eds-icon-gitlab.js +1 -1
- package/dist/components/eds-icon-linkedin.js +1 -1
- package/dist/components/eds-icon-mastodon.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +2 -2
- package/dist/components/eds-input-dropzone2.js +7 -4
- package/dist/components/eds-input-field2.js +8 -3
- package/dist/components/eds-input-file2.js +5 -3
- package/dist/components/eds-input-footer2.js +3 -7
- package/dist/components/eds-input-label2.js +2 -2
- package/dist/components/eds-input-range2.js +15 -5
- package/dist/components/eds-input-search.js +1 -1
- package/dist/components/eds-input-select2.js +6 -2
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-kg-learning-resources.js +15 -19
- package/dist/components/eds-kg-web-services-select2.js +2 -2
- package/dist/components/eds-link2.js +3 -7
- package/dist/components/eds-logo2.js +4 -22
- package/dist/components/eds-modal.js +18 -9
- package/dist/components/eds-nps2.js +2 -2
- package/dist/components/eds-pagination2.js +1 -1
- package/dist/components/eds-pie.js +2 -2
- package/dist/components/eds-progress-bar.js +1 -8
- package/dist/components/eds-rating2.js +1 -1
- package/dist/components/eds-search-select2.js +38 -17
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/eds-steps-v2.js +41 -11
- package/dist/components/eds-steps2.js +28 -8
- package/dist/components/eds-switch2.js +8 -5
- package/dist/components/eds-table2.js +1 -3
- package/dist/components/eds-tabs.js +4 -11
- package/dist/components/eds-tag2.js +1 -1
- package/dist/components/eds-timeline.js +1 -1
- package/dist/components/eds-toast-manager.js +1 -1
- package/dist/components/eds-toast2.js +39 -3
- package/dist/components/eds-tooltip2.js +1 -1
- package/dist/components/eds-trl-badge.js +14 -11
- package/dist/components/eds-user.js +1 -4
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +58 -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-d59d6fda.entry.js → p-05e96609.entry.js} +1 -1
- package/dist/components/p-0d778d10.entry.js +1 -0
- package/dist/components/{p-62f53e7a.entry.js → p-114f6d54.entry.js} +1 -1
- package/dist/components/p-1534204d.entry.js +1 -0
- package/dist/components/p-337d4ee3.entry.js +9 -0
- package/dist/components/p-340bc935.entry.js +1 -0
- package/dist/components/p-39dbb964.entry.js +1 -0
- package/dist/components/{p-25729ade.entry.js → p-3f66bc26.entry.js} +1 -1
- package/dist/components/p-43f9e64f.entry.js +1 -0
- package/dist/components/p-46cc6c1a.entry.js +1 -0
- package/dist/components/{p-e9e6ec19.entry.js → p-4b8a7979.entry.js} +1 -1
- package/dist/components/{p-bdcb71e1.entry.js → p-6b94b2ec.entry.js} +1 -1
- package/dist/components/p-6d965fef.entry.js +1 -0
- package/dist/components/{p-62580004.entry.js → p-6e370182.entry.js} +1 -1
- package/dist/components/p-6ffe581c.entry.js +1 -0
- package/dist/components/{p-e027bc90.entry.js → p-726637b1.entry.js} +1 -1
- package/dist/components/{p-8a483358.entry.js → p-86ccc09f.entry.js} +1 -1
- package/dist/components/{p-e71a4f29.entry.js → p-8755a21b.entry.js} +1 -1
- package/dist/components/{p-e4df206e.entry.js → p-8ab461e2.entry.js} +1 -1
- package/dist/components/p-8cb162b8.entry.js +1 -0
- package/dist/components/p-8cdbc280.entry.js +1 -0
- package/dist/components/{p-42791331.entry.js → p-8e034c4e.entry.js} +1 -1
- package/dist/components/p-9f649fa3.entry.js +1 -0
- package/dist/components/{p-f9a9fa34.entry.js → p-a26dad9b.entry.js} +1 -1
- package/dist/components/p-a2d6a9ca.entry.js +1 -0
- package/dist/components/p-afabe1be.entry.js +1 -0
- package/dist/components/{p-1fbcc480.entry.js → p-b1519098.entry.js} +1 -1
- package/dist/components/{p-12acc48d.entry.js → p-b4023b45.entry.js} +1 -1
- package/dist/components/p-c53b3563.entry.js +1 -0
- package/dist/components/p-c7d612d1.entry.js +1 -0
- package/dist/components/p-dc9aef22.entry.js +1 -0
- package/dist/components/{p-e339d0b5.entry.js → p-f66a7cf9.entry.js} +1 -1
- package/dist/components/{p-80a32e20.entry.js → p-f97f62f2.entry.js} +1 -1
- package/dist/components/primary.js +1 -1
- package/dist/components/primary2.js +1 -1
- package/dist/components/secondary.js +1 -1
- package/dist/components/secondary2.js +7 -7
- package/dist/components/support.js +1 -1
- package/dist/components/support2.js +3 -3
- package/dist/components/svg-repository.js +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 +8 -2
- package/dist/esm/color-primary-palette_6.entry.js +14 -14
- package/dist/esm/components-section.entry.js +1 -1
- package/dist/esm/components.js +1 -1
- package/dist/esm/correct-use-of-colors.entry.js +1 -1
- package/dist/esm/docs-palettes.entry.js +1 -1
- package/dist/esm/docs-tokens.entry.js +1 -1
- package/dist/esm/eds-accordion_53.entry.js +367 -248
- package/dist/esm/eds-app-root.entry.js +1 -1
- package/dist/esm/eds-cookies-preference.entry.js +1 -1
- package/dist/esm/eds-frame.entry.js +1 -1
- package/dist/esm/eds-gitlab-contributors.entry.js +26 -30
- package/dist/esm/eds-icon-bluesky.entry.js +1 -1
- package/dist/esm/eds-icon-eu.entry.js +1 -1
- package/dist/esm/eds-icon-facebook.entry.js +1 -1
- package/dist/esm/eds-icon-gitlab.entry.js +1 -1
- package/dist/esm/eds-icon-linkedin.entry.js +1 -1
- package/dist/esm/eds-icon-mastodon.entry.js +1 -1
- package/dist/esm/eds-icon-twitter.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/esm/eds-input-search.entry.js +1 -1
- package/dist/esm/eds-modal.entry.js +18 -9
- package/dist/esm/eds-pie.entry.js +2 -2
- package/dist/esm/eds-section-core_2.entry.js +3 -3
- package/dist/esm/eds-timeline.entry.js +1 -1
- package/dist/esm/eds-toast-manager.entry.js +1 -1
- package/dist/esm/eds-trl-badge.entry.js +14 -11
- package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-space.entry.js +58 -1
- package/dist/esm/logo-variations-horizontal_2.entry.js +2 -2
- package/dist/esm/logo-variations-tabs.entry.js +1 -1
- package/dist/esm/logo-wrong-usage.entry.js +1 -1
- package/dist/esm/svg-repository.entry.js +1 -1
- package/dist/esm/token-list_3.entry.js +3 -3
- package/dist/esm/token-ratios.entry.js +1 -1
- package/dist/esm/token-spacing.entry.js +1 -1
- package/dist/esm/token-typography.entry.js +8 -2
- package/dist/hydrate/index.js +572 -368
- package/dist/hydrate/index.mjs +572 -368
- package/dist/types/components/eds-form/eds-form.d.ts +56 -0
- package/dist/types/components/eds-form/eds-form.stories.d.ts +63 -0
- package/dist/types/components/eds-logo/eds-logo.d.ts +11 -28
- package/dist/types/components/eds-logo/eds-logo.stories.d.ts +22 -2
- package/dist/types/components/eds-steps/eds-steps.d.ts +7 -0
- package/dist/types/components/eds-steps-v2/eds-steps-v2.d.ts +14 -1
- package/dist/types/components/eds-steps-v2/eds-steps-v2.stories.d.ts +40 -9
- package/dist/types/components/eds-switch/eds-switch.d.ts +6 -2
- package/dist/types/components/eds-switch/eds-switch.stories.d.ts +8 -0
- package/dist/types/components/eds-toast/eds-toast.d.ts +33 -1
- package/dist/types/components/eds-toast/eds-toast.stories.d.ts +49 -1
- package/dist/types/components/eds-user/eds-user.d.ts +0 -2
- package/dist/types/components/eds-user/eds-user.stories.d.ts +5 -9
- package/dist/types/components.d.ts +210 -60
- package/package.json +1 -1
- package/dist/components/p-00ba405d.entry.js +0 -1
- package/dist/components/p-03342030.entry.js +0 -1
- package/dist/components/p-0e2bac0f.entry.js +0 -1
- package/dist/components/p-18399fe1.entry.js +0 -1
- package/dist/components/p-1e6f0572.entry.js +0 -1
- package/dist/components/p-27e093c3.entry.js +0 -1
- package/dist/components/p-3d1bb2fe.entry.js +0 -1
- package/dist/components/p-5ff4b1d0.entry.js +0 -1
- package/dist/components/p-6be1730a.entry.js +0 -1
- package/dist/components/p-786ff09b.entry.js +0 -1
- package/dist/components/p-85476a6f.entry.js +0 -9
- package/dist/components/p-c2127276.entry.js +0 -1
- package/dist/components/p-c3ee9163.entry.js +0 -1
- package/dist/components/p-c4cfbf98.entry.js +0 -1
- package/dist/components/p-c65082fe.entry.js +0 -1
- package/dist/components/p-cc096938.entry.js +0 -1
- package/dist/components/p-f4d2f882.entry.js +0 -1
|
@@ -9,8 +9,9 @@ export class EdsInputDropzone {
|
|
|
9
9
|
};
|
|
10
10
|
this.handleFileSelect = (event) => {
|
|
11
11
|
const input = event.target;
|
|
12
|
-
if (!input.files)
|
|
12
|
+
if (!input.files) {
|
|
13
13
|
return;
|
|
14
|
+
}
|
|
14
15
|
this.addFiles(Array.from(input.files));
|
|
15
16
|
};
|
|
16
17
|
this.handleDragOver = (event) => {
|
|
@@ -30,8 +31,9 @@ export class EdsInputDropzone {
|
|
|
30
31
|
event.preventDefault();
|
|
31
32
|
event.stopPropagation();
|
|
32
33
|
this.isDragging = false;
|
|
33
|
-
if (this.disabled)
|
|
34
|
+
if (this.disabled) {
|
|
34
35
|
return;
|
|
36
|
+
}
|
|
35
37
|
const files = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files;
|
|
36
38
|
if (files && files.length > 0) {
|
|
37
39
|
this.addFiles(Array.from(files));
|
|
@@ -71,8 +73,9 @@ export class EdsInputDropzone {
|
|
|
71
73
|
this.edsfile.emit({ files });
|
|
72
74
|
}
|
|
73
75
|
formatFileSize(bytes) {
|
|
74
|
-
if (bytes === 0)
|
|
76
|
+
if (bytes === 0) {
|
|
75
77
|
return '0 B';
|
|
78
|
+
}
|
|
76
79
|
const k = 1024;
|
|
77
80
|
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
78
81
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
@@ -91,7 +94,7 @@ export class EdsInputDropzone {
|
|
|
91
94
|
}
|
|
92
95
|
render() {
|
|
93
96
|
const dropzoneClass = `eds-input-dropzone ${this.isDragging ? 'dragging' : ''} ${this.disabled ? 'disabled' : ''}`;
|
|
94
|
-
return (h("div", { key: '
|
|
97
|
+
return (h("div", { key: '3a6f1876c879e361934a9e8730afe9d14a50d8e2', class: "eds-input-dropzone-container" }, h("input", { key: '293c9d66be6da5cf34b470f00468b3ede6abfb35', ref: (el) => (this.fileInputRef = el), type: "file", id: this.inputId || this.name, name: this.name, class: "eds-input-dropzone-hidden", disabled: this.disabled, required: this.required, multiple: this.multiple, accept: this.accept, onChange: this.handleFileSelect }), h("div", { key: '56457ccacc1e643258447ee929bdeb6b0e6e4fe7', class: dropzoneClass, onClick: this.handleDropzoneClick, onDragOver: this.handleDragOver, onDragLeave: this.handleDragLeave, onDrop: this.handleDrop }, h("svg", { key: '017fa615ec5b04dd3edd65d2e064ea58039d422b', class: "dropzone-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: '796dee372172d244dae644cab2136fce784e0865', d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { key: 'cdd841be70c9a89c6040909797da1277b1ce244b', points: "17 8 12 3 7 8" }), h("line", { key: 'b4a8af3db664bdebd0c9651e4c806811ea21d905', x1: "12", y1: "3", x2: "12", y2: "15" })), h("div", { key: '5c799c8a751b06c743f4fc7c1810a91f35307d46', class: "dropzone-text" }, h("p", { key: '0d3971953c6f472bbde247378fccb4171606872d', class: "dropzone-primary" }, this.primaryText), h("p", { key: 'c64910c2d7ba60e6d315fa2831aca54faba84a79', class: "dropzone-secondary" }, this.secondaryText))), this.selectedFiles.length > 0 && (h("div", { key: 'b6f19ccc0304ba8a4369c95e86a61ad084dd9256', class: "eds-input-dropzone-chips" }, this.selectedFiles.map((item) => (h("div", { key: item.id, class: "eds-input-dropzone-chip" }, this.getFileIcon(item.file.name), h("span", { class: "eds-input-dropzone-chip-name" }, item.file.name), h("span", { class: "eds-input-dropzone-chip-size" }, this.formatFileSize(item.file.size)), h("button", { type: "button", class: "eds-input-dropzone-chip-remove", onClick: () => this.handleRemoveFile(item.id), disabled: this.disabled, "aria-label": `Remove ${item.file.name}` }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))))));
|
|
95
98
|
}
|
|
96
99
|
static get is() { return "eds-input-dropzone"; }
|
|
97
100
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,7 +51,7 @@ export class EdsInput {
|
|
|
51
51
|
render() {
|
|
52
52
|
const withIcon = !!this.icon;
|
|
53
53
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : '';
|
|
54
|
-
return (h("div", { key: '
|
|
54
|
+
return (h("div", { key: '6456b8536db4d219eb307603c986e0aca4867a66', class: "relative flex items-center" }, this.type === 'textarea' ? (h("textarea", { id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.innerVal.toString(), required: this.required, disabled: this.disabled, class: `min-h-80 input input-textarea ${withIcon ? 'input-with-icon' : ''} ${this.error ? 'input-error' : ''} ${this.extraClass}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput })) : this.type === 'select' ? (h("select", { id: this.inputId || this.name, name: this.name, required: this.required, disabled: this.disabled, class: `input input-select ${this.error ? 'input-error' : ''} ${this.extraClass}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, onInput: this.handleInput, onChange: this.handleInput }, this.options.map((option) => (h("option", { value: option.value, selected: option.value === this.innerVal, key: option.value }, option.label))))) : (h("input", Object.assign({ id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.innerVal.toString(), required: this.required, disabled: this.disabled, type: this.type, tabindex: this.inputTabIndex, checked: ['radio', 'checkbox'].includes(this.type) ? this.checked : undefined }, (this.type === 'number'
|
|
55
55
|
? {
|
|
56
56
|
min: this.min,
|
|
57
57
|
max: this.max,
|
|
@@ -62,7 +62,7 @@ export class EdsInput {
|
|
|
62
62
|
input ${this.type === 'radio' ? 'input-radio' : this.type === 'checkbox' ? 'input-checkbox' : ''}
|
|
63
63
|
${withIcon && this.type !== 'radio' && this.type !== 'checkbox' ? 'input-icon pl-36' : ''}
|
|
64
64
|
${this.error ? 'input-error' : ''}
|
|
65
|
-
`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput }))), this.maxLength && this.type === 'textarea' && (h("span", { key: '
|
|
65
|
+
`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput }))), this.maxLength && this.type === 'textarea' && (h("span", { key: '216f52d80eefa2f89e388e020e597493015ae8d6', class: `input-counter f-ui-05 absolute bottom-8 right-8 ${this.maxLengthReached ? 'input-counter-error' : ''}` }, this.maxLength)), this.icon && (h("eds-icon-wrapper", { key: 'd3771580564237c9a8ded4e07f4293517bc885fd', class: `absolute top-1/2 left-[12px] -translate-y-1/2 ${this.disabled ? 'text-lightest' : 'text-lightest'}`, name: this.icon }))));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "eds-input"; }
|
|
68
68
|
static get properties() {
|
|
@@ -2,6 +2,16 @@ p {
|
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
/* Helper / hint text below the input — matches the brand mockup (.help):
|
|
6
|
+
mono, 10.5px, quiet grey. */
|
|
7
|
+
.eds-help {
|
|
8
|
+
font-family: 'IBM Plex Mono', ui-monospace, monospace;
|
|
9
|
+
font-size: 10.5px;
|
|
10
|
+
line-height: 1.45;
|
|
11
|
+
letter-spacing: 0.01em;
|
|
12
|
+
color: #8a8c8a;
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
/* Inline links inside a field message (from safeInlineFormat) — match eds-link's
|
|
6
16
|
"underline" intent. */
|
|
7
17
|
.eds-desc-link {
|
|
@@ -9,7 +9,7 @@ export class EdsInputFooter {
|
|
|
9
9
|
this.link = undefined;
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h("div", { key: '
|
|
12
|
+
return (h("div", { key: 'e3cf47ad941e608ec8f5daefd89d72e6d0af0f28' }, this.error && this.errorMessage && (h("div", { key: '0771ab5b0ba362a01df27c4b6ce0949ec51ec857', id: `error_${this.name}`, class: "text-error flex items-center" }, h("eds-icon-wrapper", { key: '43f86aa8632ea24b311e00a336b7d4b00b47ac80', name: "warning", size: 20 }), h("p", { key: '734a138c54dc0120fc6fdd320122c737b33b9d3b', class: "f-ui-04 ml-4 mb-4 pt-4", innerHTML: this.errorMessage }))), this.message && (h("p", { key: 'f8c6d5c1f48e10f9c556fc8d44189836b3b46dbf', id: `desc_${this.name}`, class: "eds-help text-lighter", innerHTML: safeInlineFormat(this.message) })), this.link && (h("eds-link", { key: 'fe7a52e14c6cf0791d36b781a92d7bbeca487ccc', label: this.link.label, url: this.link.url, intent: "underline", size: "small", external: true }))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "eds-input-footer"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
/* Field question label — a compact, medium-bold label matching the brand
|
|
2
|
+
mockup (14.5px). Set explicitly rather than via utility classes so the weight
|
|
3
|
+
doesn't depend on class ordering. We load IBM Plex Sans 400/600 only, so 600
|
|
4
|
+
is our "medium" (the mockup's 500 isn't bundled and would fall back to 400). */
|
|
1
5
|
.input-label {
|
|
2
|
-
font-family: var(--
|
|
3
|
-
font-
|
|
4
|
-
font-
|
|
5
|
-
line-height:
|
|
6
|
-
letter-spacing:
|
|
6
|
+
font-family: var(--plex-sans, 'IBM Plex Sans', system-ui, sans-serif);
|
|
7
|
+
font-size: 14.5px;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
line-height: 1.3;
|
|
10
|
+
letter-spacing: 0;
|
|
11
|
+
color: var(--brand-black, #07140d);
|
|
7
12
|
}
|
|
8
13
|
.input-label b,.input-label strong {
|
|
9
14
|
font-weight: var(--f-ui-02---bold-weight, bold);
|
|
@@ -11,6 +16,13 @@
|
|
|
11
16
|
.text-lighter {
|
|
12
17
|
color: var(--grey-600);
|
|
13
18
|
}
|
|
19
|
+
/* Required asterisk. Inherits the label colour by default; brand forms set
|
|
20
|
+
--eds-field-accent (via eds-form's brand body) to turn it green. */
|
|
21
|
+
.req-mark {
|
|
22
|
+
color: var(--eds-field-accent, currentColor);
|
|
23
|
+
margin-left: 1px;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
}
|
|
14
26
|
.sr-only {
|
|
15
27
|
position: absolute;
|
|
16
28
|
width: 1px;
|
|
@@ -7,7 +7,7 @@ export class EdsInputLabel {
|
|
|
7
7
|
this.disabled = false;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h("label", { key: '
|
|
10
|
+
return (h("label", { key: '46f04462b12694d932be79bb1d252cd001d29e58', htmlFor: this.name, class: `input-label ${this.disabled ? 'text-lighter' : ''}` }, this.label, this.required && (h("span", { key: 'c747f5a7896b395f5c1b54725a966d54c7e5dfcd' }, h("span", { key: '2a27cfce971df8eab6186028f6c8319f19504317', "aria-hidden": "true", class: "req-mark" }, "*"), h("span", { key: '5876e15a66aa95a62b934edec0d64f01f713d1a8', class: "sr-only" }, "required")))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "eds-input-label"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -30,11 +30,13 @@ export class EdsInputRange {
|
|
|
30
30
|
var _a;
|
|
31
31
|
this.sliderVal = (_a = this.value) !== null && _a !== void 0 ? _a : Math.round(this.min + (this.max - this.min) / 2);
|
|
32
32
|
}
|
|
33
|
-
// Keep the internal state in sync when the passed value changes.
|
|
33
|
+
// Keep the internal state in sync when the passed value changes. When the
|
|
34
|
+
// value is cleared (undefined/null — e.g. "Clear form"), fall back to the
|
|
35
|
+
// default midpoint so BOTH the thumb and the filled track reset together
|
|
36
|
+
// (the fill is derived from sliderVal, so it must be updated too).
|
|
34
37
|
onValueChange(newVal) {
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
}
|
|
38
|
+
this.sliderVal =
|
|
39
|
+
newVal !== undefined && newVal !== null ? newVal : Math.round(this.min + (this.max - this.min) / 2);
|
|
38
40
|
}
|
|
39
41
|
componentDidLoad() {
|
|
40
42
|
// Assign the native input element after the component loads
|
|
@@ -47,7 +49,15 @@ export class EdsInputRange {
|
|
|
47
49
|
render() {
|
|
48
50
|
var _a;
|
|
49
51
|
const currentValue = (_a = this.sliderVal) !== null && _a !== void 0 ? _a : Math.round(this.min + (this.max - this.min) / 2);
|
|
50
|
-
|
|
52
|
+
// Paint the "filled" portion of the track up to the current value. Uses the
|
|
53
|
+
// brand accent when present (the var inherits from eds-form's brand body),
|
|
54
|
+
// else the default green — so non-brand forms look exactly as before.
|
|
55
|
+
const pct = this.max > this.min ? ((currentValue - this.min) / (this.max - this.min)) * 100 : 0;
|
|
56
|
+
const trackStyle = {
|
|
57
|
+
background: `linear-gradient(90deg, var(--eds-field-accent, var(--green-500)) ${pct}%, var(--grey-light, #ececec) ${pct}%)`
|
|
58
|
+
};
|
|
59
|
+
const mid = Math.round(this.min + (this.max - this.min) / 2);
|
|
60
|
+
return (h("div", { key: '742f329624bc2a8632640b6a93b6258d915f6deb', class: "eds-range" }, h("div", { key: '112ef4ef42761c85350f9624c10436fbd2600fce', class: "eds-range-top" }, h("span", { key: '2b2dbde929434f68c85a36380cbed1780707dfd8', id: `desc_${this.name}`, class: "eds-range-val" }, currentValue)), h("input", { key: 'd5bcbf157647324a1ddafab2001518707ae0de9b', id: this.inputId || this.name, name: this.name, style: trackStyle, min: this.min, max: this.max, step: this.step, value: currentValue, required: this.required, disabled: this.disabled, type: "range", class: "w-full input eds-range-input", tabindex: "0", role: "slider", "aria-describedby": `desc_${this.name}`, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": currentValue, onInput: this.onInput, onChange: this.onChange }), h("div", { key: 'e72eed37dc3dc0bd596f9198f4d3f59ac11e1c40', class: "eds-range-scale", "aria-hidden": "true" }, h("span", { key: 'ba65117d4dc0c498878760ddf124d614c19af7b9' }, this.min), h("span", { key: '82e42ecec8f53634c005acc151f12a3c6f390ab3' }, mid), h("span", { key: 'b2272241e488952785c92b4a495b1ba744e13d19' }, this.max))));
|
|
51
61
|
}
|
|
52
62
|
static get is() { return "eds-input-range"; }
|
|
53
63
|
static get properties() {
|
|
@@ -66,7 +66,7 @@ export class EdsInputSearch {
|
|
|
66
66
|
return this.inputElement;
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
|
-
return (h("div", { key: '
|
|
69
|
+
return (h("div", { key: '900ca7578601ff528b717e5bc3e1fe6b43562fb6', class: "relative flex items-center" }, h("eds-icon-wrapper", { key: '722eecc1031f51f83100f9d35719a7ea837f680d', name: "search", class: "absolute top-1/2 left-[14px] -translate-y-1/2 text-lightest", "aria-hidden": "true" }), h("input", { key: '0445caabbf5e3077b708a2b8bdbe0fcee3133398', id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.value || '', required: this.required, disabled: this.disabled, type: "search", "aria-label": this.placeholder, class: `input pl-36 ${this.decorate}`,
|
|
70
70
|
//onInput={this.onInput}
|
|
71
71
|
onChange: this.onChange })));
|
|
72
72
|
}
|
|
@@ -26,12 +26,16 @@ export class EdsInputSelect {
|
|
|
26
26
|
const selectId = this.inputId || this.name;
|
|
27
27
|
const placeholderText = this.placeholder || `Pick from the list`;
|
|
28
28
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : undefined;
|
|
29
|
-
return (h("div", { key: '
|
|
29
|
+
return (h("div", { key: '303df3cd45f076ae5b29f301c9dc742e1664887a', class: "relative" }, h("select", { key: '7635ec7c53e7f07c7c71ab25e8475ed53a8d013e', id: selectId, name: this.name, class: {
|
|
30
30
|
input: true,
|
|
31
31
|
'input-error': this.error,
|
|
32
|
+
// No real value yet → the placeholder option is showing. Lets CSS
|
|
33
|
+
// render the select text in the light placeholder colour (grey-500),
|
|
34
|
+
// matching text inputs, instead of the dark default text colour.
|
|
35
|
+
'is-placeholder': !this.value && this.value !== 0,
|
|
32
36
|
'px-4': true,
|
|
33
37
|
'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: '
|
|
38
|
+
}, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, disabled: this.disabled, required: this.required, onChange: this.handleChange }, h("option", { key: '793cd7db90936a9746810075246b5408710ce7ac', value: "", disabled: true, selected: !this.value || this.value === '' }, placeholderText), this.options.map((opt, index) => (h("option", { key: index, value: opt.value, selected: opt.value === this.value }, opt.label)))), h("span", { key: '41a1eb4a753c304148ee6cdc71049fa15cbd61f6', 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: '4ee4022f9d47fc26b27006f144fc598367f50169', class: "w-20 h-20", name: "chevron-right" }))));
|
|
35
39
|
}
|
|
36
40
|
static get is() { return "eds-input-select"; }
|
|
37
41
|
static get properties() {
|
|
@@ -5881,6 +5881,17 @@ video {
|
|
|
5881
5881
|
.input::placeholder {
|
|
5882
5882
|
color: var(--grey-500);
|
|
5883
5883
|
}
|
|
5884
|
+
/* A <select> has no ::placeholder — when no option is chosen yet it shows the
|
|
5885
|
+
placeholder <option> in the normal dark text colour, which looks heavier than
|
|
5886
|
+
text-input placeholders. is-placeholder (set by eds-input-select while empty)
|
|
5887
|
+
matches them by rendering the closed select in grey-500; real options in the
|
|
5888
|
+
open dropdown stay dark for readability. */
|
|
5889
|
+
.input.is-placeholder {
|
|
5890
|
+
color: var(--grey-500);
|
|
5891
|
+
}
|
|
5892
|
+
.input.is-placeholder option {
|
|
5893
|
+
color: var(--brand-black);
|
|
5894
|
+
}
|
|
5884
5895
|
.input {
|
|
5885
5896
|
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
5886
5897
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -6372,6 +6383,9 @@ input[type="range"]::-webkit-slider-thumb {
|
|
|
6372
6383
|
.mt-8 {
|
|
6373
6384
|
margin-top: 0.5rem;
|
|
6374
6385
|
}
|
|
6386
|
+
.mb-8 {
|
|
6387
|
+
margin-bottom: 0.5rem;
|
|
6388
|
+
}
|
|
6375
6389
|
.mt-auto {
|
|
6376
6390
|
margin-top: auto;
|
|
6377
6391
|
}
|
|
@@ -7768,3 +7782,208 @@ input[type="range"]::-webkit-slider-thumb {
|
|
|
7768
7782
|
}
|
|
7769
7783
|
}
|
|
7770
7784
|
|
|
7785
|
+
/* ============================================================
|
|
7786
|
+
Field input styling — the new "brand form" look, applied to
|
|
7787
|
+
every field type rendered through eds-input-field (the wrapper).
|
|
7788
|
+
Element+class selectors (input.input / textarea.input / select.input)
|
|
7789
|
+
beat the global utility-based `.input` reliably. Focus colour reads
|
|
7790
|
+
--eds-field-accent (set by eds-form's brand body) and falls back to
|
|
7791
|
+
the brand-green-dark default, so this looks consistent everywhere.
|
|
7792
|
+
============================================================ */
|
|
7793
|
+
|
|
7794
|
+
/* Text-like inputs + select box.
|
|
7795
|
+
NB: radio/checkbox/range also carry the `.input` class, so they're excluded
|
|
7796
|
+
here (otherwise the box sizing would balloon them) — they're styled below. */
|
|
7797
|
+
input.input:not([type='radio']):not([type='checkbox']):not([type='range']),
|
|
7798
|
+
textarea.input,
|
|
7799
|
+
select.input {
|
|
7800
|
+
min-height: 50px;
|
|
7801
|
+
padding: 0 16px;
|
|
7802
|
+
border: 1px solid var(--line-color, #e2e2e2);
|
|
7803
|
+
border-radius: 10px;
|
|
7804
|
+
background: var(--white, #ffffff);
|
|
7805
|
+
color: var(--brand-black, #07140d);
|
|
7806
|
+
box-shadow: none;
|
|
7807
|
+
transition: border-color 0.14s ease, box-shadow 0.14s ease;
|
|
7808
|
+
}
|
|
7809
|
+
|
|
7810
|
+
/* Leading-icon inputs: restore the left padding that clears the icon (the icon
|
|
7811
|
+
sits absolutely at left:12px). The `.input-icon` + full :not() chain out-
|
|
7812
|
+
specifies the `padding: 0 16px` rule above, which would otherwise let the
|
|
7813
|
+
placeholder / text sit under the icon. */
|
|
7814
|
+
input.input.input-icon:not([type='radio']):not([type='checkbox']):not([type='range']) {
|
|
7815
|
+
padding-left: 42px;
|
|
7816
|
+
}
|
|
7817
|
+
|
|
7818
|
+
input.input:not([type='radio']):not([type='checkbox']):not([type='range'])::placeholder,
|
|
7819
|
+
textarea.input::placeholder {
|
|
7820
|
+
color: #a9aba9;
|
|
7821
|
+
}
|
|
7822
|
+
|
|
7823
|
+
input.input:not([type='radio']):not([type='checkbox']):not([type='range']):hover,
|
|
7824
|
+
textarea.input:hover,
|
|
7825
|
+
select.input:hover {
|
|
7826
|
+
border-color: #c9ccca;
|
|
7827
|
+
}
|
|
7828
|
+
|
|
7829
|
+
input.input:not([type='radio']):not([type='checkbox']):not([type='range']):focus,
|
|
7830
|
+
input.input:not([type='radio']):not([type='checkbox']):not([type='range']):focus-visible,
|
|
7831
|
+
textarea.input:focus,
|
|
7832
|
+
textarea.input:focus-visible,
|
|
7833
|
+
select.input:focus,
|
|
7834
|
+
select.input:focus-visible {
|
|
7835
|
+
outline: none;
|
|
7836
|
+
border-color: var(--eds-field-accent, #00c87b);
|
|
7837
|
+
box-shadow: 0 0 0 3px var(--eds-field-focus-ring, rgba(0, 200, 123, 0.16));
|
|
7838
|
+
}
|
|
7839
|
+
|
|
7840
|
+
input.input:not([type='radio']):not([type='checkbox']):not([type='range']):disabled,
|
|
7841
|
+
textarea.input:disabled,
|
|
7842
|
+
select.input:disabled {
|
|
7843
|
+
background: #f7f7f7;
|
|
7844
|
+
color: #a9aba9;
|
|
7845
|
+
cursor: not-allowed;
|
|
7846
|
+
}
|
|
7847
|
+
|
|
7848
|
+
/* Textarea — taller, top-aligned, resizable */
|
|
7849
|
+
textarea.input,
|
|
7850
|
+
textarea.input-textarea {
|
|
7851
|
+
min-height: 108px;
|
|
7852
|
+
padding: 14px 16px;
|
|
7853
|
+
line-height: 1.55;
|
|
7854
|
+
resize: vertical;
|
|
7855
|
+
align-items: flex-start;
|
|
7856
|
+
}
|
|
7857
|
+
|
|
7858
|
+
/* Select — keep room for the chevron the select renders on the right */
|
|
7859
|
+
select.input,
|
|
7860
|
+
select.input-select {
|
|
7861
|
+
padding-right: 44px;
|
|
7862
|
+
cursor: pointer;
|
|
7863
|
+
}
|
|
7864
|
+
|
|
7865
|
+
/* Range — not a boxed input; a clean track (green fill is painted inline
|
|
7866
|
+
by eds-input-range up to the current value) */
|
|
7867
|
+
input[type='range'].input {
|
|
7868
|
+
min-height: 0;
|
|
7869
|
+
height: 6px;
|
|
7870
|
+
padding: 0;
|
|
7871
|
+
border: none;
|
|
7872
|
+
border-radius: 3px;
|
|
7873
|
+
box-shadow: none;
|
|
7874
|
+
}
|
|
7875
|
+
input[type='range'].input:focus,
|
|
7876
|
+
input[type='range'].input:focus-visible {
|
|
7877
|
+
outline: none;
|
|
7878
|
+
border: none;
|
|
7879
|
+
box-shadow: none;
|
|
7880
|
+
}
|
|
7881
|
+
|
|
7882
|
+
/* Range thumb — brand-black knob with a green ring (matches the mockup). */
|
|
7883
|
+
input[type='range'].input::-webkit-slider-thumb {
|
|
7884
|
+
-webkit-appearance: none;
|
|
7885
|
+
appearance: none;
|
|
7886
|
+
width: 20px;
|
|
7887
|
+
height: 20px;
|
|
7888
|
+
border-radius: 50%;
|
|
7889
|
+
background: var(--brand-black, #07140d);
|
|
7890
|
+
border: 3px solid var(--eds-field-accent, #00c87b);
|
|
7891
|
+
cursor: pointer;
|
|
7892
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
7893
|
+
}
|
|
7894
|
+
input[type='range'].input::-moz-range-thumb {
|
|
7895
|
+
width: 18px;
|
|
7896
|
+
height: 18px;
|
|
7897
|
+
border-radius: 50%;
|
|
7898
|
+
background: var(--brand-black, #07140d);
|
|
7899
|
+
border: 3px solid var(--eds-field-accent, #00c87b);
|
|
7900
|
+
cursor: pointer;
|
|
7901
|
+
}
|
|
7902
|
+
|
|
7903
|
+
/* Range layout: value readout (top-right) + min/mid/max scale (below). */
|
|
7904
|
+
.eds-range {
|
|
7905
|
+
display: flex;
|
|
7906
|
+
flex-direction: column;
|
|
7907
|
+
padding-top: 6px;
|
|
7908
|
+
}
|
|
7909
|
+
.eds-range-top {
|
|
7910
|
+
display: flex;
|
|
7911
|
+
justify-content: flex-end;
|
|
7912
|
+
margin-bottom: 12px;
|
|
7913
|
+
}
|
|
7914
|
+
.eds-range-val {
|
|
7915
|
+
font-family: 'IBM Plex Mono', ui-monospace, monospace;
|
|
7916
|
+
font-size: 15px;
|
|
7917
|
+
font-weight: 500;
|
|
7918
|
+
color: var(--eds-field-accent, #00c87b);
|
|
7919
|
+
font-variant-numeric: tabular-nums;
|
|
7920
|
+
}
|
|
7921
|
+
.eds-range-scale {
|
|
7922
|
+
display: flex;
|
|
7923
|
+
justify-content: space-between;
|
|
7924
|
+
font-family: 'IBM Plex Mono', ui-monospace, monospace;
|
|
7925
|
+
font-size: 10px;
|
|
7926
|
+
color: #7a7b7a;
|
|
7927
|
+
margin-top: 10px;
|
|
7928
|
+
}
|
|
7929
|
+
|
|
7930
|
+
/* Radio & checkbox — brand-green when selected (white mark stays) */
|
|
7931
|
+
input.input-radio:checked,
|
|
7932
|
+
input.input-checkbox:checked {
|
|
7933
|
+
background-color: var(--eds-field-accent, #00c87b);
|
|
7934
|
+
border-color: var(--eds-field-accent, #00c87b);
|
|
7935
|
+
}
|
|
7936
|
+
|
|
7937
|
+
/* Radio / checkbox options as selectable cards (matches the brand mockup).
|
|
7938
|
+
:has(input:checked) works because eds-input is light-DOM, so there's no
|
|
7939
|
+
shadow boundary between the card and the control. */
|
|
7940
|
+
.eds-option-list {
|
|
7941
|
+
display: flex;
|
|
7942
|
+
flex-direction: column;
|
|
7943
|
+
gap: 11px;
|
|
7944
|
+
border: 0;
|
|
7945
|
+
padding: 0;
|
|
7946
|
+
margin: 0;
|
|
7947
|
+
}
|
|
7948
|
+
|
|
7949
|
+
.eds-option-card {
|
|
7950
|
+
display: flex;
|
|
7951
|
+
align-items: center;
|
|
7952
|
+
gap: 11px;
|
|
7953
|
+
padding: 13px 15px;
|
|
7954
|
+
border: 1px solid var(--line-color, #e2e2e2);
|
|
7955
|
+
border-radius: 10px;
|
|
7956
|
+
cursor: pointer;
|
|
7957
|
+
font-size: 14.5px;
|
|
7958
|
+
transition: border-color 0.14s ease, background-color 0.14s ease,
|
|
7959
|
+
box-shadow 0.14s ease;
|
|
7960
|
+
}
|
|
7961
|
+
|
|
7962
|
+
.eds-option-card:hover {
|
|
7963
|
+
border-color: #c9ccca;
|
|
7964
|
+
background: #fcfefd;
|
|
7965
|
+
}
|
|
7966
|
+
|
|
7967
|
+
.eds-option-card:has(input:checked) {
|
|
7968
|
+
border-color: var(--eds-field-accent, #00c87b);
|
|
7969
|
+
background: rgba(0, 255, 157, 0.05);
|
|
7970
|
+
box-shadow: 0 0 0 2px var(--eds-field-card-ring, rgba(0, 255, 157, 0.12));
|
|
7971
|
+
}
|
|
7972
|
+
|
|
7973
|
+
.eds-option-card.is-disabled {
|
|
7974
|
+
cursor: not-allowed;
|
|
7975
|
+
opacity: 0.6;
|
|
7976
|
+
}
|
|
7977
|
+
|
|
7978
|
+
.eds-option-text {
|
|
7979
|
+
flex: 0 1 auto;
|
|
7980
|
+
}
|
|
7981
|
+
|
|
7982
|
+
.eds-option-help {
|
|
7983
|
+
margin-left: auto;
|
|
7984
|
+
font-family: 'IBM Plex Mono', monospace;
|
|
7985
|
+
font-size: 10px;
|
|
7986
|
+
letter-spacing: 0.04em;
|
|
7987
|
+
color: #8a8c8a;
|
|
7988
|
+
}
|
|
7989
|
+
|
|
@@ -118,7 +118,12 @@ export class EdsInputField {
|
|
|
118
118
|
// Icons are only supported on text inputs for now — ignore the prop for
|
|
119
119
|
// every other type so e.g. number/select/checkbox never render one.
|
|
120
120
|
icon: this.type === 'text' ? this.icon : undefined, checked: this.checked }, (this.type === 'number' ? { min: this.min, max: this.max, step: this.step } : {}));
|
|
121
|
-
return (h("div", { key: '
|
|
121
|
+
return (h("div", { key: '2f4fc787a53ec8b3afcd8a6c372075e9c077e220' }, this.type === 'checkbox' || this.type === 'radio' ? (this.parsedOptions.length > 0 ? (h("fieldset", { class: "eds-option-list" }, (this.label || this.hint) && (h("div", { class: "flex justify-between mb-12" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, required: this.required })), this.hint && (h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint)))), this.parsedOptions.map((option) => (
|
|
122
|
+
// Each option is a selectable card. The native control lives in
|
|
123
|
+
// eds-input (light DOM), so the card highlights via :has(input:checked)
|
|
124
|
+
// — no JS state needed. The label wraps the control, so clicking
|
|
125
|
+
// anywhere on the card toggles it.
|
|
126
|
+
h("label", { class: `eds-option-card ${this.disabled ? 'is-disabled' : ''}`, key: option.value }, h("eds-input", Object.assign({}, inputOpts, { inputId: `${this.inputId || this.name}-${option.value}`, inputTabIndex: 0, value: option.value, checked: typeof this.value === 'string' && this.value.split(',').includes(String(option.value)) })), h("span", { class: "eds-option-text" }, option.label), option.description && h("span", { class: "eds-option-help" }, option.description)))))) : (h("div", { class: "flex items-center gap-x-8" }, h("eds-input", Object.assign({}, inputOpts, { inputTabIndex: 0, value: this.value, checked: this.value === 'on' || this.checked })), this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required }))))) : (h("div", null, (this.label || this.hint) && (h("div", { class: "flex justify-between mb-8" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required })), this.hint && (h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint)))), this.type === 'select' ? (h("eds-input-select", Object.assign({}, inputOpts, { options: this.parsedOptions }))) : this.type === 'file' ? (h("eds-input-file", { name: this.name, inputId: this.inputId, disabled: this.disabled, required: this.required, multiple: true, onEdsfile: this.handleFileChange })) : this.type === 'dropzone' ? (h("eds-input-dropzone", { name: this.name, inputId: this.inputId, disabled: this.disabled, required: this.required, multiple: true, onEdsfile: this.handleFileChange })) : this.type === 'range' ? ((() => {
|
|
122
127
|
var _a, _b, _c, _d, _e, _f;
|
|
123
128
|
const rangeProps = {
|
|
124
129
|
name: inputOpts.name,
|
|
@@ -134,7 +139,7 @@ export class EdsInputField {
|
|
|
134
139
|
// type="number"); fall back to options[0..2].value for
|
|
135
140
|
// backward compatibility with existing range fields.
|
|
136
141
|
return (h("eds-input-range", Object.assign({}, rangeProps, { min: (_a = this.min) !== null && _a !== void 0 ? _a : (_b = opt[0]) === null || _b === void 0 ? void 0 : _b.value, max: (_c = this.max) !== null && _c !== void 0 ? _c : (_d = opt[1]) === null || _d === void 0 ? void 0 : _d.value, step: (_e = this.step) !== null && _e !== void 0 ? _e : (_f = opt[2]) === null || _f === void 0 ? void 0 : _f.value, value: numberValue })));
|
|
137
|
-
})()) : (h("eds-input", Object.assign({}, inputOpts))))), h("div", { key: '
|
|
142
|
+
})()) : (h("eds-input", Object.assign({}, inputOpts))))), h("div", { key: '33bfae3f5ef4a8a1a0c529fade0d1a8616eff100', class: "mt-8" }, h("eds-input-footer", { key: 'c4b6b192d052c486965b9b89fc6756324138975c', id: `${this.name}-footer`, name: this.name, message: this.message, "error-message": this.errorMessage, error: this.error, link: this.link }))));
|
|
138
143
|
}
|
|
139
144
|
static get is() { return "eds-input-field"; }
|
|
140
145
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,10 +17,26 @@ export default {
|
|
|
17
17
|
label: { control: 'text', description: 'Label for the input field', table: { category: 'Core' } },
|
|
18
18
|
placeholder: { control: 'text', description: 'Placeholder text', table: { category: 'Core' } },
|
|
19
19
|
// ── State & validation ──
|
|
20
|
-
required: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
required: {
|
|
21
|
+
control: 'boolean',
|
|
22
|
+
description: 'Whether the input is required',
|
|
23
|
+
table: { category: 'State & validation' }
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
control: 'boolean',
|
|
27
|
+
description: 'Whether the input is disabled',
|
|
28
|
+
table: { category: 'State & validation' }
|
|
29
|
+
},
|
|
30
|
+
error: {
|
|
31
|
+
control: 'boolean',
|
|
32
|
+
description: 'Render the input in an error state',
|
|
33
|
+
table: { category: 'State & validation' }
|
|
34
|
+
},
|
|
35
|
+
errorMessage: {
|
|
36
|
+
control: 'text',
|
|
37
|
+
description: 'Error message shown when invalid',
|
|
38
|
+
table: { category: 'State & validation' }
|
|
39
|
+
},
|
|
24
40
|
checked: {
|
|
25
41
|
control: 'boolean',
|
|
26
42
|
description: 'Checked state (checkbox/radio only)',
|
|
@@ -29,15 +45,27 @@ export default {
|
|
|
29
45
|
},
|
|
30
46
|
// ── Helper text & decoration ──
|
|
31
47
|
hint: { control: 'text', description: 'Hint text next to the label', table: { category: 'Helper & decoration' } },
|
|
32
|
-
message: {
|
|
48
|
+
message: {
|
|
49
|
+
control: 'text',
|
|
50
|
+
description: 'Message displayed below the input',
|
|
51
|
+
table: { category: 'Helper & decoration' }
|
|
52
|
+
},
|
|
33
53
|
icon: {
|
|
34
54
|
control: { type: 'select' },
|
|
35
55
|
options: ICON_OPTIONS,
|
|
36
56
|
description: 'Icon name to display inside the input (from the EDS icon set)',
|
|
37
57
|
table: { category: 'Helper & decoration' }
|
|
38
58
|
},
|
|
39
|
-
link: {
|
|
40
|
-
|
|
59
|
+
link: {
|
|
60
|
+
control: 'object',
|
|
61
|
+
description: 'Help/docs link `{ url, label }`',
|
|
62
|
+
table: { category: 'Helper & decoration' }
|
|
63
|
+
},
|
|
64
|
+
maxLength: {
|
|
65
|
+
control: 'number',
|
|
66
|
+
description: 'Maximum length for text input',
|
|
67
|
+
table: { category: 'Helper & decoration' }
|
|
68
|
+
},
|
|
41
69
|
// ── Number & range (min/max/step apply to type="number" and type="range") ──
|
|
42
70
|
min: { control: 'number', description: 'Minimum value (number & range)', table: { category: 'Number & range' } },
|
|
43
71
|
max: { control: 'number', description: 'Maximum value (number & range)', table: { category: 'Number & range' } },
|
|
@@ -7,8 +7,9 @@ export class EdsInputFile {
|
|
|
7
7
|
};
|
|
8
8
|
this.handleFileSelect = (event) => {
|
|
9
9
|
const input = event.target;
|
|
10
|
-
if (!input.files)
|
|
10
|
+
if (!input.files) {
|
|
11
11
|
return;
|
|
12
|
+
}
|
|
12
13
|
const newFiles = Array.from(input.files).map((file) => ({
|
|
13
14
|
file,
|
|
14
15
|
id: `${file.name}-${Date.now()}-${Math.random()}`
|
|
@@ -40,8 +41,9 @@ export class EdsInputFile {
|
|
|
40
41
|
this.edsfile.emit({ files });
|
|
41
42
|
}
|
|
42
43
|
formatFileSize(bytes) {
|
|
43
|
-
if (bytes === 0)
|
|
44
|
+
if (bytes === 0) {
|
|
44
45
|
return '0 B';
|
|
46
|
+
}
|
|
45
47
|
const k = 1024;
|
|
46
48
|
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
47
49
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
@@ -60,7 +62,7 @@ export class EdsInputFile {
|
|
|
60
62
|
}
|
|
61
63
|
render() {
|
|
62
64
|
const effectiveLabel = this.buttonLabel || (this.multiple ? 'Choose Files' : 'Choose File');
|
|
63
|
-
return (h("div", { key: '
|
|
65
|
+
return (h("div", { key: '810e30b054b1a6a43c9cc79e318ae487679de1d7', class: "eds-input-file-container" }, h("input", { key: '21a2162df7e6cc430b230407891bd1568bb4fe18', ref: (el) => (this.fileInputRef = el), type: "file", id: this.inputId || this.name, name: this.name, class: "eds-input-file-hidden", disabled: this.disabled, required: this.required, multiple: this.multiple, accept: this.accept, onChange: this.handleFileSelect }), h("button", { key: 'd297cf5c5e63c002558e878a140b931a68a25f54', type: "button", class: "eds-input-file-btn", onClick: this.handleButtonClick, disabled: this.disabled }, h("svg", { key: 'eb08b7516dce89647e28ca0c0ec1f70ade64b2cd', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: 'b0eefaf19325e60d5f974039644f8ab962bbfe92', d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { key: 'd0bfb65f3c6e3e9d019d23e94ceeb08ba3f6976e', points: "17 8 12 3 7 8" }), h("line", { key: '3e7b0172924b54c26b9100ea264e85be73beabe9', x1: "12", y1: "3", x2: "12", y2: "15" })), effectiveLabel), this.selectedFiles.length > 0 && (h("div", { key: '633d574a840479eb58ec596078960c88fbf4ce94', class: "eds-input-file-chips" }, this.selectedFiles.map((item) => (h("div", { key: item.id, class: "eds-input-file-chip" }, this.getFileIcon(item.file.name), h("span", { class: "eds-input-file-chip-name" }, item.file.name), h("span", { class: "eds-input-file-chip-size" }, this.formatFileSize(item.file.size)), h("button", { type: "button", class: "eds-input-file-chip-remove", onClick: () => this.handleRemoveFile(item.id), disabled: this.disabled, "aria-label": `Remove ${item.file.name}` }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))))));
|
|
64
66
|
}
|
|
65
67
|
static get is() { return "eds-input-file"; }
|
|
66
68
|
static get encapsulation() { return "shadow"; }
|