diff --git a/package.json b/package.json index 02bc87ebf..9c77887c5 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ }, "dependencies": { "@floating-ui/react": "^0.26.2", - "classnames": "^2.2.6", + "clsx": "^2.1.0", "date-fns": "^3.3.1", "prop-types": "^15.7.2", "react-onclickoutside": "^6.13.0" diff --git a/rollup.config.mjs b/rollup.config.mjs index ded74a513..8797faab2 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -46,7 +46,6 @@ const globals = { react: "React", "prop-types": "PropTypes", "react-onclickoutside": "onClickOutside", - classnames: "classNames", }; // NOTE:https://rollupjs.org/migration/#changed-defaults diff --git a/src/calendar.jsx b/src/calendar.jsx index 9f5a3f841..e16639768 100644 --- a/src/calendar.jsx +++ b/src/calendar.jsx @@ -7,7 +7,7 @@ import Year from "./year"; import InputTime from "./inputTime"; import React from "react"; import PropTypes from "prop-types"; -import classnames from "classnames"; +import { clsx } from "clsx"; import CalendarContainer from "./calendar_container"; import { newDate, @@ -441,10 +441,7 @@ export default class Calendar extends React.Component { return (
{weekDayName}
@@ -1098,7 +1095,7 @@ export default class Calendar extends React.Component { return (
{ - const className = classnames(this.props.className, { + const className = clsx(this.props.className, { [outsideClickIgnoreClass]: this.state.open, }); @@ -1264,7 +1264,7 @@ export default class DatePicker extends React.Component { placeholder: this.props.placeholderText, disabled: this.props.disabled, autoComplete: this.props.autoComplete, - className: classnames(customInput.props.className, className), + className: clsx(customInput.props.className, className), title: this.props.title, readOnly: this.props.readOnly, required: this.props.required, @@ -1298,7 +1298,7 @@ export default class DatePicker extends React.Component { return (