Skip to content

Commit

Permalink
X2-9892 | Cannot Close the Customer's Reservation Window when Selecte…
Browse files Browse the repository at this point in the history
…d in the Dashboard on The Xola Tablet (#331)

* X2-9892 | Cannot Close the Customer's Reservation Window when Selected in the Dashboard on The Xola Tablet

* lint and pretty

* lint
  • Loading branch information
VitalyDevico authored Jun 6, 2024
1 parent 250860d commit 6737b22
Show file tree
Hide file tree
Showing 26 changed files with 37 additions and 39 deletions.
4 changes: 2 additions & 2 deletions src/components/Breakdown.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import clsx from "clsx";
import { isNumber } from "lodash";
import PropTypes from "prop-types";
import React, { createContext, useContext, useMemo } from "react";
import { isNumber } from "lodash";
import clsx from "clsx";
import { Currency } from "./Utilities/Currency";

const colors = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Buttons/SubmitButton.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Transition } from "@headlessui/react";
import clsx from "clsx";
import PropTypes from "prop-types";
import React, { useState, useEffect } from "react";
import { Spinner } from "../Spinner";
import React, { useEffect, useState } from "react";
import { CheckIcon } from "../../icons";
import { Spinner } from "../Spinner";
import { Button, colors } from "./Button";

