From 0f368e5350b9dee8adaa71d6482a1a040d13909f Mon Sep 17 00:00:00 2001 From: melloware Date: Fri, 6 Dec 2024 08:25:50 -0500 Subject: [PATCH] Fix #7368: Unique key prop added to CHips and icons --- .../button/__snapshots__/Button.spec.js.snap | 1 - components/lib/chip/Chip.js | 10 ++- .../lib/chip/__snapshots__/Chip.spec.js.snap | 2 - components/lib/chips/Chips.js | 12 +++- .../__snapshots__/Fieldset.spec.js.snap | 55 +++++++------- .../__snapshots__/Message.spec.js.snap | 6 -- .../panel/__snapshots__/Panel.spec.js.snap | 71 +++++++++---------- components/lib/utils/IconUtils.js | 4 +- package-lock.json | 18 ++--- package.json | 4 +- 10 files changed, 88 insertions(+), 95 deletions(-) diff --git a/components/lib/button/__snapshots__/Button.spec.js.snap b/components/lib/button/__snapshots__/Button.spec.js.snap index 7b9dce0da6..603ee73b87 100644 --- a/components/lib/button/__snapshots__/Button.spec.js.snap +++ b/components/lib/button/__snapshots__/Button.spec.js.snap @@ -102,7 +102,6 @@ exports[`Button when click the button if loading is true it renders Button with disabled="" > ); + content.push({props.imageAlt}); } else if (props.icon) { const chipIconProps = mergeProps( { @@ -82,7 +82,7 @@ export const Chip = React.memo( ); content.push( - + {props.label} ); @@ -109,7 +109,11 @@ export const Chip = React.memo( ptm('root') ); - return
{content}
; + return ( +
+ {content} +
+ ); }; React.useImperativeHandle(ref, () => ({ diff --git a/components/lib/chip/__snapshots__/Chip.spec.js.snap b/components/lib/chip/__snapshots__/Chip.spec.js.snap index 5d219c7653..0e5f298500 100644 --- a/components/lib/chip/__snapshots__/Chip.spec.js.snap +++ b/components/lib/chip/__snapshots__/Chip.spec.js.snap @@ -85,7 +85,6 @@ exports[`Chip when removable is true it returns with remove icon: before remove data-pc-section="root" > {content}; + const label = ( + + {content} + + ); const icon = createRemoveIcon(value, index); const tokenProps = mergeProps( { @@ -456,7 +460,9 @@ export const Chips = React.memo( return ( <> -
{list}
+
+ {list} +
{hasTooltip && } ); diff --git a/components/lib/fieldset/__snapshots__/Fieldset.spec.js.snap b/components/lib/fieldset/__snapshots__/Fieldset.spec.js.snap index 194ea4c07e..e94256c5f1 100644 --- a/components/lib/fieldset/__snapshots__/Fieldset.spec.js.snap +++ b/components/lib/fieldset/__snapshots__/Fieldset.spec.js.snap @@ -68,23 +68,22 @@ exports[`Fieldset when Fieldset is toggleable it must expand and collapse: expan class="p-fieldset p-component p-fieldset-toggleable" data-pc-name="fieldset" data-pc-section="root" - id="pr_id_3" + id="pr_id_6" >
Expand/Collapse @@ -134,17 +134,16 @@ exports[`Panel when Panel is toggleable it must expand and collapse: expandable- data-pc-section="icons" >
Expand/Collapse @@ -277,17 +275,16 @@ exports[`Panel when Panel is toggleable it must expand and collapse: expandable- data-pc-section="icons" >
Toggleable @@ -420,17 +416,16 @@ exports[`Panel when Panel is toggleable it will toggle when clicked: toggleable- data-pc-section="icons" >
; + content = ; if (iconType !== 'string') { const defaultContentOptions = { diff --git a/package-lock.json b/package-lock.json index f25410ceac..38144feef1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "10.8.5", "dependencies": { "@docsearch/react": "3.6.2", - "chart.js": "4.4.6", + "chart.js": "4.4.7", "file-saver": "2.0.5", "fs-extra": "^11.2.0", "jspdf": "2.5.2", @@ -18,7 +18,7 @@ "path": "^0.12.7", "primeflex": "^3.3.1", "primeicons": "^7.0.0", - "quill": "2.0.2", + "quill": "2.0.3", "react": "18.3.1", "react-dom": "18.3.1", "react-transition-group": "^4.4.5", @@ -6037,9 +6037,10 @@ } }, "node_modules/chart.js": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.6.tgz", - "integrity": "sha512-8Y406zevUPbbIBA/HRk33khEmQPk5+cxeflWE/2rx1NJsjVWMPw/9mSP9rxHP5eqi6LNoPBVMfZHxbwLSgldYA==", + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz", + "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==", + "license": "MIT", "dependencies": { "@kurkle/color": "^0.3.0" }, @@ -13884,9 +13885,10 @@ "dev": true }, "node_modules/quill": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/quill/-/quill-2.0.2.tgz", - "integrity": "sha512-QfazNrhMakEdRG57IoYFwffUIr04LWJxbS/ZkidRFXYCQt63c1gK6Z7IHUXMx/Vh25WgPBU42oBaNzQ0K1R/xw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/quill/-/quill-2.0.3.tgz", + "integrity": "sha512-xEYQBqfYx/sfb33VJiKnSJp8ehloavImQ2A6564GAbqG55PGw1dAWUn1MUbQB62t0azawUS2CZZhWCjO8gRvTw==", + "license": "BSD-3-Clause", "dependencies": { "eventemitter3": "^5.0.1", "lodash-es": "^4.17.21", diff --git a/package.json b/package.json index 2df91baa10..373b682955 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@docsearch/react": "3.6.2", - "chart.js": "4.4.6", + "chart.js": "4.4.7", "file-saver": "2.0.5", "fs-extra": "^11.2.0", "jspdf": "2.5.2", @@ -37,7 +37,7 @@ "path": "^0.12.7", "primeflex": "^3.3.1", "primeicons": "^7.0.0", - "quill": "2.0.2", + "quill": "2.0.3", "react": "18.3.1", "react-dom": "18.3.1", "react-transition-group": "^4.4.5",