From 86d49867c5f14c2fbad0db0020d2c754589a76c8 Mon Sep 17 00:00:00 2001 From: hirsch Date: Tue, 1 Mar 2022 09:04:18 +0100 Subject: [PATCH] fix(react): use fragment for inner child elements --- .../react-component-lib/createComponent.tsx | 6 +-- packages/components/package-lock.json | 46 +++++++++---------- packages/components/package.json | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/components-react/src/react-component-lib/createComponent.tsx b/packages/components-react/src/react-component-lib/createComponent.tsx index 1a24d709d2..0f7afb0c3d 100644 --- a/packages/components-react/src/react-component-lib/createComponent.tsx +++ b/packages/components-react/src/react-component-lib/createComponent.tsx @@ -89,9 +89,9 @@ export const createReactComponent = < * React.createElement causes all elements to be rendered * as instead of the actual Web Component. */ - const component = createElement(tagName, newProps, children) - const fragment = createElement(Fragment, {}, component) - return fragment + const fragment = createElement(Fragment, {}, children) + const component = createElement(tagName, newProps, fragment) + return component } static get displayName() { diff --git a/packages/components/package-lock.json b/packages/components/package-lock.json index c3065139df..bff1b50fa7 100644 --- a/packages/components/package-lock.json +++ b/packages/components/package-lock.json @@ -1,16 +1,16 @@ { "name": "@baloise/design-system-components", - "version": "10.2.0", + "version": "10.2.1-beta.9+c615f5d0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@baloise/design-system-components", - "version": "10.2.0", + "version": "10.2.1-beta.9+c615f5d0", "license": "Apache-2.0", "dependencies": { - "@baloise/design-system-fonts": "^10.2.0", - "@baloise/design-system-icons": "^10.2.0", + "@baloise/design-system-fonts": "10.2.1-beta.9+c615f5d0", + "@baloise/design-system-icons": "10.2.1-beta.9+c615f5d0", "@baloise/stencil-vite-fix": "^9.2.3", "@baloise/web-app-utils": "^3.0.0", "@popperjs/core": "^2.11.2", @@ -35,7 +35,7 @@ "devDependencies": { "@babel/core": "^7.16.0", "@baloise/angular-output-target": "^1.2.0", - "@baloise/react-output-target": "^0.4.0", + "@baloise/react-output-target": "^0.4.1", "@baloise/vue-output-target": "^0.7.3", "@etchteam/storybook-addon-status": "^4.2.0", "@stencil/postcss": "^2.1.0", @@ -1969,19 +1969,19 @@ "dev": true }, "node_modules/@baloise/design-system-fonts": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@baloise/design-system-fonts/-/design-system-fonts-10.2.0.tgz", - "integrity": "sha512-oDBdNxYO9QmQpsMD1KDYVYotRL0vHVPmUfyYHd8Z+ArQKG9j7N2cP9GciylkcAya39NgvLgfVFvNob2jO29Lww==" + "version": "10.2.1-beta.9", + "resolved": "https://registry.npmjs.org/@baloise/design-system-fonts/-/design-system-fonts-10.2.1-beta.9.tgz", + "integrity": "sha512-+3WtKyA/2P8BOCrI0nQlYSF2J8kCUs2yFG2oFjhp4fC0rWjBnsuMtfdWiJqh2Q9TcdoyUksa8chRGbN4UmxcXA==" }, "node_modules/@baloise/design-system-icons": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@baloise/design-system-icons/-/design-system-icons-10.2.0.tgz", - "integrity": "sha512-CHBsltUTPy8xeN/KE9etNbOPX4HJGuCCDdAhrwBAnphJbE71yVzjTzteYas4hiPy5d/X7M+7opui+a7al4U/VQ==" + "version": "10.2.1-beta.9", + "resolved": "https://registry.npmjs.org/@baloise/design-system-icons/-/design-system-icons-10.2.1-beta.9.tgz", + "integrity": "sha512-0vZm8KLPGiLLvC/8EYnl35uUFCrffhSHbYWsvuKvUp3ZS3EOyzGn7Nu0+ZRRHvVAOCTTSADtVvC/OoLBAqff5Q==" }, "node_modules/@baloise/react-output-target": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@baloise/react-output-target/-/react-output-target-0.4.0.tgz", - "integrity": "sha512-m3o1GqQlb6yhvSGxQrzLuEM3kxM47OEixLz5bGFqAZEpn6XpGr4lF9GbdxWsSyKtC/8iswxvUTFO4QuTv0Y8qA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@baloise/react-output-target/-/react-output-target-0.4.1.tgz", + "integrity": "sha512-gQ+45zRy+jQW1WSOwY14IKp/cG2wOVLbrz/jrAvcY/T39NBAr1/FJhBm5wM0zgSlQvfSCFjShHwdnmaYavuiMQ==", "dev": true, "peerDependencies": { "@stencil/core": "^2.9.0" @@ -25710,19 +25710,19 @@ "dev": true }, "@baloise/design-system-fonts": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@baloise/design-system-fonts/-/design-system-fonts-10.2.0.tgz", - "integrity": "sha512-oDBdNxYO9QmQpsMD1KDYVYotRL0vHVPmUfyYHd8Z+ArQKG9j7N2cP9GciylkcAya39NgvLgfVFvNob2jO29Lww==" + "version": "10.2.1-beta.9", + "resolved": "https://registry.npmjs.org/@baloise/design-system-fonts/-/design-system-fonts-10.2.1-beta.9.tgz", + "integrity": "sha512-+3WtKyA/2P8BOCrI0nQlYSF2J8kCUs2yFG2oFjhp4fC0rWjBnsuMtfdWiJqh2Q9TcdoyUksa8chRGbN4UmxcXA==" }, "@baloise/design-system-icons": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@baloise/design-system-icons/-/design-system-icons-10.2.0.tgz", - "integrity": "sha512-CHBsltUTPy8xeN/KE9etNbOPX4HJGuCCDdAhrwBAnphJbE71yVzjTzteYas4hiPy5d/X7M+7opui+a7al4U/VQ==" + "version": "10.2.1-beta.9", + "resolved": "https://registry.npmjs.org/@baloise/design-system-icons/-/design-system-icons-10.2.1-beta.9.tgz", + "integrity": "sha512-0vZm8KLPGiLLvC/8EYnl35uUFCrffhSHbYWsvuKvUp3ZS3EOyzGn7Nu0+ZRRHvVAOCTTSADtVvC/OoLBAqff5Q==" }, "@baloise/react-output-target": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@baloise/react-output-target/-/react-output-target-0.4.0.tgz", - "integrity": "sha512-m3o1GqQlb6yhvSGxQrzLuEM3kxM47OEixLz5bGFqAZEpn6XpGr4lF9GbdxWsSyKtC/8iswxvUTFO4QuTv0Y8qA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@baloise/react-output-target/-/react-output-target-0.4.1.tgz", + "integrity": "sha512-gQ+45zRy+jQW1WSOwY14IKp/cG2wOVLbrz/jrAvcY/T39NBAr1/FJhBm5wM0zgSlQvfSCFjShHwdnmaYavuiMQ==", "dev": true, "requires": {} }, diff --git a/packages/components/package.json b/packages/components/package.json index a7ca2d313e..a9e8a42d50 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -90,7 +90,7 @@ "devDependencies": { "@babel/core": "^7.16.0", "@baloise/angular-output-target": "^1.2.0", - "@baloise/react-output-target": "^0.4.0", + "@baloise/react-output-target": "^0.4.1", "@baloise/vue-output-target": "^0.7.3", "@etchteam/storybook-addon-status": "^4.2.0", "@stencil/postcss": "^2.1.0",