diff --git a/.storybook/main.js b/.storybook/main.js index 95039f6f..34d92b04 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -29,6 +29,7 @@ if (!isProd) { path.resolve(`${__dirname}/../src/components/ecl-menu`), path.resolve(`${__dirname}/../src/components/ecl-modal`), path.resolve(`${__dirname}/../src/components/ecl-description-list`), + path.resolve(`${__dirname}/../src/components/ecl-content-block`), path.resolve(`${__dirname}/../static`), ]; } diff --git a/package.json b/package.json index 24a95a0a..fa6c6d6a 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@babel/preset-react": "7.22.15", "@babel/preset-typescript": "7.23.2", "@prettier/plugin-xml": "3.2.2", - "@stencil/angular-output-target": "0.8.2", + "@stencil/angular-output-target": "0.8.3", "@stencil/react-output-target": "0.5.3", "@storybook/addon-essentials": "7.5.1", "@storybook/addon-links": "7.5.1", diff --git a/packages/ecl-webcomponents/package.json b/packages/ecl-webcomponents/package.json index 58077a46..a82330cd 100644 --- a/packages/ecl-webcomponents/package.json +++ b/packages/ecl-webcomponents/package.json @@ -30,7 +30,7 @@ "@stencil/core": "4.6.0" }, "devDependencies": { - "@stencil/angular-output-target": "0.8.2", + "@stencil/angular-output-target": "0.8.3", "@stencil/react-output-target": "0.5.3" } } diff --git a/patches/@ecl+builder+3.10.0.patch b/patches/@ecl+builder+3.11.0.patch similarity index 100% rename from patches/@ecl+builder+3.10.0.patch rename to patches/@ecl+builder+3.11.0.patch diff --git a/patches/@ecl+theme-dev+3.10.0.patch b/patches/@ecl+theme-dev+3.11.0.patch similarity index 100% rename from patches/@ecl+theme-dev+3.10.0.patch rename to patches/@ecl+theme-dev+3.11.0.patch diff --git a/patches/@ecl+vanilla-component-accordion+3.10.0.patch b/patches/@ecl+vanilla-component-accordion+3.11.0.patch similarity index 100% rename from patches/@ecl+vanilla-component-accordion+3.10.0.patch rename to patches/@ecl+vanilla-component-accordion+3.11.0.patch diff --git a/patches/@ecl+vanilla-component-button+3.10.0.patch b/patches/@ecl+vanilla-component-button+3.11.0.patch similarity index 100% rename from patches/@ecl+vanilla-component-button+3.10.0.patch rename to patches/@ecl+vanilla-component-button+3.11.0.patch diff --git a/patches/@ecl+vanilla-component-card+3.10.0.patch b/patches/@ecl+vanilla-component-card+3.11.0.patch similarity index 100% rename from patches/@ecl+vanilla-component-card+3.10.0.patch rename to patches/@ecl+vanilla-component-card+3.11.0.patch diff --git a/patches/@ecl+vanilla-component-carousel+3.11.0.patch b/patches/@ecl+vanilla-component-carousel+3.11.0.patch new file mode 100644 index 00000000..fc565dda --- /dev/null +++ b/patches/@ecl+vanilla-component-carousel+3.11.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@ecl/vanilla-component-carousel/carousel.js b/node_modules/@ecl/vanilla-component-carousel/carousel.js +index 3e1dc99..08cdab4 100644 +--- a/node_modules/@ecl/vanilla-component-carousel/carousel.js ++++ b/node_modules/@ecl/vanilla-component-carousel/carousel.js +@@ -131,6 +131,8 @@ export class Carousel { + this.direction = getComputedStyle(this.element).direction; + + this.slides = queryAll(this.slideClass, this.element); ++ this.slidesContainer.innerHTML = ''; ++ this.slidesContainer.append(...this.slides); + this.total = this.slides.length; + + // If only one slide, don't initialize carousel and hide controls \ No newline at end of file diff --git a/patches/@ecl+vanilla-component-category-filter+3.10.0.patch b/patches/@ecl+vanilla-component-category-filter+3.11.0.patch similarity index 100% rename from patches/@ecl+vanilla-component-category-filter+3.10.0.patch rename to patches/@ecl+vanilla-component-category-filter+3.11.0.patch diff --git a/patches/@ecl+vanilla-component-content-block+3.11.0.patch b/patches/@ecl+vanilla-component-content-block+3.11.0.patch new file mode 100644 index 00000000..1b8e52b3 --- /dev/null +++ b/patches/@ecl+vanilla-component-content-block+3.11.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@ecl/vanilla-component-content-block/content-block.js b/node_modules/@ecl/vanilla-component-content-block/content-block.js +index 6913470..ee23ad4 100644 +--- a/node_modules/@ecl/vanilla-component-content-block/content-block.js ++++ b/node_modules/@ecl/vanilla-component-content-block/content-block.js +@@ -72,7 +72,7 @@ export class ContentBlock { + } + + this.title = queryOne(this.titleSelector, this.element); +- this.linkEl = this.title ? queryOne('a', this.title) : false; ++ this.linkEl = this.title.nodeName === 'A' ? this.title : queryOne('a', this.title); + if (this.linkEl) { + this.picture.style.cursor = 'pointer'; + const img = queryOne('img', this.picture); diff --git a/scripts/copy-assets.sh b/scripts/copy-assets.sh index 518db4b2..929236c4 100755 --- a/scripts/copy-assets.sh +++ b/scripts/copy-assets.sh @@ -38,4 +38,5 @@ cp -r ./src/components/ecl-range/build ./build cp -r ./src/components/ecl-menu/build ./build cp -r ./src/components/ecl-modal/build ./build cp -r ./src/components/ecl-description-list/build ./build +cp -r ./src/components/ecl-content-block/build ./build cp -a ./static/* ./build \ No newline at end of file diff --git a/src/components.d.ts b/src/components.d.ts index f12b8da1..ae815716 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -115,6 +115,7 @@ export namespace Components { "theme": string; } interface EclContentBlock { + "eclScript": boolean; "hasDescription": boolean; "hasLabels": boolean; "hasLinks": boolean; @@ -492,11 +493,13 @@ export namespace Components { "closeLabel": string; "eclScript": boolean; "itemId": string; + "size": string; "styleClass": string; "theme": string; "toggleId": string; "variant": string; "withBody": boolean; + "withBodyFixed": boolean; "withFooter": boolean; "withHeader": boolean; } @@ -1531,6 +1534,7 @@ declare namespace LocalJSX { "theme"?: string; } interface EclContentBlock { + "eclScript"?: boolean; "hasDescription"?: boolean; "hasLabels"?: boolean; "hasLinks"?: boolean; @@ -1914,11 +1918,13 @@ declare namespace LocalJSX { "closeLabel"?: string; "eclScript"?: boolean; "itemId"?: string; + "size"?: string; "styleClass"?: string; "theme"?: string; "toggleId"?: string; "variant"?: string; "withBody"?: boolean; + "withBodyFixed"?: boolean; "withFooter"?: boolean; "withHeader"?: boolean; } diff --git a/src/components/ecl-accordion/package.json b/src/components/ecl-accordion/package.json index 2a5cf716..e5f5b4ac 100644 --- a/src/components/ecl-accordion/package.json +++ b/src/components/ecl-accordion/package.json @@ -15,16 +15,16 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/resources-ec-icons": "3.10.0", - "@ecl/resources-eu-icons": "3.10.0", - "@ecl/specs-component-accordion": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-accordion": "3.10.0", - "@ecl/vanilla-component-button": "3.10.0", - "@ecl/vanilla-component-icon": "3.10.0", - "@ecl/vanilla-layout-grid": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/resources-ec-icons": "3.11.0", + "@ecl/resources-eu-icons": "3.11.0", + "@ecl/specs-component-accordion": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-accordion": "3.11.0", + "@ecl/vanilla-component-button": "3.11.0", + "@ecl/vanilla-component-icon": "3.11.0", + "@ecl/vanilla-layout-grid": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-banner/package.json b/src/components/ecl-banner/package.json index e31077a0..d3e93bb7 100644 --- a/src/components/ecl-banner/package.json +++ b/src/components/ecl-banner/package.json @@ -13,8 +13,8 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/vanilla-component-banner": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/vanilla-component-banner": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-blockquote/package.json b/src/components/ecl-blockquote/package.json index 5ddfcf86..d8260b76 100644 --- a/src/components/ecl-blockquote/package.json +++ b/src/components/ecl-blockquote/package.json @@ -13,10 +13,10 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-blockquote": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-blockquote": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-breadcrumb/package.json b/src/components/ecl-breadcrumb/package.json index d54f9807..f6911fef 100644 --- a/src/components/ecl-breadcrumb/package.json +++ b/src/components/ecl-breadcrumb/package.json @@ -4,7 +4,7 @@ "license": "EUPL-1.2", "version": "0.11.0", "description": "ECL Breadcrumb", - "main": "ecl-breadcrumb.js", + "main": "ecl-breadcrumb.tsx", "private": true, "scripts": { "build:scripts": "cross-env ecl-builder scripts", @@ -14,10 +14,10 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-breadcrumb": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-breadcrumb": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-button/package.json b/src/components/ecl-button/package.json index 637e1a0d..c7ee349c 100644 --- a/src/components/ecl-button/package.json +++ b/src/components/ecl-button/package.json @@ -13,15 +13,15 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/resources-ec-icons": "3.10.0", - "@ecl/resources-eu-icons": "3.10.0", - "@ecl/specs-component-button": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-button": "3.10.0", - "@ecl/vanilla-component-icon": "3.10.0", - "@ecl/vanilla-component-link": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/resources-ec-icons": "3.11.0", + "@ecl/resources-eu-icons": "3.11.0", + "@ecl/specs-component-button": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-button": "3.11.0", + "@ecl/vanilla-component-icon": "3.11.0", + "@ecl/vanilla-component-link": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-card/ecl-card.stories.ts b/src/components/ecl-card/ecl-card.stories.ts index 56164516..7a3b5772 100644 --- a/src/components/ecl-card/ecl-card.stories.ts +++ b/src/components/ecl-card/ecl-card.stories.ts @@ -17,11 +17,13 @@ const Template = (args) => has-title has-description has-labels + ecl-script > Title diff --git a/src/components/ecl-card/ecl-card.tsx b/src/components/ecl-card/ecl-card.tsx index ca44213c..5ac09669 100644 --- a/src/components/ecl-card/ecl-card.tsx +++ b/src/components/ecl-card/ecl-card.tsx @@ -31,6 +31,7 @@ export class EclCard { imageAlt={this.imageAlt} imgClass={`ecl-card__image sc-ecl-card-${this.theme}`} styleClass={`ecl-card__picture sc-ecl-picture-${this.theme}`} + data-ecl-picture-link > diff --git a/src/components/ecl-card/package.json b/src/components/ecl-card/package.json index 4a75327b..22185ea9 100644 --- a/src/components/ecl-card/package.json +++ b/src/components/ecl-card/package.json @@ -13,8 +13,8 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/vanilla-component-card": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/vanilla-component-card": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-card/test/__snapshots__/ecl-card.spec.tsx.snap b/src/components/ecl-card/test/__snapshots__/ecl-card.spec.tsx.snap index 10d0ff13..8de7fe5a 100644 --- a/src/components/ecl-card/test/__snapshots__/ecl-card.spec.tsx.snap +++ b/src/components/ecl-card/test/__snapshots__/ecl-card.spec.tsx.snap @@ -4,7 +4,7 @@ exports[`ecl-card renders 1`] = `
- +
diff --git a/src/components/ecl-carousel/package.json b/src/components/ecl-carousel/package.json index fee113bf..a367ea0e 100644 --- a/src/components/ecl-carousel/package.json +++ b/src/components/ecl-carousel/package.json @@ -14,9 +14,9 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/vanilla-component-carousel": "3.10.0", - "@ecl/vanilla-layout-grid": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/vanilla-component-carousel": "3.11.0", + "@ecl/vanilla-layout-grid": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-category-filter/package.json b/src/components/ecl-category-filter/package.json index fd2b8f4e..8748a545 100644 --- a/src/components/ecl-category-filter/package.json +++ b/src/components/ecl-category-filter/package.json @@ -14,8 +14,8 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/vanilla-component-category-filter": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/vanilla-component-category-filter": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-content-block/ecl-builder.config.js b/src/components/ecl-content-block/ecl-builder.config.js index e57d7819..1e6390a9 100644 --- a/src/components/ecl-content-block/ecl-builder.config.js +++ b/src/components/ecl-content-block/ecl-builder.config.js @@ -10,6 +10,18 @@ const includePaths = [nodeModules]; const banner = `${pkg.name} - ${pkg.version} Built on ${new Date().toISOString()}`; module.exports = { + scripts: [ + { + entry: path.resolve(nodeModules, '@ecl/vanilla-component-content-block/content-block.js'), + dest: path.resolve(outputFolder, 'scripts/ecl-content-block-vanilla.js'), + options: { + banner, + moduleName: 'ECL', + includePaths, + sourceMap: false, + }, + }, + ], styles: [ { entry: path.resolve(__dirname, 'src/styles/ecl-content-block-ec.scss'), diff --git a/src/components/ecl-content-block/ecl-content-block.stories.ts b/src/components/ecl-content-block/ecl-content-block.stories.ts index 8a21f74c..94ceaefc 100644 --- a/src/components/ecl-content-block/ecl-content-block.stories.ts +++ b/src/components/ecl-content-block/ecl-content-block.stories.ts @@ -48,6 +48,7 @@ const Template = (args) => has-labels has-links has-secondary-links + ecl-script > { + const contentBlock = new ECL.ContentBlock(this.el); + contentBlock.init(); + }; + + document.body.appendChild(script); + } } render() { diff --git a/src/components/ecl-content-block/package.json b/src/components/ecl-content-block/package.json index e9e73478..b0c6a4b8 100644 --- a/src/components/ecl-content-block/package.json +++ b/src/components/ecl-content-block/package.json @@ -8,19 +8,20 @@ "private": true, "scripts": { "build:styles": "cross-env ecl-builder styles", + "build:scripts": "cross-env ecl-builder scripts", "build": "run-s clean build:*", "clean": "rimraf build", "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-content-block": "3.10.0", - "@ecl/vanilla-component-description-list": "3.10.0", - "@ecl/vanilla-component-icon": "3.10.0", - "@ecl/vanilla-component-label": "3.10.0", - "@ecl/vanilla-component-link": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-content-block": "3.11.0", + "@ecl/vanilla-component-description-list": "3.11.0", + "@ecl/vanilla-component-icon": "3.11.0", + "@ecl/vanilla-component-label": "3.11.0", + "@ecl/vanilla-component-link": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-content-block/readme.md b/src/components/ecl-content-block/readme.md index 59e2a0e3..48dc11ba 100644 --- a/src/components/ecl-content-block/readme.md +++ b/src/components/ecl-content-block/readme.md @@ -9,6 +9,7 @@ | Property | Attribute | Description | Type | Default | | ------------------- | --------------------- | ----------- | --------- | ----------- | +| `eclScript` | `ecl-script` | | `boolean` | `false` | | `hasDescription` | `has-description` | | `boolean` | `undefined` | | `hasLabels` | `has-labels` | | `boolean` | `undefined` | | `hasLinks` | `has-links` | | `boolean` | `undefined` | diff --git a/src/components/ecl-content-block/test/__snapshots__/ecl-content-block.spec.tsx.snap b/src/components/ecl-content-block/test/__snapshots__/ecl-content-block.spec.tsx.snap index 698595e7..9489730e 100644 --- a/src/components/ecl-content-block/test/__snapshots__/ecl-content-block.spec.tsx.snap +++ b/src/components/ecl-content-block/test/__snapshots__/ecl-content-block.spec.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ecl-content-block renders 1`] = ` - +
    diff --git a/src/components/ecl-content-block/test/ecl-content-block.spec.tsx b/src/components/ecl-content-block/test/ecl-content-block.spec.tsx index dc4029f7..85529d46 100644 --- a/src/components/ecl-content-block/test/ecl-content-block.spec.tsx +++ b/src/components/ecl-content-block/test/ecl-content-block.spec.tsx @@ -21,6 +21,7 @@ describe('ecl-content-block', () => { has-labels has-links has-secondary-links + ecl-script > has-title has-description has-labels + ecl-script has-lists > slot="title" path="${randomizedLink('/example.html')}" variant="standalone" + data-ecl-title-link > Title diff --git a/src/components/ecl-content-item/package.json b/src/components/ecl-content-item/package.json index 280e1ca7..2a28f046 100644 --- a/src/components/ecl-content-item/package.json +++ b/src/components/ecl-content-item/package.json @@ -13,10 +13,10 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-content-item": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-content-item": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-date-block/package.json b/src/components/ecl-date-block/package.json index 63ff3eef..32aba2db 100644 --- a/src/components/ecl-date-block/package.json +++ b/src/components/ecl-date-block/package.json @@ -13,11 +13,11 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-date-block": "3.10.0", - "@ecl/vanilla-utility-screen-reader": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-date-block": "3.11.0", + "@ecl/vanilla-utility-screen-reader": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-datepicker/package.json b/src/components/ecl-datepicker/package.json index 5c02b12c..1375fac9 100644 --- a/src/components/ecl-datepicker/package.json +++ b/src/components/ecl-datepicker/package.json @@ -14,10 +14,10 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-datepicker": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-datepicker": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-description-list/package.json b/src/components/ecl-description-list/package.json index bafb2ade..8d265bd2 100644 --- a/src/components/ecl-description-list/package.json +++ b/src/components/ecl-description-list/package.json @@ -14,10 +14,10 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-description-list": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-description-list": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-expandable/package.json b/src/components/ecl-expandable/package.json index 54aaa569..85227280 100644 --- a/src/components/ecl-expandable/package.json +++ b/src/components/ecl-expandable/package.json @@ -14,12 +14,12 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/specs-component-expandable": "3.10.0", - "@ecl/theme-ec": "3.10.0", - "@ecl/theme-eu": "3.10.0", - "@ecl/vanilla-component-button": "3.10.0", - "@ecl/vanilla-component-expandable": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/specs-component-expandable": "3.11.0", + "@ecl/theme-ec": "3.11.0", + "@ecl/theme-eu": "3.11.0", + "@ecl/vanilla-component-button": "3.11.0", + "@ecl/vanilla-component-expandable": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-fact-figures/package.json b/src/components/ecl-fact-figures/package.json index 62ca3bfa..1f111675 100644 --- a/src/components/ecl-fact-figures/package.json +++ b/src/components/ecl-fact-figures/package.json @@ -13,9 +13,9 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/vanilla-component-fact-figures": "3.10.0", - "@ecl/vanilla-layout-grid": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/vanilla-component-fact-figures": "3.11.0", + "@ecl/vanilla-layout-grid": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-featured-item/package.json b/src/components/ecl-featured-item/package.json index 64dcaf38..dae5f178 100644 --- a/src/components/ecl-featured-item/package.json +++ b/src/components/ecl-featured-item/package.json @@ -13,8 +13,8 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/vanilla-component-featured-item": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/vanilla-component-featured-item": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-file-upload/package.json b/src/components/ecl-file-upload/package.json index 4d804296..72aec176 100644 --- a/src/components/ecl-file-upload/package.json +++ b/src/components/ecl-file-upload/package.json @@ -14,9 +14,9 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/vanilla-component-button": "3.10.0", - "@ecl/vanilla-component-file-upload": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/vanilla-component-button": "3.11.0", + "@ecl/vanilla-component-file-upload": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-file/package.json b/src/components/ecl-file/package.json index d66582e2..c2ace927 100644 --- a/src/components/ecl-file/package.json +++ b/src/components/ecl-file/package.json @@ -14,9 +14,9 @@ "prepublish": "npm run build" }, "devDependencies": { - "@ecl/builder": "3.10.0", - "@ecl/vanilla-component-file": "3.10.0", - "@ecl/vanilla-layout-grid": "3.10.0", + "@ecl/builder": "3.11.0", + "@ecl/vanilla-component-file": "3.11.0", + "@ecl/vanilla-layout-grid": "3.11.0", "cross-env": "7.0.3" }, "repository": { diff --git a/src/components/ecl-footer/ecl-footer.stories.ts b/src/components/ecl-footer/ecl-footer.stories.ts index 7faaf28f..15482fcf 100644 --- a/src/components/ecl-footer/ecl-footer.stories.ts +++ b/src/components/ecl-footer/ecl-footer.stories.ts @@ -120,7 +120,7 @@ const Template = () => theme="ec" slot="ecl-footer-list-main" > - News + Press Corner - News + Press corner diff --git a/src/components/ecl-footer/test/ecl-footer.spec.tsx b/src/components/ecl-footer/test/ecl-footer.spec.tsx index 63842b33..ccbccdd3 100644 --- a/src/components/ecl-footer/test/ecl-footer.spec.tsx +++ b/src/components/ecl-footer/test/ecl-footer.spec.tsx @@ -118,7 +118,7 @@ describe('ecl-footer', () => { theme="ec" slot="ecl-footer-list-main" > - News + Press corner type="button" item-id="modal-demo-toggle" theme="${args.theme}" + variant="secondary" > Open modal @@ -34,30 +35,43 @@ const Template = args => with-footer with-body ecl-script + with-body-fixed toggle-id="modal-demo-toggle" close-label="Close" > Lorem ipsum dolor sit amet -
    Sed quam augue, volutpat sed dapibus in, accumsan a arcu. - Nulla quam enim, porttitor at neque a, egestas porttitor tortor. Nam tortor sem, elementum id augue quis, posuere vestibulum dui. - Donec id posuere libero, sit amet egestas lorem. Aliquam finibus ipsum mauris, a molestie tortor laoreet. + + Scrollable content: +
    + Sed quam augue, volutpat sed dapibus in, accumsan a arcu. Nulla quam enim, porttitor at neque a, egestas porttitor tortor. Nam tortor sem, elementum id augue quis, posuere vestibulum dui. Donec id posuere libero, sit amet egestas lorem. Aliquam finibus ipsum mauris, a molestie tortor laoreet. Morbi interdum orci arcu, tempor porta nisl elementum non. Morbi blandit risus sed turpis mollis mattis. Maecenas semper, risus nec sollicitudin aliquet, dui eros vehicula nulla, ac bibendum mauris mauris a lectus. Ut ut justo in sem vestibulum mollis. Pellentesque ac commodo erat. Phasellus vitae aliquet mi. Suspendisse sed nisl feugiat, porta ante a, finibus nisi. + Sed quam augue, volutpat sed dapibus in, accumsan a arcu. Nulla quam enim, porttitor at neque a, egestas porttitor tortor. Nam tortor sem, elementum id augue quis, posuere vestibulum dui. Donec id posuere libero, sit amet egestas lorem. Aliquam finibus ipsum mauris, a molestie tortor laoreet. Morbi interdum orci arcu, tempor porta nisl elementum non. Morbi blandit risus sed turpis mollis mattis. Maecenas semper, risus nec sollicitudin aliquet, dui eros vehicula nulla, ac bibendum mauris mauris a lectus. Ut ut justo in sem vestibulum mollis. Pellentesque ac commodo erat. Phasellus vitae aliquet mi. Suspendisse sed nisl feugiat, porta ante a, finibus nisi. +
    +
    +
    - Primary action + Secondary action - Secondary action + Primary action
    `; diff --git a/src/components/ecl-modal/ecl-modal.tsx b/src/components/ecl-modal/ecl-modal.tsx index 47b59c54..1ed5002b 100644 --- a/src/components/ecl-modal/ecl-modal.tsx +++ b/src/components/ecl-modal/ecl-modal.tsx @@ -18,10 +18,12 @@ export class EclModal { @Prop() variant: string = 'default'; @Prop() styleClass: string; @Prop() withBody: boolean = false; + @Prop() withBodyFixed: boolean = false; @Prop() withHeader: boolean = false; @Prop() eclScript: boolean = false; @Prop() withFooter: boolean = false; @Prop() toggleId: string; + @Prop() size: string = 'l'; @Prop() closeLabel: string; @Prop() itemId: string; @@ -29,10 +31,15 @@ export class EclModal { return [ `ecl-modal`, `ecl-modal--${this.variant}`, + `ecl-modal--${this.size}`, this.styleClass ].join(' '); } + getContentClasses() { + return this.size === 's' ? 'ecl-modal__content ecl-col-12' : 'ecl-modal__content ecl-col-m-10 ecl-col-l-8'; + } + componentDidRender() { if (this.eclScript) { const src = getAssetPath('./build/scripts/ecl-modal-vanilla.js'); @@ -57,7 +64,7 @@ export class EclModal { id={this.itemId} >
    -
    +
    {this.withHeader && this.variant !== 'default' ? (
    - { this.withBody ?
    - -
    : '' - } + { this.withBody ? +
    + +
    : '' + } + { this.withBody ? + : '' + } + { this.withBodyFixed ? +
    + +
    : '' + } +
    { this.withFooter ?