Skip to content

Commit

Permalink
🔀 Merge branch 'main' into fix/scss-lint-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Balaji-Sridharan_NYULH authored and Balaji-Sridharan_NYULH committed Nov 25, 2024
2 parents 0a9c694 + e479fc3 commit 7196d4b
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions docs-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"highlight.js": "^11.10.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-live": "^4.1.7"
"react-live": "^4.1.8"
},
"scripts": {
"start": "react-app-rewired start",
Expand All @@ -29,7 +29,7 @@
"raw-loader": "^4.0.2",
"react-app-rewired": "^2.2.1",
"react-scripts": "5.0.1",
"sass": "^1.80.7"
"sass": "^1.81.0"
},
"resolutions": {
"strip-ansi": "6.0.1"
Expand Down
40 changes: 20 additions & 20 deletions docs-site/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5038,13 +5038,13 @@ __metadata:
linkType: hard

"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
version: 7.0.5
resolution: "cross-spawn@npm:7.0.5"
dependencies:
path-key: "npm:^3.1.0"
shebang-command: "npm:^2.0.0"
which: "npm:^2.0.1"
checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750
checksum: 10c0/aa82ce7ac0814a27e6f2b738c5a7cf1fa21a3558a1e42df449fc96541ba3ba731e4d3ecffa4435348808a86212f287c6f20a1ee551ef1ff95d01cfec5f434944
languageName: node
linkType: hard

Expand Down Expand Up @@ -10787,15 +10787,15 @@ __metadata:
languageName: node
linkType: hard

"prism-react-renderer@npm:^2.0.6":
version: 2.3.1
resolution: "prism-react-renderer@npm:2.3.1"
"prism-react-renderer@npm:^2.4.0":
version: 2.4.0
resolution: "prism-react-renderer@npm:2.4.0"
dependencies:
"@types/prismjs": "npm:^1.26.0"
clsx: "npm:^2.0.0"
peerDependencies:
react: ">=16.0.0"
checksum: 10c0/566932127ca18049a651aa038a8f8c7c1ca15950d21b659c2ce71fd95bd03bef2b5d40c489e7aa3453eaf15d984deef542a609d7842e423e6a13427dd90bd371
checksum: 10c0/3d6969b057da0efe39e3e637bf93601cd5757de5919180e8df16daf1d1b8eedc39b70c7f6f28724fba0a01bc857c6b78312ab027f4e913159d1165c5aba235bb
languageName: node
linkType: hard

Expand Down Expand Up @@ -10992,9 +10992,9 @@ __metadata:
react: "npm:^18.3.1"
react-app-rewired: "npm:^2.2.1"
react-dom: "npm:^18.3.1"
react-live: "npm:^4.1.7"
react-live: "npm:^4.1.8"
react-scripts: "npm:5.0.1"
sass: "npm:^1.80.7"
sass: "npm:^1.81.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -11070,17 +11070,17 @@ __metadata:
languageName: node
linkType: hard

"react-live@npm:^4.1.7":
version: 4.1.7
resolution: "react-live@npm:4.1.7"
"react-live@npm:^4.1.8":
version: 4.1.8
resolution: "react-live@npm:4.1.8"
dependencies:
prism-react-renderer: "npm:^2.0.6"
sucrase: "npm:^3.31.0"
prism-react-renderer: "npm:^2.4.0"
sucrase: "npm:^3.35.0"
use-editable: "npm:^2.3.3"
peerDependencies:
react: ">=18.0.0"
react-dom: ">=18.0.0"
checksum: 10c0/728a51cb0b92774076e4592f9b3cbc2af4afac1da549dbb55723728324bdc1968d3f7b268b5dd92929dcc9d3aa1fd1265f7e912b5ee6fd4fe9b5b77898b50237
checksum: 10c0/fa96ca176bc9074e4892d6a079b94488ba74e95907ea187678afb17e4a23cc7760c3774ef17f4429d2ba562f1fda852a822e18a161ef386676371c56a7585970
languageName: node
linkType: hard

Expand Down Expand Up @@ -11591,9 +11591,9 @@ __metadata:
languageName: node
linkType: hard

"sass@npm:^1.80.7":
version: 1.80.7
resolution: "sass@npm:1.80.7"
"sass@npm:^1.81.0":
version: 1.81.0
resolution: "sass@npm:1.81.0"
dependencies:
"@parcel/watcher": "npm:^2.4.1"
chokidar: "npm:^4.0.0"
Expand All @@ -11604,7 +11604,7 @@ __metadata:
optional: true
bin:
sass: sass.js
checksum: 10c0/e0e0df8dc9dd7694826f915196a96cda45fe0fc849be9fc08b43c12aa1250eb512130979ed239e1106476973ace1f52abbcc1d5900a075d3813c282a626dcbf7
checksum: 10c0/9c59b3c9b4231c18fcb4583cc232dbc4de501ddc11101b7a025e44833e3f3ce6031546dc1cd109ee9f04ebcfb1fe30ff870810af33b8feb9aa9e36dfba9ec1ef
languageName: node
linkType: hard

Expand Down Expand Up @@ -12283,7 +12283,7 @@ __metadata:
languageName: node
linkType: hard

"sucrase@npm:^3.31.0, sucrase@npm:^3.32.0":
"sucrase@npm:^3.32.0, sucrase@npm:^3.35.0":
version: 3.35.0
resolution: "sucrase@npm:3.35.0"
dependencies:
Expand Down
6 changes: 3 additions & 3 deletions examples/hello-world/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4947,13 +4947,13 @@ __metadata:
linkType: hard

"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
version: 7.0.5
resolution: "cross-spawn@npm:7.0.5"
dependencies:
path-key: "npm:^3.1.0"
shebang-command: "npm:^2.0.0"
which: "npm:^2.0.1"
checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750
checksum: 10c0/aa82ce7ac0814a27e6f2b738c5a7cf1fa21a3558a1e42df449fc96541ba3ba731e4d3ecffa4435348808a86212f287c6f20a1ee551ef1ff95d01cfec5f434944
languageName: node
linkType: hard

Expand Down
4 changes: 2 additions & 2 deletions src/calendar_container.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react";

export interface CalendarContainerProps extends React.PropsWithChildren {
export interface CalendarContainerProps
extends React.PropsWithChildren<HTMLDivElement> {
showTimeSelectOnly?: boolean;
showTime?: boolean;
className?: string;
}

const CalendarContainer: React.FC<CalendarContainerProps> = function ({
Expand Down
3 changes: 2 additions & 1 deletion src/popper_component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import TabLoop from "./tab_loop";
import withFloating from "./with_floating";

import type { FloatingProps } from "./with_floating";
import type { ReactNode } from "react";

interface PortalProps
extends Omit<React.ComponentPropsWithoutRef<typeof Portal>, "children"> {}
Expand All @@ -20,7 +21,7 @@ interface PopperComponentProps
className?: string;
wrapperClassName?: string;
popperComponent: React.ReactNode;
popperContainer?: React.FC<React.PropsWithChildren>;
popperContainer?: React.FC<{ children?: ReactNode | undefined }>;
targetComponent: React.ReactNode;
popperOnKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
showArrow?: boolean;
Expand Down
21 changes: 1 addition & 20 deletions src/stylesheets/datepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,7 @@ h2.react-datepicker__current-month {
&.react-datepicker__week-number--clickable {
cursor: pointer;

&:not(
.react-datepicker__week-number--selected,
.react-datepicker__week-number--keyboard-selected
):hover {
&:not(.react-datepicker__week-number--selected):hover {
border-radius: $datepicker__border-radius;
background-color: $datepicker__background-color;
}
Expand All @@ -368,22 +365,6 @@ h2.react-datepicker__current-month {
);
}
}

&--keyboard-selected {
border-radius: $datepicker__border-radius;
background-color: color.adjust(
$datepicker__selected-color,
$lightness: 10%
);
color: #fff;

&:hover {
background-color: color.adjust(
$datepicker__selected-color,
$lightness: -5%
);
}
}
}

.react-datepicker__day-names {
Expand Down
5 changes: 4 additions & 1 deletion src/tab_loop.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React, { Component, createRef } from "react";

interface TabLoopProps extends React.PropsWithChildren {
import type { ReactNode } from "react";

interface TabLoopProps {
enableTabLoop?: boolean;
children?: ReactNode | undefined;
}

const focusableElementsSelector =
Expand Down
25 changes: 0 additions & 25 deletions src/test/week_number_test.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ describe("WeekNumber", () => {
) as HTMLDivElement;
expect(weekNumber).not.toBeNull();

expect(
weekNumber?.classList.contains(
"react-datepicker__week-number--keyboard-selected",
),
).toBe(false);
expect(weekNumber?.tabIndex).toBe(0);
});

Expand All @@ -212,11 +207,6 @@ describe("WeekNumber", () => {
".react-datepicker__week-number",
) as HTMLDivElement;
expect(weekNumber).not.toBeNull();
expect(
weekNumber?.classList.contains(
"react-datepicker__week-number--keyboard-selected",
),
).toBe(true);
expect(weekNumber.tabIndex).toBe(0);
});

Expand Down Expand Up @@ -267,11 +257,6 @@ describe("WeekNumber", () => {
const weekNumber = container.querySelector(
".react-datepicker__week-number",
) as HTMLDivElement;
expect(
weekNumber?.classList.contains(
"react-datepicker__week-number--keyboard-selected",
),
).toBe(false);
expect(weekNumber.tabIndex).toBe(-1);
});
});
Expand Down Expand Up @@ -403,11 +388,6 @@ describe("WeekNumber", () => {
"react-datepicker__week-number--selected",
),
).toBe(false);
expect(
weekNumber?.classList.contains(
"react-datepicker__week-number--keyboard-selected",
),
).toBe(true);
});

it("should have the class 'react-datepicker__week-number--selected' if selected is not current week and preselected is not current week", () => {
Expand All @@ -430,11 +410,6 @@ describe("WeekNumber", () => {
"react-datepicker__week-number--selected",
),
).toBe(false);
expect(
weekNumber?.classList.contains(
"react-datepicker__week-number--keyboard-selected",
),
).toBe(false);
});
});
});
Expand Down
2 changes: 0 additions & 2 deletions src/week_number.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ export default class WeekNumber extends Component<WeekNumberProps> {
"react-datepicker__week-number--clickable": !!onClick,
"react-datepicker__week-number--selected":
!!onClick && isSameDay(this.props.date, this.props.selected),
"react-datepicker__week-number--keyboard-selected":
this.isKeyboardSelected(),
};
return (
<div
Expand Down
Loading

0 comments on commit 7196d4b

Please sign in to comment.