const loadingColors = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/DatePicker/DatePicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* This does not include the today button
*/
.DayPicker-Month {
@apply my-0 mx-0 p-0 pt-0.5 ring-0 focus:outline-none focus:ring-0;
@apply mx-0 my-0 p-0 pt-0.5 ring-0 focus:outline-none focus:ring-0;
min-width: 400px; /* Odd width given from Figma */
border-collapse: inherit;
border-spacing: 0 8px; /* 8px between each week (row) */
Expand All @@ -52,7 +52,7 @@
/* The "Today" button.
A lot of specific vaules which I normally wouldn't use. But this is a third party lib where I cannot change the markup */
.DayPicker-TodayButton {
@apply absolute top-0 right-24 h-10 px-3.5 py-2.5 leading-4;
@apply absolute right-24 top-0 h-10 px-3.5 py-2.5 leading-4;
@apply rounded border border-solid border-gray bg-white text-base font-semibold tracking-tightest text-black hover:border-blue hover:bg-blue-lighter;
}

Expand Down
12 changes: 6 additions & 6 deletions src/components/DatePicker/RangeDatePicker.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import PropTypes from "prop-types";
import DayPicker from "react-day-picker";
import clsx from "clsx";
import { isArray, isFunction } from "lodash";
import { Tooltip } from "../Tooltip";
import PropTypes from "prop-types";
import React from "react";
import DayPicker from "react-day-picker";
import { now } from "../../helpers/date";
import { NavbarElement } from "./NavbarElement";
import { MonthYearSelector } from "./MonthYearSelector";
import { Tooltip } from "../Tooltip";
import { Day } from "./Day";
import { MonthYearSelector } from "./MonthYearSelector";
import { NavbarElement } from "./NavbarElement";

const RangeDatePicker = ({
getTooltip,
Expand Down
2 changes: 1 addition & 1 deletion src/components/DatePicker/RelativeDateRange.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from "prop-types";
import React from "react";
import { now, toDate } from "../../helpers/date";
import { Button, Select } from "../..";
import { now, toDate } from "../../helpers/date";

const options = {
YESTERDAY: "P1D,yesterday",
Expand Down
4 changes: 2 additions & 2 deletions src/components/DatePicker/UpcomingDatePicker.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import dayjs from "dayjs";
import clsx from "clsx";
import dayjs from "dayjs";
import PropTypes from "prop-types";
import React from "react";

export const UpcomingDatePicker = ({ value, upcomingDates, onChange, onMonthChange }) => {
return (
Expand Down
5 changes: 2 additions & 3 deletions src/components/Drawer.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Dialog, Transition } from "@headlessui/react";
import clsx from "clsx";
import PropTypes from "prop-types";
import React, { Fragment, forwardRef } from "react";
import React, { forwardRef, Fragment } from "react";
import { CloseIcon } from "../icons";
import { Button } from "./Buttons/Button";

Expand Down Expand Up @@ -92,8 +92,7 @@ const CloseButton = ({ onClose }) => {
size="small"
variant="link"
className={clsx(
"m-2.5 inline-flex !h-10 !w-10 items-center justify-center !rounded-full bg-white !px-1.5",
"!text-black focus:hidden",
"m-2.5 inline-flex !h-10 !w-10 items-center justify-center !rounded-full bg-white !px-1.5 !text-black",
)}
onClick={onClose}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Forms/BaseInput.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import clsx from "clsx";
import { isEmpty, isString } from "lodash";
import PropTypes from "prop-types";
import React, { forwardRef } from "react";
import { isEmpty, isString } from "lodash";
import { Dot } from "../Dot/Dot";

const sizes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Forms/Label.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import React from "react";
import PropTypes from "prop-types";
import React from "react";

export const Label = ({ isDisabled = false, isError = false, className, ...rest }) => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Forms/RangeSlider.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import clsx from "clsx";
import React from "react";
import PropTypes from "prop-types";
import Nouislider from "nouislider-react";
import PropTypes from "prop-types";
import React from "react";
import "nouislider/distribute/nouislider.css";
import "./RangeSlider.css";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Forms/ValuePopoverText.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { WarningDiamondIcon, Tooltip } from "../..";
import { Tooltip, WarningDiamondIcon } from "../..";

export const ValuePopoverText = ({ value, error }) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderToolbar.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import React from "react";
import PropTypes from "prop-types";
import React from "react";
import { Breadcrumb, Search } from "..";

export const HeaderToolbar = ({ classNames, children }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Key.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import clsx from "clsx";
import React from "react";
import PropTypes from "prop-types";
import React from "react";
import { isOSX } from "../helpers/browser";

export const Key = ({ char, className, ...rest }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Logo.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import clsx from "clsx";
import PropTypes from "prop-types";
import React from "react";

const sizes = {
small: "w-10 h-10",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/Sidebar.Heading.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PropTypes from "prop-types";
import clsx from "clsx";
import PropTypes from "prop-types";
import React from "react";

export const SidebarHeading = ({ icon: Icon, label, className }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Spinner.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import clsx from "clsx";
import PropTypes from "prop-types";
import React from "react";
import { CircleNotch } from "../icons";

const colors = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tooltip.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import Tippy from "@tippyjs/react";
import PropTypes from "prop-types";
import React from "react";
import { followCursor } from "tippy.js"; // Dont remove this even if unused. It is required for one prop
import "tippy.js/dist/tippy.css"; // If we customize the style, the change this and import our own style

Expand Down
2 changes: 1 addition & 1 deletion src/components/Utilities/Number.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import getUserLocale from "get-user-locale";
import React from "react";
import PropTypes from "prop-types";
import React from "react";
import { numberFormat } from "../../helpers/numbers";

const userLocale = getUserLocale();
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/date.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import dayjs, { isDayjs } from "dayjs";
import LocalizedFormat from "dayjs/plugin/localizedFormat";
import customParseFormat from "dayjs/plugin/customParseFormat";
import LocalizedFormat from "dayjs/plugin/localizedFormat";
import quarterOfYear from "dayjs/plugin/quarterOfYear";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";
import utc from "dayjs/plugin/utc";

dayjs.extend(customParseFormat);
dayjs.extend(LocalizedFormat);
Expand Down
2 changes: 1 addition & 1 deletion src/icons/src/Tutorials/TutorialsButtonIcon.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import clsx from "clsx";
import React from "react";

export const TutorialsButtonIcon = (props) => {
const className = clsx("relative -top-0.25 inline-block", props.className);
Expand Down
2 changes: 1 addition & 1 deletion src/stories/DataDisplay/DateRangePicker.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const DateRangePickerStories = {
const today = dayjs.tz("2022-10-10").toDate();
const handleSubmitDateRange = (e) => {
console.log("handleSubmitDateRange", { event: e });
}
};

export const Default = () => {
const [value, setValue] = useState({ from: new Date("2022-02-03"), to: new Date("2022-03-08") });
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Forms/ComboBox.stories.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import clsx from "clsx";
import React from "react";
import { ComboBox, Currency, FormGroup, Label } from "../..";

const ComboBoxStories = {
Expand Down
1 change: 0 additions & 1 deletion src/stories/Forms/Switch.stories.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState } from "react";

import { Switch } from "../..";

const SwitchStories = {
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Forms/Textarea.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const AutoSize = () => {
return (
<FormGroup>
<Label>Text</Label>
<Textarea shouldAutoSize={true} rows={6}/>
<Textarea shouldAutoSize={true} rows={6} />
</FormGroup>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Installation.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Description } from "@storybook/addon-docs";
import { Description, Meta } from "@storybook/addon-docs";
import Readme from "../../README.md";

<Meta title="Installation" />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Media/Icons.stories.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { map, omitBy } from "lodash";
import React, { useState } from "react";
import { Toaster } from "react-hot-toast";
import * as all from "../../icons/";
import { flash, Input } from "../..";
import * as all from "../../icons/";

const iconNames = omitBy(all, (Icon, name) => !name.endsWith("Icon"));
const icons = map(iconNames, (Icon, name) => ({ Icon, name }));
Expand Down

0 comments on commit 6737b22

Please sign in to comment.