From e765340dd45811d06ab372a17dc3a8c12d294842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mar=C3=ADn?= <50973629+frankops11@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:32:53 +0000 Subject: [PATCH 1/3] fix: resolve issue #4291 --- src/stylesheets/datepicker.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stylesheets/datepicker.scss b/src/stylesheets/datepicker.scss index 581f4c1b2..137cf970a 100644 --- a/src/stylesheets/datepicker.scss +++ b/src/stylesheets/datepicker.scss @@ -513,6 +513,7 @@ .react-datepicker__calendar-icon { position: absolute; padding: 0.5rem; + box-sizing: content-box; } } From 914354aeb984871997c0da251cb1d3aebd0cade3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mar=C3=ADn?= <50973629+frankops11@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:38:06 +0000 Subject: [PATCH 2/3] feat: Add ability to add styles to SVG by default and update package version --- package.json | 2 +- src/calendar_icon.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8683f578f..bbdb43a54 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "HackerOne", "name": "react-datepicker", "description": "A simple and reusable datepicker component for React", - "version": "4.19.0", + "version": "4.19.1", "license": "MIT", "homepage": "https://github.com/Hacker0x01/react-datepicker", "main": "dist/index.js", diff --git a/src/calendar_icon.jsx b/src/calendar_icon.jsx index 23264d5a3..01f21dd0e 100644 --- a/src/calendar_icon.jsx +++ b/src/calendar_icon.jsx @@ -22,7 +22,7 @@ const CalendarIcon = ({ icon, className }) => { // Default SVG Icon return ( From bcc1dc34d3e8885b6151b57f085ff6ab7429c227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mar=C3=ADn?= <50973629+frankops11@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:19:25 +0000 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=F0=9F=94=84=20revert=20package=20ve?= =?UTF-8?q?rsion=20and=20=F0=9F=9A=91=20adjust=20failing=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- test/datepicker_test.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bbdb43a54..8683f578f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "HackerOne", "name": "react-datepicker", "description": "A simple and reusable datepicker component for React", - "version": "4.19.1", + "version": "4.19.0", "license": "MIT", "homepage": "https://github.com/Hacker0x01/react-datepicker", "main": "dist/index.js", diff --git a/test/datepicker_test.test.js b/test/datepicker_test.test.js index 6d8881766..9bdf33930 100644 --- a/test/datepicker_test.test.js +++ b/test/datepicker_test.test.js @@ -2234,7 +2234,7 @@ describe("DatePicker", () => { datePicker, "react-datepicker__calendar-icon", ).getAttribute("class"); - expect(showIconClass).toBe("react-datepicker__calendar-icon"); + expect(showIconClass).toMatch(/^react-datepicker__calendar-icon\s?$/); }); describe("Year picker", () => {