fix(admin-ui): Lint all UI files (#3459)

This commit is contained in:
Kasper Fabricius Kristensen authored and GitHub committed 2023-03-13 14:02:20 +01:00
1 parent 55febef7f1
commit ad7d7fcd51
430 files changed
+1490 -1664

No files matched your search

@@ -34,18 +34,18 @@ const Avatar: React.FC<AvatarProps> = ({
return ( return (
<RadixAvatar.Root <RadixAvatar.Root
className={clsx( className={clsx(
"w-full h-full items-center justify-center overflow-hidden select-none rounded-circle", "rounded-circle h-full w-full select-none items-center justify-center overflow-hidden",
color color
)} )}
> >
<RadixAvatar.Image <RadixAvatar.Image
src={user?.img} src={user?.img}
alt={username} alt={username}
className="object-cover w-full h-full rounded-circle" className="rounded-circle h-full w-full object-cover"
/> />
<RadixAvatar.Fallback <RadixAvatar.Fallback
className={clsx( className={clsx(
"w-full h-full flex items-center justify-center bg-inherit text-grey-0 rounded-circle", "text-grey-0 rounded-circle flex h-full w-full items-center justify-center bg-inherit",
font font
)} )}
> >
@@ -1,5 +1,4 @@
import clsx from "clsx" import clsx from "clsx"
import React from "react"
import { useNavigate } from "react-router-dom" import { useNavigate } from "react-router-dom"
import ArrowLeftIcon from "../../fundamentals/icons/arrow-left-icon" import ArrowLeftIcon from "../../fundamentals/icons/arrow-left-icon"
@@ -18,7 +17,7 @@ const BackButton = ({ path, label = "Go back", className }: Props) => {
}} }}
className={clsx("px-small py-xsmall", className)} className={clsx("px-small py-xsmall", className)}
> >
<div className="flex items-center gap-x-xsmall text-grey-50 inter-grey-40 inter-small-semibold"> <div className="gap-x-xsmall text-grey-50 inter-grey-40 inter-small-semibold flex items-center">
<ArrowLeftIcon size={20} /> <ArrowLeftIcon size={20} />
<span className="ml-1">{label}</span> <span className="ml-1">{label}</span>
</div> </div>
@@ -12,13 +12,13 @@ const Checkbox = React.forwardRef(
useImperativeHandle(ref, () => checkboxRef.current) useImperativeHandle(ref, () => checkboxRef.current)
return ( return (
<label <label
className={clsx("flex items-center cursor-pointer", className)} className={clsx("flex cursor-pointer items-center", className)}
htmlFor={id} htmlFor={id}
> >
<input <input
type="checkbox" type="checkbox"
ref={checkboxRef} ref={checkboxRef}
className="form-checkbox w-[20px] h-[20px] rounded-base text-violet-60 focus:ring-0 mr-small border-grey-30" className="form-checkbox rounded-base text-violet-60 mr-small border-grey-30 h-[20px] w-[20px] focus:ring-0"
value={value} value={value}
id={id} id={id}
{...rest} {...rest}
@@ -12,7 +12,7 @@ const CustomHeader = ({
const year = date.getFullYear() const year = date.getFullYear()
return ( return (
<div className="flex w-full gap-4 items-center"> <div className="flex w-full items-center gap-4">
<div className="flex flex-1 items-center justify-end gap-3"> <div className="flex flex-1 items-center justify-end gap-3">
<NativeSelect <NativeSelect
defaultValue={monthName} defaultValue={monthName}
@@ -50,13 +50,13 @@ const DatePicker: React.FC<DateTimePickerProps> = ({
<PopoverPrimitive.Root open={isOpen} onOpenChange={setIsOpen}> <PopoverPrimitive.Root open={isOpen} onOpenChange={setIsOpen}>
<PopoverPrimitive.Trigger asChild> <PopoverPrimitive.Trigger asChild>
<button <button
className={clsx("w-full rounded-rounded border ", { className={clsx("rounded-rounded w-full border ", {
"shadow-input border-violet-60": isOpen, "shadow-input border-violet-60": isOpen,
"border-grey-20": !isOpen, "border-grey-20": !isOpen,
})} })}
> >
<InputContainer className="border-0 shadown-none focus-within:shadow-none"> <InputContainer className="shadown-none border-0 focus-within:shadow-none">
<div className="w-full flex text-grey-50 pr-0.5 justify-between"> <div className="text-grey-50 flex w-full justify-between pr-0.5">
<InputHeader <InputHeader
{...{ {...{
label, label,
@@ -76,15 +76,15 @@ const DatePicker: React.FC<DateTimePickerProps> = ({
<PopoverPrimitive.Content <PopoverPrimitive.Content
side="top" side="top"
sideOffset={8} sideOffset={8}
className="rounded-rounded px-8 border border-grey-20 bg-grey-0 w-full shadow-dropdown" className="rounded-rounded border-grey-20 bg-grey-0 shadow-dropdown w-full border px-8"
> >
<CalendarComponent date={tempDate} onChange={setTempDate} /> <CalendarComponent date={tempDate} onChange={setTempDate} />
<div className="flex w-full mb-8 mt-5"> <div className="mb-8 mt-5 flex w-full">
<Button <Button
variant="ghost" variant="ghost"
size="medium" size="medium"
onClick={() => setIsOpen(false)} onClick={() => setIsOpen(false)}
className="mr-2 w-1/3 flex justify-center border border-grey-20" className="border-grey-20 mr-2 flex w-1/3 justify-center border"
> >
Cancel Cancel
</Button> </Button>
@@ -92,7 +92,7 @@ const DatePicker: React.FC<DateTimePickerProps> = ({
size="medium" size="medium"
variant="primary" variant="primary"
onClick={() => submitDate()} onClick={() => submitDate()}
className="w-2/3 flex justify-center" className="flex w-2/3 justify-center"
>{`Set ${label}`}</Button> >{`Set ${label}`}</Button>
</div> </div>
</PopoverPrimitive.Content> </PopoverPrimitive.Content>
@@ -49,13 +49,13 @@ const TimePicker: React.FC<DateTimePickerProps> = ({
<PopoverPrimitive.Root open={isOpen} onOpenChange={setIsOpen}> <PopoverPrimitive.Root open={isOpen} onOpenChange={setIsOpen}>
<PopoverPrimitive.Trigger asChild> <PopoverPrimitive.Trigger asChild>
<button <button
className={clsx("w-full rounded-rounded border ", { className={clsx("rounded-rounded w-full border ", {
"shadow-input border-violet-60": isOpen, "shadow-input border-violet-60": isOpen,
"border-grey-20": !isOpen, "border-grey-20": !isOpen,
})} })}
> >
<InputContainer className="border-0 shadown-none focus-within:shadow-none"> <InputContainer className="shadown-none border-0 focus-within:shadow-none">
<div className="w-full flex text-grey-50 pr-0.5 justify-between"> <div className="text-grey-50 flex w-full justify-between pr-0.5">
<InputHeader <InputHeader
{...{ {...{
label, label,
@@ -66,7 +66,7 @@ const TimePicker: React.FC<DateTimePickerProps> = ({
/> />
<ArrowDownIcon size={16} /> <ArrowDownIcon size={16} />
</div> </div>
<div className="w-full items-center flex text-left text-grey-40"> <div className="text-grey-40 flex w-full items-center text-left">
<ClockIcon size={16} /> <ClockIcon size={16} />
<span className="mx-1">UTC</span> <span className="mx-1">UTC</span>
<span className="text-grey-90"> <span className="text-grey-90">
@@ -79,7 +79,7 @@ const TimePicker: React.FC<DateTimePickerProps> = ({
<PopoverPrimitive.Content <PopoverPrimitive.Content
side="top" side="top"
sideOffset={8} sideOffset={8}
className="rounded-rounded scrollbar-hide border px-6 pt-6 pb-4 border-grey-20 bg-grey-0 w-full flex shadow-dropdown" className="rounded-rounded scrollbar-hide border-grey-20 bg-grey-0 shadow-dropdown flex w-full border px-6 pt-6 pb-4"
> >
<NumberScroller <NumberScroller
numbers={hourNumbers} numbers={hourNumbers}
@@ -92,7 +92,7 @@ const TimePicker: React.FC<DateTimePickerProps> = ({
selected={selectedMinute} selected={selectedMinute}
onSelect={(n) => setSelectedMinute(n)} onSelect={(n) => setSelectedMinute(n)}
/> />
<div className="absolute bottom-4 left-0 right-0 bg-gradient-to-b from-transparent to-grey-0 h-xlarge z-10" /> <div className="to-grey-0 h-xlarge absolute bottom-4 left-0 right-0 z-10 bg-gradient-to-b from-transparent" />
</PopoverPrimitive.Content> </PopoverPrimitive.Content>
</PopoverPrimitive.Root> </PopoverPrimitive.Root>
</div> </div>
@@ -37,7 +37,7 @@ const Fade: React.FC<FadeProps> = ({
return ( return (
<div <div
className={clsx("transition-all duration-100 z-50", classes, classname)} className={clsx("z-50 transition-all duration-100", classes, classname)}
> >
{show ? children : null} {show ? children : null}
</div> </div>
@@ -77,7 +77,7 @@ const FileUploadField: React.FC<FileUploadFieldProps> = ({
onDrop={handleFileDrop} onDrop={handleFileDrop}
onDragOver={(e) => e.preventDefault()} onDragOver={(e) => e.preventDefault()}
className={clsx( className={clsx(
"flex flex-col select-none inter-base-regular text-grey-50 cursor-pointer items-center justify-center w-full h-full rounded-rounded border-2 border-dashed border-grey-20 transition-colors hover:border-violet-60 hover:text-grey-40", "inter-base-regular text-grey-50 rounded-rounded border-grey-20 hover:border-violet-60 hover:text-grey-40 flex h-full w-full cursor-pointer select-none flex-col items-center justify-center border-2 border-dashed transition-colors",
className className
)} )}
> >
@@ -1,5 +1,4 @@
import clsx from "clsx" import clsx from "clsx"
import React from "react"
import TaxesIcon from "../../fundamentals/icons/taxes-icon" import TaxesIcon from "../../fundamentals/icons/taxes-icon"
import Tooltip from "../tooltip" import Tooltip from "../tooltip"
@@ -10,7 +9,7 @@ type Props = {
const IncludesTaxTooltip = ({ includesTax }: Props) => { const IncludesTaxTooltip = ({ includesTax }: Props) => {
return ( return (
<Tooltip content={includesTax ? "Tax incl. price" : "Tax excl. price"}> <Tooltip content={includesTax ? "Tax incl. price" : "Tax excl. price"}>
<div className="w-large h-large rounded-rounded border border-grey-20 flex items-center justify-center"> <div className="w-large h-large rounded-rounded border-grey-20 flex items-center justify-center border">
<TaxesIcon <TaxesIcon
size={16} size={16}
className={clsx({ className={clsx({
@@ -1,6 +1,5 @@
import { ErrorMessage } from "@hookform/error-message" import { ErrorMessage } from "@hookform/error-message"
import clsx from "clsx" import clsx from "clsx"
import React from "react"
import { MultipleFieldErrors } from "react-hook-form" import { MultipleFieldErrors } from "react-hook-form"
import Tooltip from "../tooltip" import Tooltip from "../tooltip"
@@ -22,7 +21,7 @@ const InputError = ({ errors, name, className }: InputErrorProps) => {
render={({ message, messages }) => { render={({ message, messages }) => {
return ( return (
<div <div
className={clsx("text-rose-50 inter-small-regular mt-2", className)} className={clsx("inter-small-regular mt-2 text-rose-50", className)}
> >
{messages ? ( {messages ? (
<MultipleMessages messages={messages} /> <MultipleMessages messages={messages} />
@@ -43,12 +42,12 @@ const MultipleMessages = ({ messages }: { messages: MultipleFieldErrors }) => {
const remainderErrors = errors.slice(1) const remainderErrors = errors.slice(1)
return ( return (
<div className="flex items-center gap-x-1 cursor-default"> <div className="flex cursor-default items-center gap-x-1">
<p>{displayedError}</p> <p>{displayedError}</p>
{remainderErrors?.length > 0 && ( {remainderErrors?.length > 0 && (
<Tooltip <Tooltip
content={ content={
<div className="text-rose-50 inter-small-regular"> <div className="inter-small-regular text-rose-50">
{remainderErrors.map((e, i) => { {remainderErrors.map((e, i) => {
return ( return (
<p key={i}> <p key={i}>
@@ -30,7 +30,7 @@ const Notification: React.FC<NotificationProps> = ({
return ( return (
<ToasterContainer visible={toast.visible} className="w-[380px]"> <ToasterContainer visible={toast.visible} className="w-[380px]">
<div>{getIcon(type)}</div> <div>{getIcon(type)}</div>
<div className="flex flex-col ml-small mr-base gap-y-2xsmall flex-grow text-white"> <div className="ml-small mr-base gap-y-2xsmall flex flex-grow flex-col text-white">
<span className="inter-small-semibold">{title}</span> <span className="inter-small-semibold">{title}</span>
<span className="inter-small-regular text-grey-20">{message}</span> <span className="inter-small-regular text-grey-20">{message}</span>
</div> </div>
@@ -18,7 +18,7 @@ const NumberScroller: React.FC<NumberScrollerProps> = ({
<div <div
{...props} {...props}
className={clsx( className={clsx(
"flex flex-col time-list h-[305px] overflow-y-auto", "time-list flex h-[305px] flex-col overflow-y-auto",
className className
)} )}
> >
@@ -27,14 +27,14 @@ const NumberScroller: React.FC<NumberScrollerProps> = ({
<div <div
key={i} key={i}
className={clsx( className={clsx(
"w-[40px] h-[40px] last:mb-4 rounded inter-base-regular hover:bg-grey-20", "inter-base-regular hover:bg-grey-20 h-[40px] w-[40px] rounded last:mb-4",
{ {
"bg-violet-60 hover:bg-violet-50 text-grey-0 inter-base-semibold": "bg-violet-60 text-grey-0 inter-base-semibold hover:bg-violet-50":
n === selected, n === selected,
} }
)} )}
> >
<button onClick={() => onSelect(n)} className="w-full h-full py-2"> <button onClick={() => onSelect(n)} className="h-full w-full py-2">
{n.toLocaleString("en-US", { minimumIntegerDigits: 2 })} {n.toLocaleString("en-US", { minimumIntegerDigits: 2 })}
</button> </button>
</div> </div>
@@ -1,5 +1,3 @@
import React from "react"
type OSShortcutProps = { type OSShortcutProps = {
winModifiers: string | string[] winModifiers: string | string[]
macModifiers: string | string[] macModifiers: string | string[]
@@ -38,8 +36,8 @@ const OSShortcut = ({ winModifiers, macModifiers, keys }: OSShortcutProps) => {
} }
return ( return (
<div className="flex items-center text-grey-40"> <div className="text-grey-40 flex items-center">
<p className="m-0 inter-base-semibold"> <p className="inter-base-semibold m-0">
<span className="inter-base-semibold">{modifiers} </span> <span className="inter-base-semibold">{modifiers} </span>
{input} {input}
</p> </p>
@@ -32,7 +32,7 @@ const ErrorState: React.FC<SavingStateProps> = ({
<div> <div>
<XCircleIcon size={20} className="text-rose-40" /> <XCircleIcon size={20} className="text-rose-40" />
</div> </div>
<div className="flex flex-col ml-small mr-base gap-y-2xsmall flex-grow"> <div className="ml-small mr-base gap-y-2xsmall flex flex-grow flex-col">
<span className="inter-small-semibold">{title}</span> <span className="inter-small-semibold">{title}</span>
<span className="inter-small-regular text-grey-50">{message}</span> <span className="inter-small-regular text-grey-50">{message}</span>
</div> </div>
@@ -54,21 +54,21 @@ const SaveNotification: React.FC<SaveNotificationProps> = ({
} }
return ( return (
<ToasterContainer visible={toast.visible} className="p-0 pl-base w-[448px]"> <ToasterContainer visible={toast.visible} className="pl-base w-[448px] p-0">
<div className="py-base">{getIcon(icon)}</div> <div className="py-base">{getIcon(icon)}</div>
<div className="flex flex-col ml-small mr-base gap-y-2xsmall flex-grow py-base"> <div className="ml-small mr-base gap-y-2xsmall py-base flex flex-grow flex-col">
<span className="inter-small-semibold">{title}</span> <span className="inter-small-semibold">{title}</span>
<span className="inter-small-regular text-grey-50">{message}</span> <span className="inter-small-regular text-grey-50">{message}</span>
</div> </div>
<div className="flex flex-col inter-small-semibold border-l border-grey-20 h-full"> <div className="inter-small-semibold border-grey-20 flex h-full flex-col border-l">
<button <button
onClick={handleSave} onClick={handleSave}
className="inter-small-semibold flex items-center justify-center h-1/2 border-b border-grey-20 px-base text-violet-60" className="inter-small-semibold border-grey-20 px-base text-violet-60 flex h-1/2 items-center justify-center border-b"
> >
Publish Publish
</button> </button>
<button <button
className="inter-small-semibold flex items-center justify-center h-1/2 px-base" className="inter-small-semibold px-base flex h-1/2 items-center justify-center"
onClick={onDismiss} onClick={onDismiss}
> >
Discard Discard
@@ -19,7 +19,7 @@ const SavingState: React.FC<SavingStateProps> = ({
<div> <div>
<Spinner variant="secondary" size="large" /> <Spinner variant="secondary" size="large" />
</div> </div>
<div className="flex flex-col ml-small mr-base gap-y-2xsmall flex-grow"> <div className="ml-small mr-base gap-y-2xsmall flex flex-grow flex-col">
<span className="inter-small-semibold">{title}</span> <span className="inter-small-semibold">{title}</span>
<span className="inter-small-regular text-grey-50">{message}</span> <span className="inter-small-regular text-grey-50">{message}</span>
</div> </div>
@@ -32,7 +32,7 @@ const SuccessState: React.FC<SavingStateProps> = ({
<div> <div>
<CheckCircleIcon size={20} className="text-emerald-40" /> <CheckCircleIcon size={20} className="text-emerald-40" />
</div> </div>
<div className="flex flex-col ml-small mr-base gap-y-2xsmall flex-grow"> <div className="ml-small mr-base gap-y-2xsmall flex flex-grow flex-col">
<span className="inter-small-semibold">{title}</span> <span className="inter-small-semibold">{title}</span>
<span className="inter-small-regular text-grey-50">{message}</span> <span className="inter-small-regular text-grey-50">{message}</span>
</div> </div>
@@ -19,10 +19,10 @@ const Spinner: React.FC<SpinnerProps> = ({
{ "h-[16px] w-[16px]": size === "small" } { "h-[16px] w-[16px]": size === "small" }
)} )}
> >
<div className="flex items-center justify-center relative w-full h-full"> <div className="relative flex h-full w-full items-center justify-center">
<div <div
className={clsx( className={clsx(
"animate-ring border-2 h-4/5 w-4/5 rounded-circle border-transparent", "animate-ring rounded-circle h-4/5 w-4/5 border-2 border-transparent",
{ "border-t-grey-0": variant === "primary" }, { "border-t-grey-0": variant === "primary" },
{ "border-t-violet-60": variant === "secondary" } { "border-t-violet-60": variant === "secondary" }
)} )}
@@ -1,6 +1,5 @@
import * as RadixSwitch from "@radix-ui/react-switch" import * as RadixSwitch from "@radix-ui/react-switch"
import clsx from "clsx" import clsx from "clsx"
import React from "react"
/** /**
* A controlled switch component atom. * A controlled switch component atom.
@@ -11,12 +10,12 @@ function Switch(props: RadixSwitch.SwitchProps) {
{...props} {...props}
disabled={props.disabled} disabled={props.disabled}
className={clsx( className={clsx(
"w-8 h-[18px] rounded-full transition-bg bg-gray-300 radix-state-checked:bg-violet-60" "transition-bg radix-state-checked:bg-violet-60 h-[18px] w-8 rounded-full bg-gray-300"
)} )}
> >
<RadixSwitch.Thumb <RadixSwitch.Thumb
className={clsx( className={clsx(
"w-2 h-2 bg-white rounded-full block transition-transform translate-x-[5px] radix-state-checked:translate-x-[19px]" "radix-state-checked:translate-x-[19px] block h-2 w-2 translate-x-[5px] rounded-full bg-white transition-transform"
)} )}
/> />
</RadixSwitch.Root> </RadixSwitch.Root>
@@ -11,17 +11,17 @@ export const Thumbnail = ({ src, className, size = "small" }: Props) => {
return ( return (
<div <div
className={clsx( className={clsx(
"bg-grey-5 flex items-center justify-center overflow-hidden rounded-rounded", "bg-grey-5 rounded-rounded flex items-center justify-center overflow-hidden",
{ {
"w-[30px] h-10": size === "small", "h-10 w-[30px]": size === "small",
"w-9 h-12": size === "medium", "h-12 w-9": size === "medium",
"w-[170px] h-[226px]": size === "large", "h-[226px] w-[170px]": size === "large",
}, },
className className
)} )}
> >
{src ? ( {src ? (
<img src={src} className="object-cover object-center flex-1" /> <img src={src} className="flex-1 object-cover object-center" />
) : ( ) : (
<ImagePlaceholderIcon /> <ImagePlaceholderIcon />
)} )}
@@ -14,7 +14,7 @@ const ToasterContainer: React.FC<ToasterContainerProps> = ({
return ( return (
<div <div
className={clsx( className={clsx(
"flex items-start bg-grey-90 p-base border rounded-rounded shadow-toaster mb-xsmall last:mb-0", "bg-grey-90 p-base rounded-rounded shadow-toaster mb-xsmall flex items-start border last:mb-0",
{ {
"animate-enter": visible, "animate-enter": visible,
}, },
@@ -41,8 +41,8 @@ const Tooltip = ({
align="center" align="center"
className={clsx( className={clsx(
"inter-small-semibold text-grey-50", "inter-small-semibold text-grey-50",
"bg-grey-0 py-2 px-3 shadow-dropdown rounded-rounded", "bg-grey-0 shadow-dropdown rounded-rounded py-2 px-3",
"border border-solid border-grey-20", "border-grey-20 border border-solid",
"max-w-[220px]", "max-w-[220px]",
className className
)} )}
@@ -60,10 +60,10 @@ const TwoStepDelete = forwardRef<HTMLButtonElement, Props>(
return ( return (
<button <button
className={clsx( className={clsx(
"transition-all rounded-lg border flex items-center justify-center", "flex items-center justify-center rounded-lg border transition-all",
{ {
"bg-rose-50 border-rose-50 px-3 py-1.5": armed, "border-rose-50 bg-rose-50 px-3 py-1.5": armed,
"bg-transparent border-gray-20 p-1.5": !armed, "border-gray-20 bg-transparent p-1.5": !armed,
}, },
{ {
"!bg-grey-40 !border-grey-40 !p-1.5": deleting, "!bg-grey-40 !border-grey-40 !p-1.5": deleting,
@@ -75,14 +75,14 @@ const TwoStepDelete = forwardRef<HTMLButtonElement, Props>(
ref={innerRef} ref={innerRef}
> >
<div <div
className={clsx("text-rose-50 inter-small-semibold", { className={clsx("inter-small-semibold text-rose-50", {
hidden: armed || deleting, hidden: armed || deleting,
})} })}
> >
{children || <TrashIcon className="text-grey-50" size={20} />} {children || <TrashIcon className="text-grey-50" size={20} />}
</div> </div>
<span <span
className={clsx("text-white inter-small-semibold", { className={clsx("inter-small-semibold text-white", {
hidden: !armed || deleting, hidden: !armed || deleting,
})} })}
> >
@@ -23,7 +23,7 @@ const IconBadge: React.FC<IconBadgeProps> = ({
<Badge <Badge
variant={variant ?? "default"} variant={variant ?? "default"}
className={clsx( className={clsx(
"flex items-center justify-center aspect-square w-[40px] h-[40px] border-2 border-white outline outline-1 outline-grey-20", "outline-grey-20 flex aspect-square h-[40px] w-[40px] items-center justify-center border-2 border-white outline outline-1",
className className
)} )}
{...rest} {...rest}
@@ -1,4 +1,4 @@
import React, { FC } from "react" import { FC } from "react"
import IconProps from "./types/icon-type" import IconProps from "./types/icon-type"
const DownloadIcon: FC<IconProps> = (props) => { const DownloadIcon: FC<IconProps> = (props) => {
@@ -1,4 +1,4 @@
import React, { FC } from "react" import { FC } from "react"
import IconProps from "./types/icon-type" import IconProps from "./types/icon-type"
const FileIcon: FC<IconProps> = (props) => { const FileIcon: FC<IconProps> = (props) => {
@@ -44,7 +44,6 @@ const SadFaceIcon: React.FC<IconProps> = ({
strokeLinejoin="round" strokeLinejoin="round"
/> />
</svg> </svg>
) )
} }
@@ -43,7 +43,6 @@ const SidedMouthFaceIcon: React.FC<IconProps> = ({
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
/> />
</svg> </svg>
) )
} }
@@ -2,7 +2,7 @@ import ImagePlaceholderIcon from "./icons/image-placeholder-icon"
const ImagePlaceholder = () => { const ImagePlaceholder = () => {
return ( return (
<div className="flex items-center justify-center w-full h-full rounded-soft bg-grey-5"> <div className="rounded-soft bg-grey-5 flex h-full w-full items-center justify-center">
<ImagePlaceholderIcon size={12} /> <ImagePlaceholderIcon size={12} />
</div> </div>
) )
@@ -25,7 +25,7 @@ const InputContainer: React.FC<InputContainerProps> = ({
} }
}} }}
className={clsx([ className={clsx([
`bg-grey-5 inter-base-regular w-full p-3 flex h-18 flex-col cursor-text border border-grey-20 focus-within:shadow-input focus-within:border-violet-60 rounded-rounded`, `bg-grey-5 inter-base-regular h-18 border-grey-20 focus-within:shadow-input focus-within:border-violet-60 rounded-rounded flex w-full cursor-text flex-col border p-3`,
className, className,
])} ])}
> >
@@ -20,14 +20,14 @@ const InputHeader: React.FC<InputHeaderProps> = ({
return ( return (
<div <div
className={clsx( className={clsx(
"w-full flex inter-small-semibold text-grey-50 items-center", "inter-small-semibold text-grey-50 flex w-full items-center",
className className
)} )}
> >
<label>{label}</label> <label>{label}</label>
{required && <div className="text-rose-50 "> *</div>} {required && <div className="text-rose-50 "> *</div>}
{tooltip || tooltipContent ? ( {tooltip || tooltipContent ? (
<div className="flex ml-1.5"> <div className="ml-1.5 flex">
{tooltip || <IconTooltip content={tooltipContent} />} {tooltip || <IconTooltip content={tooltipContent} />}
</div> </div>
) : null} ) : null}
@@ -32,7 +32,7 @@ const Actionables: React.FC<ActionablesProps> = ({
<Button <Button
variant="ghost" variant="ghost"
size="small" size="small"
className="w-xlarge h-xlarge focus-visible:outline-none focus-visible:shadow-input focus-visible:border-violet-60 focus:shadow-none" className="w-xlarge h-xlarge focus-visible:shadow-input focus-visible:border-violet-60 focus:shadow-none focus-visible:outline-none"
> >
<MoreHorizontalIcon size={20} /> <MoreHorizontalIcon size={20} />
</Button> </Button>
@@ -43,7 +43,7 @@ const Actionables: React.FC<ActionablesProps> = ({
<DropdownMenu.Content <DropdownMenu.Content
sideOffset={5} sideOffset={5}
className="border bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown p-xsmall min-w-[200px] z-30" className="bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown p-xsmall z-30 min-w-[200px] border"
> >
{actions.map((action, i) => { {actions.map((action, i) => {
return ( return (
@@ -52,9 +52,9 @@ const Actionables: React.FC<ActionablesProps> = ({
<Button <Button
variant="ghost" variant="ghost"
size="small" size="small"
className={clsx("w-full justify-start flex", { className={clsx("flex w-full justify-start", {
"text-rose-50": action?.variant === "danger", "text-rose-50": action?.variant === "danger",
"opacity-50 select-none pointer-events-none": "pointer-events-none select-none opacity-50":
action?.disabled, action?.disabled,
})} })}
onClick={action?.onClick} onClick={action?.onClick}
@@ -97,7 +97,7 @@ const Actionables: React.FC<ActionablesProps> = ({
onClick={action.onClick} onClick={action.onClick}
> >
{action.icon ? ( {action.icon ? (
<div className="flex items-center gap-x-2xsmall"> <div className="gap-x-2xsmall flex items-center">
{action.icon} {action.icon}
{action.label} {action.label}
</div> </div>
@@ -1,4 +1,4 @@
import React, { MutableRefObject, ReactNode } from "react" import React, { ReactNode } from "react"
import StatusIndicator from "../../fundamentals/status-indicator" import StatusIndicator from "../../fundamentals/status-indicator"
import Tooltip from "../../atoms/tooltip" import Tooltip from "../../atoms/tooltip"
import clsx from "clsx" import clsx from "clsx"
@@ -16,18 +16,12 @@ export type ActivityCardProps = {
export const ActivityCard: React.FC<ActivityCardProps> = ( export const ActivityCard: React.FC<ActivityCardProps> = (
props: ActivityCardProps props: ActivityCardProps
) => { ) => {
const { const { key, title, icon, relativeTimeElapsed, shouldShowStatus, children } =
key, props
title,
icon,
relativeTimeElapsed,
shouldShowStatus,
children
} = props
const date = !!props.date && new Date(props.date).toLocaleDateString( const date =
"en-us", !!props.date &&
{ new Date(props.date).toLocaleDateString("en-us", {
hour12: true, hour12: true,
day: "2-digit", day: "2-digit",
month: "short", month: "short",
@@ -40,47 +34,33 @@ export const ActivityCard: React.FC<ActivityCardProps> = (
const getTimeElement = () => { const getTimeElement = () => {
return ( return (
<div className="flex cursor-default"> <div className="flex cursor-default">
{ {!!relativeTimeElapsed && <span>{relativeTimeElapsed}</span>}
!!relativeTimeElapsed && ( {shouldShowStatus && (
<span >{relativeTimeElapsed}</span>
)
}
{
shouldShowStatus &&
<StatusIndicator variant={"primary"} className="ml-2" /> <StatusIndicator variant={"primary"} className="ml-2" />
} )}
</div> </div>
) )
} }
return ( return (
<div key={key} className="mx-8 border-b last:border-b-0 border-grey-20"> <div key={key} className="border-grey-20 mx-8 border-b last:border-b-0">
<div className="flex hover:bg-grey-5 -mx-8 px-8 py-6"> <div className="hover:bg-grey-5 -mx-8 flex px-8 py-6">
<div className="relative w-full h-full"> <div className="relative h-full w-full">
<div className="flex justify-between inter-small-semibold text-grey-90"> <div className="inter-small-semibold text-grey-90 flex justify-between">
<div className="flex"> <div className="flex">
{ {!!icon && icon}
!!icon && icon
}
<span>{title}</span> <span>{title}</span>
</div> </div>
{ {(!!relativeTimeElapsed || shouldShowStatus) &&
((!!relativeTimeElapsed || shouldShowStatus)) && ( (formattedDate ? (
formattedDate ? ( <Tooltip content={formattedDate}>{getTimeElement()}</Tooltip>
<Tooltip content={formattedDate}>
{getTimeElement()}
</Tooltip>
) : ( ) : (
getTimeElement() getTimeElement()
) ))}
)
}
</div> </div>
<div className={clsx(!!icon && "pl-8")}> <div className={clsx(!!icon && "pl-8")}>{children}</div>
{children}
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -87,10 +87,10 @@ const AmountAndCurrencyInput = ({
} }
return ( return (
<div className="flex flex-col w-full"> <div className="flex w-full flex-col">
{label && <InputHeader label={label} className="mb-xsmall" />} {label && <InputHeader label={label} className="mb-xsmall" />}
<div className="focus-within:shadow-focus-border rounded-rounded"> <div className="focus-within:shadow-focus-border rounded-rounded">
<div className="relative bg-grey-5 rounded-rounded h-10 shadow-border focus-within:shadow-cta transition-colors"> <div className="bg-grey-5 rounded-rounded shadow-border focus-within:shadow-cta relative h-10 transition-colors">
<NextSelect <NextSelect
customStyles={{ customStyles={{
control: control:
@@ -107,7 +107,7 @@ const AmountAndCurrencyInput = ({
value={value.currency} value={value.currency}
onChange={onCurrencyChange} onChange={onCurrencyChange}
/> />
<div className="absolute left-[92px] inset-y-0 right-0 flex items-center pl-xsmall pr-base inter-base-regular h-10"> <div className="pl-xsmall pr-base inter-base-regular absolute inset-y-0 left-[92px] right-0 flex h-10 items-center">
<AmountField <AmountField
ref={inputRef} ref={inputRef}
step={step} step={step}
@@ -118,9 +118,9 @@ const AmountAndCurrencyInput = ({
allowNegativeValue={false} allowNegativeValue={false}
placeholder="-" placeholder="-"
decimalScale={decimal_digits} decimalScale={decimal_digits}
className="bg-transparent outline-none outline-0 w-full remove-number-spinner leading-base text-grey-90 font-normal caret-violet-60 placeholder-grey-40 text-right" className="remove-number-spinner leading-base text-grey-90 caret-violet-60 placeholder-grey-40 w-full bg-transparent text-right font-normal outline-none outline-0"
/> />
<div className="flex items-center min-w-[16px] ml-2xsmall"> <div className="ml-2xsmall flex min-w-[16px] items-center">
<p className="text-grey-40 w-full text-right">{symbol_native}</p> <p className="text-grey-40 w-full text-right">{symbol_native}</p>
</div> </div>
</div> </div>
@@ -1,5 +1,5 @@
import clsx from "clsx" import clsx from "clsx"
import React, { useEffect, useState } from "react" import { useEffect, useState } from "react"
import AmountField from "react-currency-input-field" import AmountField from "react-currency-input-field"
import { currencies } from "../../../utils/currencies" import { currencies } from "../../../utils/currencies"
import InputError from "../../atoms/input-error" import InputError from "../../atoms/input-error"
@@ -22,9 +22,8 @@ const AmountInput = ({
value, value,
onChange, onChange,
}: Props) => { }: Props) => {
const { symbol_native, decimal_digits } = currencies[ const { symbol_native, decimal_digits } =
currencyCode.toUpperCase() currencies[currencyCode.toUpperCase()]
]
const getFormattedValue = (value: number) => { const getFormattedValue = (value: number) => {
return `${value / 10 ** decimal_digits}` return `${value / 10 ** decimal_digits}`
@@ -57,7 +56,7 @@ const AmountInput = ({
{label && <InputHeader label={label} className="mb-xsmall" />} {label && <InputHeader label={label} className="mb-xsmall" />}
<div <div
className={clsx( className={clsx(
"w-full flex items-center bg-grey-5 border border-gray-20 px-base py-xsmall rounded-rounded h-10 focus-within:shadow-input focus-within:border-violet-60 inter-base-regular", "bg-grey-5 border-gray-20 px-base py-xsmall rounded-rounded focus-within:shadow-input focus-within:border-violet-60 inter-base-regular flex h-10 w-full items-center border",
{ {
"border-rose-50": errors && name && errors[name], "border-rose-50": errors && name && errors[name],
} }
@@ -67,7 +66,7 @@ const AmountInput = ({
<p>{currencyCode.toUpperCase()}</p> <p>{currencyCode.toUpperCase()}</p>
</div> </div>
<div className="flex items-center gap-2xsmall w-full"> <div className="gap-2xsmall flex w-full items-center">
<AmountField <AmountField
step={step} step={step}
value={formattedValue} value={formattedValue}
@@ -77,9 +76,9 @@ const AmountInput = ({
allowNegativeValue={false} allowNegativeValue={false}
placeholder="-" placeholder="-"
decimalScale={decimal_digits} decimalScale={decimal_digits}
className="bg-transparent outline-none outline-0 w-full remove-number-spinner leading-base text-grey-90 font-normal caret-violet-60 placeholder-grey-40 text-right" className="remove-number-spinner leading-base text-grey-90 caret-violet-60 placeholder-grey-40 w-full bg-transparent text-right font-normal outline-none outline-0"
/> />
<div className="flex items-center min-w-[16px] ml-2xsmall"> <div className="ml-2xsmall flex min-w-[16px] items-center">
<p className="text-grey-40 w-full text-right">{symbol_native}</p> <p className="text-grey-40 w-full text-right">{symbol_native}</p>
</div> </div>
</div> </div>
@@ -37,7 +37,7 @@ const AvailabilityDuration: React.FC<AvailabilityDurationProps> = ({
return ( return (
<div> <div>
<div className="grid grid-cols-3 grid-rows-2 gap-x-xsmall gap-y-base mt-xlarge"> <div className="gap-x-xsmall gap-y-base mt-xlarge grid grid-cols-3 grid-rows-2">
<InputField <InputField
label="Years" label="Years"
type="number" type="number"
@@ -19,14 +19,14 @@ const BannerCard: React.FC<BannerCardProps> & {
Footer: React.FC Footer: React.FC
} = ({ title, thumbnail, actions, children }) => { } = ({ title, thumbnail, actions, children }) => {
return ( return (
<div className="rounded-rounded border bg-grey-0 border-grey-20 w-full p-base medium:p-xlarge"> <div className="rounded-rounded bg-grey-0 border-grey-20 p-base medium:p-xlarge w-full border">
<div className="flex gap-large items-start"> <div className="gap-large flex items-start">
{thumbnail && ( {thumbnail && (
<div className="min-w-[72px] min-h-[72px] w-[72px] h-[72px] rounded-base overflow-hidden"> <div className="rounded-base h-[72px] min-h-[72px] w-[72px] min-w-[72px] overflow-hidden">
<img <img
src={thumbnail} src={thumbnail}
alt="Thumbnail" alt="Thumbnail"
className="w-full h-full object-cover" className="h-full w-full object-cover"
/> />
</div> </div>
)} )}
@@ -48,7 +48,7 @@ const Description: React.FC<BannerCardDescriptionProps> = ({
}) => { }) => {
return ( return (
<div> <div>
<p className="inter-small-regular text-grey-50 max-w-[460px] line-clamp-2"> <p className="inter-small-regular text-grey-50 line-clamp-2 max-w-[460px]">
{children} {children}
</p> </p>
{cta && ( {cta && (
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react" import { ReactNode } from "react"
type Props = { type Props = {
fileName: string fileName: string
@@ -8,31 +8,27 @@ type Props = {
} }
const BatchJobFileCard = ({ fileName, fileSize, icon, onClick }: Props) => { const BatchJobFileCard = ({ fileName, fileSize, icon, onClick }: Props) => {
const preparedOnClick = (onClick ?? (() => void 0)) const preparedOnClick = onClick ?? (() => void 0)
return ( return (
<div <div
className="flex items-center w-full cursor-pointer mt-4" className="mt-4 flex w-full cursor-pointer items-center"
onClick={preparedOnClick} onClick={preparedOnClick}
> >
<div <div
className="flex items-center justify-center p-2.5 border border-grey-20 rounded-lg" className="border-grey-20 flex items-center justify-center rounded-lg border p-2.5"
title={fileName} title={fileName}
> >
{!!icon && icon} {!!icon && icon}
</div> </div>
<div className="text-left relative w-full pl-4"> <div className="relative w-full pl-4 text-left">
<div <div className="inter-small-regular max-w-[80%] overflow-hidden truncate">
className="overflow-hidden truncate inter-small-regular max-w-[80%]"
>
{fileName} {fileName}
</div> </div>
{!!fileSize && ( {!!fileSize && (
<div className="text-grey-40 inter-small-regular"> <div className="text-grey-40 inter-small-regular">{fileSize}</div>
{fileSize}
</div>
)} )}
</div> </div>
</div> </div>
@@ -20,7 +20,7 @@ const Breadcrumb: React.FC<BreadcrumbProps> = ({
return ( return (
<div <div
className={clsx( className={clsx(
"w-full flex items-center inter-small-semibold text-grey-50 mb-4", "inter-small-semibold text-grey-50 mb-4 flex w-full items-center",
className className
)} )}
{...props} {...props}
@@ -22,9 +22,8 @@ type TCollapsibleTreeContext = {
toggle: () => void toggle: () => void
} }
const CollapsibleTreeContext = React.createContext<TCollapsibleTreeContext | null>( const CollapsibleTreeContext =
null React.createContext<TCollapsibleTreeContext | null>(null)
)
export const CollapsibleTree: CollapsibleTreeType = ({ children }) => { export const CollapsibleTree: CollapsibleTreeType = ({ children }) => {
const [open, setOpen] = React.useState(false) const [open, setOpen] = React.useState(false)
@@ -66,7 +65,7 @@ const CollapsibleTreeContent: React.FC<CollapsibleTreeContentProps> = ({
return ( return (
<div <div
className={clsx( className={clsx(
"pl-5 mt-xsmall", "mt-xsmall pl-5",
{ {
hidden: !open, hidden: !open,
"animate-fade-in-top": open, "animate-fade-in-top": open,
@@ -100,15 +99,15 @@ const CollapsibleTreeParent: React.FC<CollapsibleTreeParentProps> = ({
<Container className={className}> <Container className={className}>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div className="gap-x-small flex items-center">{children}</div> <div className="gap-x-small flex items-center">{children}</div>
<div className="flex items-center gap-x-xsmall"> <div className="gap-x-xsmall flex items-center">
{actions && ( {actions && (
<Actionables customTrigger={Trigger()} actions={actions} /> <Actionables customTrigger={Trigger()} actions={actions} />
)} )}
<div className="h-5 w-px rounded-circle bg-grey-20" /> <div className="rounded-circle bg-grey-20 h-5 w-px" />
<Button <Button
variant="ghost" variant="ghost"
size="small" size="small"
className="p-[6px] text-grey-50" className="text-grey-50 p-[6px]"
onClick={toggle} onClick={toggle}
> >
{open ? <MinusIcon size={20} /> : <PlusIcon size={20} />} {open ? <MinusIcon size={20} /> : <PlusIcon size={20} />}
@@ -137,16 +136,16 @@ const CollapsibleTreeLeaf: React.FC<CollapsibleTreeLeafProps> = ({
return ( return (
<div <div
className={clsx( className={clsx(
"col-tree flex items-center relative pb-xsmall last:pb-0", "col-tree pb-xsmall relative flex items-center last:pb-0",
className className
)} )}
> >
<div className="absolute top-0 left-0 bottom-0"> <div className="absolute top-0 left-0 bottom-0">
<div className="border-l border-dashed border-grey-20 h-1/2 w-px" /> <div className="border-grey-20 h-1/2 w-px border-l border-dashed" />
<div className="h-1/2 border-l border-dashed border-grey-20 w-px bottom-half-dash" /> <div className="border-grey-20 bottom-half-dash h-1/2 w-px border-l border-dashed" />
</div> </div>
<div className="w-[13px] h-px border-t border-grey-20 border-dashed mr-xsmall" /> <div className="border-grey-20 mr-xsmall h-px w-[13px] border-t border-dashed" />
<Container className="w-full flex items-center justify-between inter-small-regular"> <Container className="inter-small-regular flex w-full items-center justify-between">
{children} {children}
{actions && ( {actions && (
<Actionables <Actionables
@@ -169,7 +168,7 @@ const Container: React.FC<{ className?: string }> = ({
return ( return (
<div <div
className={clsx( className={clsx(
"rounded-rounded border border-grey-20 py-2xsmall px-small", "rounded-rounded border-grey-20 py-2xsmall px-small border",
className className
)} )}
> >
@@ -180,7 +179,7 @@ const Container: React.FC<{ className?: string }> = ({
const Trigger = () => { const Trigger = () => {
return ( return (
<Button variant="ghost" size="small" className="p-[6px] text-grey-50"> <Button variant="ghost" size="small" className="text-grey-50 p-[6px]">
<MoreHorizontalIcon size={20} /> <MoreHorizontalIcon size={20} />
</Button> </Button>
) )
@@ -22,11 +22,11 @@ const CustomerAvatarItem: React.FC<CustomerAvatarItemProps> = ({
: "-" : "-"
return ( return (
<div className="flex items-center py-1.5 w-full"> <div className="flex w-full items-center py-1.5">
<div className="w-[24px] h-[24px]"> <div className="h-[24px] w-[24px]">
<Avatar user={customer} color={color} /> <Avatar user={customer} color={color} />
</div> </div>
<span className="pl-2.5 w-40 truncate">{identifier}</span> <span className="w-40 truncate pl-2.5">{identifier}</span>
</div> </div>
) )
} }
@@ -16,7 +16,7 @@ const EmojiPicker: React.FC<indexProps> = ({ onEmojiClick }) => {
variant="ghost" variant="ghost"
size="small" size="small"
type="button" type="button"
className="focus:border-none focus:shadow-none text-grey-40 hover:text-violet-60 p-0 h-5 w-5" className="text-grey-40 hover:text-violet-60 h-5 w-5 p-0 focus:border-none focus:shadow-none"
> >
<HappyIcon size={20} /> <HappyIcon size={20} />
</Button> </Button>
@@ -24,7 +24,7 @@ const EmojiPicker: React.FC<indexProps> = ({ onEmojiClick }) => {
<DropdownMenu.Content <DropdownMenu.Content
sideOffset={5} sideOffset={5}
className="border bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown overflow-hidden min-w-[200px] z-30" className="bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown z-30 min-w-[200px] overflow-hidden border"
> >
<Picker <Picker
onEmojiClick={(emojiData) => onEmojiClick(emojiData.emoji)} onEmojiClick={(emojiData) => onEmojiClick(emojiData.emoji)}
@@ -52,13 +52,13 @@ const FilterDropdownContainer = ({
<RadixPopover.Content <RadixPopover.Content
sideOffset={8} sideOffset={8}
style={heightStyle} style={heightStyle}
className="bg-grey-0 overflow-y-auto rounded-rounded shadow-dropdown max-w-[272px] py-4 z-40" className="bg-grey-0 rounded-rounded shadow-dropdown z-40 max-w-[272px] overflow-y-auto py-4"
> >
<div className="flex px-4 pb-4 border-b border-grey-20"> <div className="border-grey-20 flex border-b px-4 pb-4">
<Button <Button
size="small" size="small"
tabIndex={-1} tabIndex={-1}
className="mr-2 border border-grey-20" className="border-grey-20 mr-2 border"
variant="ghost" variant="ghost"
onClick={() => onClear()} onClick={() => onClear()}
> >
@@ -76,7 +76,7 @@ const FilterDropdownContainer = ({
</div> </div>
{React.Children.map(children, (child) => { {React.Children.map(children, (child) => {
return ( return (
<div className="border-b border-grey-20 py-2 px-4 last:pb-0 last:border-0"> <div className="border-grey-20 border-b py-2 px-4 last:border-0 last:pb-0">
{child} {child}
</div> </div>
) )
@@ -96,7 +96,7 @@ const FilterDropdownItem = ({
> >
<RadixCollapsible.Trigger <RadixCollapsible.Trigger
className={clsx( className={clsx(
"py-1.5 px-3 flex w-full items-center hover:bg-grey-5 rounded justify-between", "hover:bg-grey-5 flex w-full items-center justify-between rounded py-1.5 px-3",
{ {
"inter-small-semibold": open, "inter-small-semibold": open,
"inter-small-regular": !open, "inter-small-regular": !open,
@@ -105,7 +105,7 @@ const FilterDropdownItem = ({
> >
<div className="flex items-center"> <div className="flex items-center">
<div <div
className={`w-5 h-5 flex justify-center text-grey-0 border-grey-30 border rounded-base ${ className={`text-grey-0 border-grey-30 rounded-base flex h-5 w-5 justify-center border ${
open && "bg-violet-60" open && "bg-violet-60"
}`} }`}
> >
@@ -130,17 +130,17 @@ const FilterDropdownItem = ({
</RadixCollapsible.Trigger> </RadixCollapsible.Trigger>
<RadixCollapsible.Content className="w-full"> <RadixCollapsible.Content className="w-full">
{hasPrev && ( {hasPrev && (
<div className="py-2 pl-6 flex"> <div className="flex py-2 pl-6">
<button <button
onClick={handlePrev} onClick={handlePrev}
className="font-semibold hover:text-violet-60 text-grey-90" className="hover:text-violet-60 text-grey-90 font-semibold"
> >
Back Back
</button> </button>
</div> </div>
)} )}
{isLoading ? ( {isLoading ? (
<div className="py-1 flex justify-center items-center"> <div className="flex items-center justify-center py-1">
<Spinner size={"large"} variant={"secondary"} /> <Spinner size={"large"} variant={"secondary"} />
</div> </div>
) : filterTitle === "Date" ? ( ) : filterTitle === "Date" ? (
@@ -167,7 +167,7 @@ const FilterDropdownItem = ({
return ( return (
<div <div
className={clsx( className={clsx(
"w-full flex hover:bg-grey-20 my-1 py-1.5 pl-6 items-center rounded", "hover:bg-grey-20 my-1 flex w-full items-center rounded py-1.5 pl-6",
{ {
"inter-small-semibold": checked[value], "inter-small-semibold": checked[value],
"inter-small-regular": !checked[value], "inter-small-regular": !checked[value],
@@ -177,7 +177,7 @@ const FilterDropdownItem = ({
onClick={() => onCheck(value)} onClick={() => onCheck(value)}
> >
<div <div
className={`w-5 h-5 flex justify-center text-grey-0 border-grey-30 border mr-2 rounded-base ${ className={`text-grey-0 border-grey-30 rounded-base mr-2 flex h-5 w-5 justify-center border ${
checked[value] === true && "bg-violet-60" checked[value] === true && "bg-violet-60"
}`} }`}
> >
@@ -201,10 +201,10 @@ const FilterDropdownItem = ({
}) })
)} )}
{hasMore && ( {hasMore && (
<div className="py-2 pl-6 flex"> <div className="flex py-2 pl-6">
<button <button
onClick={handleNext} onClick={handleNext}
className="font-semibold hover:text-violet-60 text-grey-90" className="hover:text-violet-60 text-grey-90 font-semibold"
> >
Show more Show more
</button> </button>
@@ -417,7 +417,7 @@ const DateFilter = ({
case DateFilters.InTheLast: case DateFilters.InTheLast:
case DateFilters.OlderThan: case DateFilters.OlderThan:
return ( return (
<div className="flex flex-col w-full"> <div className="flex w-full flex-col">
<InputField <InputField
className="pt-0 pb-1" className="pt-0 pb-1"
type="number" type="number"
@@ -429,7 +429,7 @@ const DateFilter = ({
/> />
<RightPopover <RightPopover
trigger={ trigger={
<div className="flex w-full items-center justify-between bg-grey-5 border border-grey-20 rounded inter-small-semibold text-grey-90 px-3 py-1.5"> <div className="bg-grey-5 border-grey-20 inter-small-semibold text-grey-90 flex w-full items-center justify-between rounded border px-3 py-1.5">
<label>{daysMonthsValue}</label> <label>{daysMonthsValue}</label>
<span className="text-grey-50"> <span className="text-grey-50">
<ArrowRightIcon size={16} /> <ArrowRightIcon size={16} />
@@ -449,10 +449,10 @@ const DateFilter = ({
case DateFilters.After: case DateFilters.After:
case DateFilters.Before: case DateFilters.Before:
return ( return (
<div className="flex flex-col w-full"> <div className="flex w-full flex-col">
<RightPopover <RightPopover
trigger={ trigger={
<div className="flex w-full items-center justify-between bg-grey-5 border border-grey-20 rounded inter-small-semibold text-grey-90 px-3 py-1.5"> <div className="bg-grey-5 border-grey-20 inter-small-semibold text-grey-90 flex w-full items-center justify-between rounded border px-3 py-1.5">
<label> <label>
{startDate ? moment(startDate).format("MM.DD.YYYY") : "-"} {startDate ? moment(startDate).format("MM.DD.YYYY") : "-"}
</label> </label>
@@ -477,7 +477,7 @@ const DateFilter = ({
<div className="pl-9"> <div className="pl-9">
<RightPopover <RightPopover
trigger={ trigger={
<div className="flex w-full items-center justify-between bg-grey-5 border border-grey-20 rounded inter-small-semibold text-grey-90 px-3 py-1.5"> <div className="bg-grey-5 border-grey-20 inter-small-semibold text-grey-90 flex w-full items-center justify-between rounded border px-3 py-1.5">
<label>{currentFilter}</label> <label>{currentFilter}</label>
<span className="text-grey-50"> <span className="text-grey-50">
<ArrowRightIcon size={16} /> <ArrowRightIcon size={16} />
@@ -506,7 +506,7 @@ const PopoverOptions = ({ options, onClick, selectedItem }) => {
onClick(item) onClick(item)
}} }}
className={clsx( className={clsx(
"px-3 py-1.5 my-1 flex items-center rounded hover:bg-grey-5 cursor-pointer", "hover:bg-grey-5 my-1 flex cursor-pointer items-center rounded px-3 py-1.5",
{ {
"inter-small-semibold": item === selectedItem, "inter-small-semibold": item === selectedItem,
"inter-small-regular": item !== selectedItem, "inter-small-regular": item !== selectedItem,
@@ -515,15 +515,15 @@ const PopoverOptions = ({ options, onClick, selectedItem }) => {
> >
<div <div
className={clsx( className={clsx(
"rounded-full flex items-center justify-center mr-2 w-4 h-4", "mr-2 flex h-4 w-4 items-center justify-center rounded-full",
{ {
"border-2 border-violet-60": item === selectedItem, "border-violet-60 border-2": item === selectedItem,
"border border-grey-30 ": item !== selectedItem, "border-grey-30 border ": item !== selectedItem,
} }
)} )}
> >
{item === selectedItem && ( {item === selectedItem && (
<div className="rounded-full w-2 h-2 bg-violet-60" /> <div className="bg-violet-60 h-2 w-2 rounded-full" />
)} )}
</div> </div>
{item} {item}
@@ -535,7 +535,7 @@ const PopoverOptions = ({ options, onClick, selectedItem }) => {
const RightPopover = ({ trigger, children }) => ( const RightPopover = ({ trigger, children }) => (
<RadixPopover.Root> <RadixPopover.Root>
<RadixPopover.Trigger className="w-full my-1"> <RadixPopover.Trigger className="my-1 w-full">
{trigger} {trigger}
</RadixPopover.Trigger> </RadixPopover.Trigger>
<RadixPopover.Content <RadixPopover.Content
@@ -543,7 +543,7 @@ const RightPopover = ({ trigger, children }) => (
align="start" align="start"
alignOffset={-8} alignOffset={-8}
sideOffset={20} sideOffset={20}
className="flex flex-col bg-grey-0 rounded-rounded shadow-dropdown p-2 top-2/4" className="bg-grey-0 rounded-rounded shadow-dropdown top-2/4 flex flex-col p-2"
> >
{children} {children}
</RadixPopover.Content> </RadixPopover.Content>
@@ -25,13 +25,13 @@ const SaveFilterItem: React.FC<SaveFilterItemProps> = ({
return ( return (
<div className="mt-2 flex w-full"> <div className="mt-2 flex w-full">
<InputField <InputField
className="pt-0 pb-1 max-w-[172px]" className="max-w-[172px] pt-0 pb-1"
placeholder="Name your filter..." placeholder="Name your filter..."
onChange={(e) => setName(e.target.value)} onChange={(e) => setName(e.target.value)}
value={name} value={name}
/> />
<Button <Button
className="border ml-2 border-grey-20" className="border-grey-20 ml-2 border"
variant="ghost" variant="ghost"
size="small" size="small"
onClick={onSave} onClick={onSave}
@@ -43,7 +43,7 @@ export const FilterTab: React.FC<FilterTabProps> = ({
onKeyUp={handleKeyPress} onKeyUp={handleKeyPress}
onClick={handleClick} onClick={handleClick}
className={clsx( className={clsx(
"flex items-center bg-grey-5 border border-grey-20 inter-small-regular px-2 h-6 text-grey-50 rounded-rounded focus-visible:outline-none focus-visible:shadow-input focus-visible:border-violet-60 flex items-center space-x-1", "bg-grey-5 border-grey-20 inter-small-regular text-grey-50 rounded-rounded focus-visible:shadow-input focus-visible:border-violet-60 flex flex h-6 items-center items-center space-x-1 border px-2 focus-visible:outline-none",
{ {
["bg-violet-5 border-violet-60 text-violet-60 "]: isActive, ["bg-violet-5 border-violet-60 text-violet-60 "]: isActive,
} }
@@ -24,7 +24,7 @@ const FormErrorToaster: React.FC<FormErrorToasterProps> = ({
<div> <div>
<XCircleIcon size={20} className="text-rose-40" /> <XCircleIcon size={20} className="text-rose-40" />
</div> </div>
<div className="flex flex-col ml-small mr-base gap-y-2xsmall flex-grow text-grey-0"> <div className="ml-small mr-base gap-y-2xsmall text-grey-0 flex flex-grow flex-col">
<span className="inter-small-semibold">{title}</span> <span className="inter-small-semibold">{title}</span>
<span className="inter-small-regular text-grey-20">{message}</span> <span className="inter-small-regular text-grey-20">{message}</span>
</div> </div>
@@ -39,7 +39,7 @@ const FormToasterContainer: React.FC<FormToasterContainerProps> & {
const content = useMemo(() => { const content = useMemo(() => {
if (isLoading) { if (isLoading) {
return ( return (
<div className="flex items-center p-base gap-x-base"> <div className="p-base gap-x-base flex items-center">
<span> <span>
<Spinner /> <Spinner />
</span> </span>
@@ -49,7 +49,7 @@ const FormToasterContainer: React.FC<FormToasterContainerProps> & {
} else { } else {
return ( return (
<> <>
<div className="flex items-center p-base gap-x-base"> <div className="p-base gap-x-base flex items-center">
<span>{icon}</span> <span>{icon}</span>
<span className="inter-small-regular">{unsavedChangesMessage}</span> <span className="inter-small-regular">{unsavedChangesMessage}</span>
</div> </div>
@@ -67,7 +67,7 @@ const FormToasterContainer: React.FC<FormToasterContainerProps> & {
})} })}
{...toast?.ariaProps} {...toast?.ariaProps}
> >
<div className="flex items-center rounded-rounded bg-grey-90 h-[72px] w-[344px] text-grey-0 justify-between"> <div className="rounded-rounded bg-grey-90 text-grey-0 flex h-[72px] w-[344px] items-center justify-between">
{content} {content}
</div> </div>
</div> </div>
@@ -76,10 +76,10 @@ const FormToasterContainer: React.FC<FormToasterContainerProps> & {
const Actions: React.FC = ({ children }) => { const Actions: React.FC = ({ children }) => {
return ( return (
<div className="border-l border-grey-70 h-full"> <div className="border-grey-70 h-full border-l">
{Children.map(children, (child) => { {Children.map(children, (child) => {
return ( return (
<div className="flex items-center justify-center border-b border-grey-70 last:border-none h-1/2 w-[72px]"> <div className="border-grey-70 flex h-1/2 w-[72px] items-center justify-center border-b last:border-none">
{child} {child}
</div> </div>
) )
@@ -96,7 +96,7 @@ const DiscardButton: React.FC<HTMLAttributes<HTMLButtonElement>> = ({
return ( return (
<button <button
className={clsx( className={clsx(
"flex items-center justify-center text-white inter-small-semibold h-full w-full", "inter-small-semibold flex h-full w-full items-center justify-center text-white",
className className
)} )}
{...props} {...props}
@@ -114,7 +114,7 @@ const ActionButton: React.FC<HTMLAttributes<HTMLButtonElement>> = ({
return ( return (
<button <button
className={clsx( className={clsx(
"flex items-center justify-center text-white inter-small-semibold h-full w-full", "inter-small-semibold flex h-full w-full items-center justify-center text-white",
className className
)} )}
{...props} {...props}
@@ -133,7 +133,7 @@ const MultiActionButton: React.FC<MultiActionButtonProps> = ({
<Dropdown.Root> <Dropdown.Root>
<Dropdown.Trigger <Dropdown.Trigger
className={clsx( className={clsx(
"inter-small-semibold flex items-center justify-center h-full w-full", "inter-small-semibold flex h-full w-full items-center justify-center",
className className
)} )}
> >
@@ -142,7 +142,7 @@ const MultiActionButton: React.FC<MultiActionButtonProps> = ({
</Dropdown.Trigger> </Dropdown.Trigger>
<Dropdown.Content <Dropdown.Content
className="rounded-rounded flex bg-grey-90 text-white p-xsmall flex-col min-w-[208px]" className="rounded-rounded bg-grey-90 p-xsmall flex min-w-[208px] flex-col text-white"
sideOffset={10} sideOffset={10}
> >
{actions.map((action, i) => { {actions.map((action, i) => {
@@ -150,7 +150,7 @@ const MultiActionButton: React.FC<MultiActionButtonProps> = ({
<Dropdown.Item key={i}> <Dropdown.Item key={i}>
<button <button
onClick={action.onClick} onClick={action.onClick}
className="p-2xsmall hover:bg-grey-80 hover:outline-none inter-small-semibold rounded-base text-left flex items-center w-full" className="p-2xsmall hover:bg-grey-80 inter-small-semibold rounded-base flex w-full items-center text-left hover:outline-none"
> >
{action.icon && ( {action.icon && (
<span className="text-grey-0 mr-xsmall"> <span className="text-grey-0 mr-xsmall">
@@ -71,7 +71,7 @@ const GeneratingInput = React.forwardRef(
ref={inputRef} ref={inputRef}
value={value} value={value}
onChange={handleChange} onChange={handleChange}
className="bg-inherit outline-none outline-0 w-full remove-number-spinner leading-base text-grey-90 font-normal caret-violet-60 placeholder-grey-40" className="remove-number-spinner leading-base text-grey-90 caret-violet-60 placeholder-grey-40 w-full bg-inherit font-normal outline-none outline-0"
placeholder={placeholder} placeholder={placeholder}
autoComplete="off" autoComplete="off"
name={name} name={name}
@@ -5,7 +5,7 @@ type GridInputProps = React.InputHTMLAttributes<HTMLInputElement>
const GridInput: React.FC<GridInputProps> = ({ value, ...props }) => { const GridInput: React.FC<GridInputProps> = ({ value, ...props }) => {
return ( return (
<input <input
className="outline-none outline-0 leading-base bg-transparent py-4 px-2 w-full h-full border rounded-rounded border-transparent inter-small-regular placeholder:text-grey-40 focus-within:shadow-input focus-within:border focus-within:border-violet-60" className="leading-base rounded-rounded inter-small-regular placeholder:text-grey-40 focus-within:shadow-input focus-within:border-violet-60 h-full w-full border border-transparent bg-transparent py-4 px-2 outline-none outline-0 focus-within:border"
value={value} value={value}
{...props} {...props}
/> />
@@ -13,7 +13,7 @@ const HotKeyAction = ({ label, hotKey, icon, onAction }: HotKeyActionProps) => {
return ( return (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span className="text-grey-0 inter-small-semibold">{label}</span> <span className="text-grey-0 inter-small-semibold">{label}</span>
<div className="inter-small-semibold text-grey-30 flex items-center justify-center w-[24px] h-[24px] rounded bg-grey-70"> <div className="inter-small-semibold text-grey-30 bg-grey-70 flex h-[24px] w-[24px] items-center justify-center rounded">
{icon} {icon}
</div> </div>
</div> </div>
@@ -18,11 +18,11 @@ const IconTooltip: React.FC<IconTooltipProps> = ({
const icon = (type: IconTooltipProps["type"]) => { const icon = (type: IconTooltipProps["type"]) => {
switch (type) { switch (type) {
case "warning": case "warning":
return <AlertIcon size={size} className="flex text-orange-40" /> return <AlertIcon size={size} className="text-orange-40 flex" />
case "error": case "error":
return <XCircleIcon size={size} className="flex text-rose-40" /> return <XCircleIcon size={size} className="text-rose-40 flex" />
default: default:
return <InfoIcon size={size} className="flex text-grey-40" /> return <InfoIcon size={size} className="text-grey-40 flex" />
} }
} }
@@ -56,7 +56,7 @@ const IndeterminateCheckbox = React.forwardRef<
<div className="flex h-full items-center"> <div className="flex h-full items-center">
<div <div
onClick={handleClick} onClick={handleClick}
className={`flex h-5 w-5 cursor-pointer justify-center rounded-base border border-grey-30 text-grey-0 ${ className={`rounded-base border-grey-30 text-grey-0 flex h-5 w-5 cursor-pointer justify-center border ${
rest.disabled rest.disabled
? checked ? checked
? "bg-gray-300" ? "bg-gray-300"
@@ -52,12 +52,12 @@ const SigninInput = React.forwardRef(
return ( return (
<div <div
className={clsx( className={clsx(
"w-[320px] h-[48px] mb-xsmall last:mb-0 border rounded-rounded overflow-hidden", "mb-xsmall rounded-rounded h-[48px] w-[320px] overflow-hidden border last:mb-0",
"bg-grey-5 inter-base-regular placeholder:text-grey-40", "bg-grey-5 inter-base-regular placeholder:text-grey-40",
"focus-within:shadow-input focus-within:border-violet-60", "focus-within:shadow-input focus-within:border-violet-60",
"flex items-center", "flex items-center",
{ {
"pointer-events-none focus-within:shadow-none focus-within:border-none text-grey-40": "text-grey-40 pointer-events-none focus-within:border-none focus-within:shadow-none":
props.readOnly, props.readOnly,
}, },
className className
@@ -68,7 +68,7 @@ const SigninInput = React.forwardRef(
)} )}
<input <input
className={clsx( className={clsx(
"outline-none outline-0 remove-number-spinner leading-base bg-transparent w-full py-3 px-4", "remove-number-spinner leading-base w-full bg-transparent py-3 px-4 outline-none outline-0",
{ {
"pl-xsmall": props.readOnly, "pl-xsmall": props.readOnly,
} }
@@ -86,7 +86,7 @@ const SigninInput = React.forwardRef(
<button <button
type="button" type="button"
onClick={() => setShowPassword(!showPassword)} onClick={() => setShowPassword(!showPassword)}
className="text-grey-40 px-4 focus:outline-none focus:text-violet-60" className="text-grey-40 focus:text-violet-60 px-4 focus:outline-none"
> >
{showPassword ? <EyeIcon /> : <EyeOffIcon />} {showPassword ? <EyeIcon /> : <EyeOffIcon />}
</button> </button>
@@ -29,8 +29,8 @@ const JSONView = ({ data }: JSONViewProps) => {
<div className="px-base py-xsmall rounded-rounded bg-grey-5 w-full"> <div className="px-base py-xsmall rounded-rounded bg-grey-5 w-full">
<Collapsible.Root open={expanded} onOpenChange={setExpanded}> <Collapsible.Root open={expanded} onOpenChange={setExpanded}>
<Collapsible.Trigger asChild> <Collapsible.Trigger asChild>
<div className="flex items-center justify-between cursor-pointer"> <div className="flex cursor-pointer items-center justify-between">
<div className="flex items-center gap-x-xsmall inter-base-regular"> <div className="gap-x-xsmall inter-base-regular flex items-center">
<p className="inter-base-semibold"> <p className="inter-base-semibold">
{expanded ? "{" : length > 0 ? "{ ... }" : "{}"} {expanded ? "{" : length > 0 ? "{ ... }" : "{}"}
</p> </p>
@@ -66,9 +66,9 @@ const JSONView = ({ data }: JSONViewProps) => {
shouldExpandNode={() => false} shouldExpandNode={() => false}
/> />
</div> </div>
<div className="flex items-center justify-between w-full"> <div className="flex w-full items-center justify-between">
{expanded && <p className="inter-base-semibold">{`}`}</p>} {expanded && <p className="inter-base-semibold">{`}`}</p>}
<div className="flex items-center gap-x-xsmall text-grey-50 inter-small-regular"> <div className="gap-x-xsmall text-grey-50 inter-small-regular flex items-center">
{isCopied && ( {isCopied && (
<span className="animate-fade-in-right">Copied!</span> <span className="animate-fade-in-right">Copied!</span>
)} )}
@@ -26,7 +26,7 @@ type BasicFocusModalProps = {
const FocusModal: IFocusModal = ({ className, children }) => ( const FocusModal: IFocusModal = ({ className, children }) => (
<div <div
className={clsx( className={clsx(
"absolute inset-0 bg-grey-0 z-50 flex flex-col items-center", "bg-grey-0 absolute inset-0 z-50 flex flex-col items-center",
className className
)} )}
> >
@@ -37,7 +37,7 @@ const FocusModal: IFocusModal = ({ className, children }) => (
FocusModal.Header = ({ children, className }) => ( FocusModal.Header = ({ children, className }) => (
<div <div
className={clsx( className={clsx(
"w-full border-b py-4 border-b-grey-20 flex justify-center", "border-b-grey-20 flex w-full justify-center border-b py-4",
className className
)} )}
> >
@@ -46,7 +46,7 @@ FocusModal.Header = ({ children, className }) => (
) )
FocusModal.Main = ({ children, className }) => ( FocusModal.Main = ({ children, className }) => (
<div className={clsx("w-full px-8 overflow-y-auto h-full", className)}> <div className={clsx("h-full w-full overflow-y-auto px-8", className)}>
{children} {children}
</div> </div>
) )
@@ -79,12 +79,12 @@ const BasicFocusModalHeader: React.FC<BasicFocusModalProps> = ({
}) => { }) => {
return ( return (
<FocusModal.Header> <FocusModal.Header>
<div className="medium:w-8/12 w-full px-8 flex justify-between"> <div className="medium:w-8/12 flex w-full justify-between px-8">
<Button <Button
size="small" size="small"
variant="ghost" variant="ghost"
onClick={handleClose} onClick={handleClose}
className="border rounded-rounded w-8 h-8" className="rounded-rounded h-8 w-8 border"
> >
<CrossIcon size={20} /> <CrossIcon size={20} />
</Button> </Button>
@@ -93,7 +93,7 @@ const BasicFocusModalHeader: React.FC<BasicFocusModalProps> = ({
onClick={handleClose} onClick={handleClose}
size="small" size="small"
variant="ghost" variant="ghost"
className="border rounded-rounded" className="rounded-rounded border"
> >
{cancelText || "Cancel"} {cancelText || "Cancel"}
</Button> </Button>
@@ -43,7 +43,7 @@ type ModalType = React.FC<ModalProps> & {
const Overlay: React.FC<React.PropsWithChildren> = ({ children }) => { const Overlay: React.FC<React.PropsWithChildren> = ({ children }) => {
return ( return (
<Dialog.Overlay className="fixed top-0 bottom-0 left-0 right-0 z-50 grid overflow-y-auto bg-grey-90/40 place-items-center"> <Dialog.Overlay className="bg-grey-90/40 fixed top-0 bottom-0 left-0 right-0 z-50 grid place-items-center overflow-y-auto">
{children} {children}
</Dialog.Overlay> </Dialog.Overlay>
) )
@@ -57,7 +57,7 @@ const Content: React.FC<React.PropsWithChildren> = ({ children }) => {
return ( return (
<Dialog.Content <Dialog.Content
style={style} style={style}
className="overflow-x-hidden min-w-modal rounded-rounded bg-grey-0" className="min-w-modal rounded-rounded bg-grey-0 overflow-x-hidden"
> >
{children} {children}
</Dialog.Content> </Dialog.Content>
@@ -125,7 +125,7 @@ Modal.Content = ({ children, className }) => {
Modal.Header = ({ handleClose = undefined, children }) => { Modal.Header = ({ handleClose = undefined, children }) => {
return ( return (
<div <div
className="flex items-center w-full px-8 py-6 border-b" className="flex w-full items-center border-b px-8 py-6"
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
> >
<div className="flex flex-grow">{children}</div> <div className="flex flex-grow">{children}</div>
@@ -112,13 +112,13 @@ const LayeredModal: React.FC<LayeredModalProps> = ({
<Button <Button
variant="ghost" variant="ghost"
size="small" size="small"
className="w-8 h-8 border text-grey-50" className="text-grey-50 h-8 w-8 border"
onClick={screen.onBack} onClick={screen.onBack}
> >
<UTurnIcon size={20} /> <UTurnIcon size={20} />
</Button> </Button>
<div className="flex items-center gap-x-2xsmall"> <div className="gap-x-2xsmall flex items-center">
<h2 className="ml-4 inter-xlarge-semibold">{screen.title}</h2> <h2 className="inter-xlarge-semibold ml-4">{screen.title}</h2>
{screen.subtitle && ( {screen.subtitle && (
<span className="inter-xlarge-regular text-grey-50"> <span className="inter-xlarge-regular text-grey-50">
({screen.subtitle}) ({screen.subtitle})
@@ -139,7 +139,7 @@ const SteppedModal: React.FC<SteppedProps> = ({
> >
<Modal.Body <Modal.Body
className={clsx( className={clsx(
"transition-transform flex flex-col justify-between duration-100 max-h-full" "flex max-h-full flex-col justify-between transition-transform duration-100"
)} )}
> >
<Modal.Header handleClose={resetAndClose}> <Modal.Header handleClose={resetAndClose}>
@@ -149,20 +149,20 @@ const SteppedModal: React.FC<SteppedProps> = ({
(lastScreenIsSummary && (lastScreenIsSummary &&
context.currentStep !== steps.length - 1 && ( context.currentStep !== steps.length - 1 && (
<div className="flex items-center"> <div className="flex items-center">
<span className="text-grey-50 inter-small-regular w-[70px] mr-4">{`Step ${ <span className="text-grey-50 inter-small-regular mr-4 w-[70px]">{`Step ${
context.currentStep + 1 context.currentStep + 1
} of ${steps.length}`}</span> } of ${steps.length}`}</span>
{steps.map((_, i) => ( {steps.map((_, i) => (
<span <span
key={i} key={i}
className={clsx( className={clsx(
"w-2 h-2 rounded-full mr-3", "mr-3 h-2 w-2 rounded-full",
{ {
"bg-grey-20": i > context.currentStep, "bg-grey-20": i > context.currentStep,
"bg-violet-60": context.currentStep >= i, "bg-violet-60": context.currentStep >= i,
}, },
{ {
"outline-4 outline outline-violet-20": "outline-violet-20 outline outline-4":
context.currentStep === i, context.currentStep === i,
} }
)} )}
@@ -175,7 +175,7 @@ const SteppedModal: React.FC<SteppedProps> = ({
<Modal.Content>{steps[context.currentStep]}</Modal.Content> <Modal.Content>{steps[context.currentStep]}</Modal.Content>
</Modal.Body> </Modal.Body>
<Modal.Footer> <Modal.Footer>
<div className="flex justify-end w-full gap-x-xsmall"> <div className="gap-x-xsmall flex w-full justify-end">
<Button <Button
variant="ghost" variant="ghost"
size="small" size="small"
@@ -23,7 +23,7 @@ const NativeSelect: NativeSelectType = ({
return ( return (
<RadixSelect.Root {...props}> <RadixSelect.Root {...props}>
<RadixSelect.SelectTrigger <RadixSelect.SelectTrigger
className="flex items-center inter-base-semibold gap-3 px-2" className="inter-base-semibold flex items-center gap-3 px-2"
{...triggerProps} {...triggerProps}
> >
<RadixSelect.Value /> <RadixSelect.Value />
@@ -33,13 +33,13 @@ const NativeSelect: NativeSelectType = ({
</RadixSelect.SelectTrigger> </RadixSelect.SelectTrigger>
<RadixSelect.Content <RadixSelect.Content
position="popper" position="popper"
className="rounded-rounded scrollbar-hide border px-2 py-2 border-grey-20 bg-grey-0 w-full flex shadow-dropdown z-[9999] max-h-[305px] overflow-y-auto" className="rounded-rounded scrollbar-hide border-grey-20 bg-grey-0 shadow-dropdown z-[9999] flex max-h-[305px] w-full overflow-y-auto border px-2 py-2"
> >
<RadixSelect.ScrollUpButton className="h-[25px] flex items-center justify-center bg-gradient-to-b from-transparent to-grey-0"> <RadixSelect.ScrollUpButton className="to-grey-0 flex h-[25px] items-center justify-center bg-gradient-to-b from-transparent">
<ChevronUpIcon size={ICON_SIZE} /> <ChevronUpIcon size={ICON_SIZE} />
</RadixSelect.ScrollUpButton> </RadixSelect.ScrollUpButton>
<RadixSelect.Viewport className="p-2">{children}</RadixSelect.Viewport> <RadixSelect.Viewport className="p-2">{children}</RadixSelect.Viewport>
<RadixSelect.ScrollDownButton className="h-[25px] flex items-center justify-center bg-gradient-to-b from-transparent to-grey-0"> <RadixSelect.ScrollDownButton className="to-grey-0 flex h-[25px] items-center justify-center bg-gradient-to-b from-transparent">
<ChevronDownIcon size={ICON_SIZE} /> <ChevronDownIcon size={ICON_SIZE} />
</RadixSelect.ScrollDownButton> </RadixSelect.ScrollDownButton>
</RadixSelect.Content> </RadixSelect.Content>
@@ -52,7 +52,7 @@ type ItemProps = RadixSelect.SelectItemProps
const Item: React.FC<ItemProps> = ({ children, ...props }) => ( const Item: React.FC<ItemProps> = ({ children, ...props }) => (
<RadixSelect.Item <RadixSelect.Item
className={clsx( className={clsx(
"flex relative justify-start py-1.5 px-9 items-center inter-base-regular rounded hover:bg-grey-10" "inter-base-regular hover:bg-grey-10 relative flex items-center justify-start rounded py-1.5 px-9"
)} )}
{...props} {...props}
> >
@@ -44,17 +44,17 @@ const NoteInput: React.FC<NoteInputProps> = ({ onSubmit }) => {
return ( return (
<form> <form>
<div <div
className="flex items-center py-xsmall px-small bg-grey-5 border border-grey-20 rounded-rounded" className="py-xsmall px-small bg-grey-5 border-grey-20 rounded-rounded flex items-center border"
onClick={() => inputRef.current?.focus()} onClick={() => inputRef.current?.focus()}
> >
<div className="flex items-center gap-x-small flex-grow"> <div className="gap-x-small flex flex-grow items-center">
<EmojiPicker onEmojiClick={handleAddEmoji} /> <EmojiPicker onEmojiClick={handleAddEmoji} />
<input <input
type="text" type="text"
placeholder="Write a note..." placeholder="Write a note..."
value={note} value={note}
onChange={(e) => setNote(e.target.value)} onChange={(e) => setNote(e.target.value)}
className="flex-grow bg-transparent inter-base-regular placeholder:text-grey-40 focus:outline-none" className="inter-base-regular placeholder:text-grey-40 flex-grow bg-transparent focus:outline-none"
ref={inputRef} ref={inputRef}
id="note-input" id="note-input"
autoComplete="off" autoComplete="off"
@@ -12,7 +12,7 @@ const NotificationBell: React.FC<NotificationBellProps> = ({
...attributes ...attributes
}) => { }) => {
return ( return (
<Button className="w-8 h-8" size="small" {...attributes}> <Button className="h-8 w-8" size="small" {...attributes}>
{hasNotifications ? <BellNotiIcon /> : <BellIcon />} {hasNotifications ? <BellNotiIcon /> : <BellIcon />}
</Button> </Button>
) )
@@ -18,17 +18,17 @@ const NumberedItem: React.FC<NumberedItemProps> = ({
description, description,
}) => { }) => {
return ( return (
<div className="p-base border rounded-rounded flex gap-base justify-between items-center"> <div className="p-base rounded-rounded gap-base flex items-center justify-between border">
<div className="flex overflow-hidden gap-base w-full"> <div className="gap-base flex w-full overflow-hidden">
<div> <div>
<Badge <Badge
className="inter-base-semibold flex justify-center items-center w-[40px] h-[40px]" className="inter-base-semibold flex h-[40px] w-[40px] items-center justify-center"
variant="default" variant="default"
> >
§{index} §{index}
</Badge> </Badge>
</div> </div>
<div className="truncate flex flex-col justify-center flex-1 w-full"> <div className="flex w-full flex-1 flex-col justify-center truncate">
<div className="inter-small-semibold">{title}</div> <div className="inter-small-semibold">{title}</div>
{description && {description &&
(typeof description === "string" ? ( (typeof description === "string" ? (
@@ -21,7 +21,7 @@ const RMAShippingPrice: React.FC<RMAShippingPriceProps> = ({
setUseCustomShippingPrice, setUseCustomShippingPrice,
}) => { }) => {
return useCustomShippingPrice ? ( return useCustomShippingPrice ? (
<div className="flex items-end mt-4 gap-x-base w-full"> <div className="gap-x-base mt-4 flex w-full items-end">
<AmountInput <AmountInput
label={`Shipping price (${inclTax ? "incl. tax" : "excl. tax"})`} label={`Shipping price (${inclTax ? "incl. tax" : "excl. tax"})`}
currencyCode={currencyCode} currencyCode={currencyCode}
@@ -30,7 +30,7 @@ const RMAShippingPrice: React.FC<RMAShippingPriceProps> = ({
/> />
<Button <Button
onClick={() => setUseCustomShippingPrice(false)} onClick={() => setUseCustomShippingPrice(false)}
className="w-10 h-10 text-grey-40" className="text-grey-40 h-10 w-10"
variant="ghost" variant="ghost"
size="small" size="small"
> >
@@ -38,11 +38,11 @@ const RMAShippingPrice: React.FC<RMAShippingPriceProps> = ({
</Button> </Button>
</div> </div>
) : ( ) : (
<div className="flex w-full mt-4 justify-end"> <div className="mt-4 flex w-full justify-end">
<Button <Button
onClick={() => setUseCustomShippingPrice(true)} onClick={() => setUseCustomShippingPrice(true)}
variant="ghost" variant="ghost"
className="border border-grey-20" className="border-grey-20 border"
size="small" size="small"
> >
Add custom price Add custom price
@@ -18,7 +18,7 @@ const SalesChannelsList = ({ salesChannels, showMax = 3 }: Props) => {
{salesChannels {salesChannels
.slice(0, showMax) .slice(0, showMax)
.map((salesChannel, index, slicedArray) => ( .map((salesChannel, index, slicedArray) => (
<span className="ml-1 inter-base-regular text-grey-90 first-of-type:ml-0"> <span className="inter-base-regular text-grey-90 ml-1 first-of-type:ml-0">
{salesChannel.name} {salesChannel.name}
{index < slicedArray.length - 1 && ", "} {index < slicedArray.length - 1 && ", "}
</span> </span>
@@ -34,7 +34,7 @@ const SalesChannelsList = ({ salesChannels, showMax = 3 }: Props) => {
} }
side="top" side="top"
> >
<span className="ml-1 text-grey-50"> <span className="text-grey-50 ml-1">
+ {salesChannels.length - showMax} more + {salesChannels.length - showMax} more
</span> </span>
</Tooltip> </Tooltip>
@@ -31,7 +31,7 @@ const SearchBar: React.FC = () => {
<> <>
<button <button
onClick={() => setShowSearchModal(true)} onClick={() => setShowSearchModal(true)}
className="flex basis-1/2 items-center px-small py-[6px]" className="px-small flex basis-1/2 items-center py-[6px]"
> >
<SearchIcon className="text-grey-40" /> <SearchIcon className="text-grey-40" />
<div className="ml-5"> <div className="ml-5">
@@ -15,10 +15,10 @@ const Section: React.FC<SectionProps> = ({
}) => { }) => {
return ( return (
<div> <div>
<div className="flex items-center mb-2xsmall"> <div className="mb-2xsmall flex items-center">
<h3 className="inter-base-semibold">{title}</h3> <h3 className="inter-base-semibold">{title}</h3>
{tooltip && ( {tooltip && (
<div className="flex items-center ml-1.5"> <div className="ml-1.5 flex items-center">
<IconTooltip content={tooltip} /> <IconTooltip content={tooltip} />
</div> </div>
)} )}
@@ -34,7 +34,7 @@ export const AdjacentContainer = forwardRef<
ref ref
) => { ) => {
return ( return (
<div className="flex flex-col gap-y-xsmall w-full" ref={ref}> <div className="gap-y-xsmall flex w-full flex-col" ref={ref}>
{label && ( {label && (
<label <label
className="inter-small-semibold text-grey-50" className="inter-small-semibold text-grey-50"
@@ -77,7 +77,7 @@ export const SelectContainer = <
"--has-value": hasValue, "--has-value": hasValue,
}, },
clsx( clsx(
"relative pointer-events-auto", "pointer-events-auto relative",
{ "text-grey-40": isDisabled }, { "text-grey-40": isDisabled },
className className
) )
@@ -116,7 +116,7 @@ export const ValueContainer = <
"value-container--has-value": hasValue, "value-container--has-value": hasValue,
}, },
clsx( clsx(
"group flex items-center flex-wrap relative scrolling-touch overflow-hidden flex-1", "scrolling-touch group relative flex flex-1 flex-wrap items-center overflow-hidden",
{ {
"gap-2xsmall": isMulti, "gap-2xsmall": isMulti,
}, },
@@ -125,14 +125,14 @@ export const ValueContainer = <
)} )}
> >
{value?.length > 0 && ( {value?.length > 0 && (
<div className="h-7 bg-grey-20 text-grey-50 px-small inter-small-semibold flex items-center rounded-rounded gap-x-2xsmall cursor-default"> <div className="bg-grey-20 text-grey-50 px-small inter-small-semibold rounded-rounded gap-x-2xsmall flex h-7 cursor-default items-center">
<span>{value.length}</span> <span>{value.length}</span>
</div> </div>
)} )}
<div className="relative grow"> <div className="relative grow">
{children} {children}
{value?.length > 0 && inputValue === "" && ( {value?.length > 0 && inputValue === "" && (
<span className="absolute top-1/2 -translate-y-1/2 inter-base-regular text-grey-50"> <span className="inter-base-regular text-grey-50 absolute top-1/2 -translate-y-1/2">
{selectedPlaceholder || label || "Selected"} {selectedPlaceholder || label || "Selected"}
</span> </span>
)} )}
@@ -151,7 +151,7 @@ export const ValueContainer = <
"value-container--has-value": hasValue, "value-container--has-value": hasValue,
}, },
clsx( clsx(
"flex items-center flex-wrap relative scrolling-touch overflow-hidden flex-1", "scrolling-touch relative flex flex-1 flex-wrap items-center overflow-hidden",
{ {
"gap-2xsmall": isMulti, "gap-2xsmall": isMulti,
}, },
@@ -181,7 +181,7 @@ export const IndicatorsContainer = <
{ {
"indicators-container": true, "indicators-container": true,
}, },
clsx("text-grey-50 flex items-center gap-x-small px-small", className) clsx("text-grey-50 gap-x-small px-small flex items-center", className)
)} )}
> >
{children} {children}
@@ -38,7 +38,7 @@ const Control = <
"control--menu-is-open": menuIsOpen, "control--menu-is-open": menuIsOpen,
}, },
clsx( clsx(
"flex p-0 overflow-hidden rounded-rounded border border-gray-20 bg-grey-5 focus-within:shadow-cta transition-colors focus-within:border-violet-60 box-border pl-small", "rounded-rounded border-gray-20 bg-grey-5 focus-within:shadow-cta focus-within:border-violet-60 pl-small box-border flex overflow-hidden border p-0 transition-colors",
{ {
"h-xlarge": size === "sm", "h-xlarge": size === "sm",
"h-10": size === "md" || !size, "h-10": size === "md" || !size,
@@ -50,7 +50,7 @@ const Control = <
> >
<div <div
className={clsx( className={clsx(
"flex items-center flex-1", "flex flex-1 items-center",
customStyles?.inner_control customStyles?.inner_control
)} )}
> >
@@ -53,7 +53,7 @@ const Menu = <
className={cx( className={cx(
{ menu: true }, { menu: true },
clsx( clsx(
"absolute w-full overflow-hidden border-border z-[60] bg-grey-0 rounded-rounded border border-grey-20 shadow-dropdown mb-base", "border-border bg-grey-0 rounded-rounded border-grey-20 shadow-dropdown mb-base absolute z-[60] w-full overflow-hidden border",
{ {
"top-[calc(100%+8px)]": placement === "bottom", "top-[calc(100%+8px)]": placement === "bottom",
"bottom-full": placement === "top", "bottom-full": placement === "top",
@@ -178,7 +178,7 @@ export const MenuList = <
"menu-list": true, "menu-list": true,
"menu-list--is-multi": isMulti, "menu-list--is-multi": isMulti,
}, },
clsx("overflow-y-auto flex flex-col py-xsmall no-scrollbar", className) clsx("py-xsmall no-scrollbar flex flex-col overflow-y-auto", className)
)} )}
> >
{isMulti && selectAll && ( {isMulti && selectAll && (
@@ -208,14 +208,14 @@ export const LoadingMessage = <
return ( return (
<div <div
className={clsx( className={clsx(
"w-full flex items-center px-base transition-colors hover:bg-grey-5", "px-base hover:bg-grey-5 flex w-full items-center transition-colors",
{ {
"h-xlarge": size === "sm", "h-xlarge": size === "sm",
"h-10": size === "md" || !size, "h-10": size === "md" || !size,
} }
)} )}
> >
<div className="bg-grey-10 animate-pulse w-1/4 h-xsmall rounded-rounded" /> <div className="bg-grey-10 h-xsmall rounded-rounded w-1/4 animate-pulse" />
</div> </div>
) )
} }
@@ -271,9 +271,9 @@ export const Option = <
"option--is-focused": isFocused, "option--is-focused": isFocused,
}, },
clsx( clsx(
"flex items-center justify-between py-xsmall px-base transition-colors hover:bg-grey-5", "py-xsmall px-base hover:bg-grey-5 flex items-center justify-between transition-colors",
{ {
"text-grey-30 select-none cursor-not-allowed": isDisabled, "text-grey-30 cursor-not-allowed select-none": isDisabled,
"bg-grey-10": isFocused && !isDisabled, "bg-grey-10": isFocused && !isDisabled,
hidden: hideSelectedOptions && isSelected, hidden: hideSelectedOptions && isSelected,
}, },
@@ -290,13 +290,13 @@ export const Option = <
tabIndex={isDisabled ? -1 : 0} tabIndex={isDisabled ? -1 : 0}
{...innerProps} {...innerProps}
> >
<div className="flex items-center gap-x-small flex-1"> <div className="gap-x-small flex flex-1 items-center">
{isMulti && ( {isMulti && (
<CheckboxAdornment isSelected={isSelected} isDisabled={isDisabled} /> <CheckboxAdornment isSelected={isSelected} isDisabled={isDisabled} />
)} )}
<div <div
className={clsx( className={clsx(
"flex items-center justify-between gap-x-xsmall inter-base-regular flex-1", "gap-x-xsmall inter-base-regular flex flex-1 items-center justify-between",
{ {
truncate: !!truncateOption, truncate: !!truncateOption,
} }
@@ -306,14 +306,14 @@ export const Option = <
<span className="w-full">{children}</span> <span className="w-full">{children}</span>
{suffix && ( {suffix && (
<span className="inter-base-regular justify-self-end text-grey-50"> <span className="inter-base-regular text-grey-50 justify-self-end">
{suffix} {suffix}
</span> </span>
)} )}
</div> </div>
</div> </div>
{!isMulti && ( {!isMulti && (
<div className="w-5 ml-xsmall"> <div className="ml-xsmall w-5">
{isSelected && <CheckIcon size={16} />} {isSelected && <CheckIcon size={16} />}
</div> </div>
)} )}
@@ -328,7 +328,7 @@ const CheckboxAdornment = ({
return ( return (
<div <div
className={clsx( className={clsx(
`w-base h-base flex justify-center text-grey-0 border-grey-30 border rounded-base transition-colors`, `w-base h-base text-grey-0 border-grey-30 rounded-base flex justify-center border transition-colors`,
{ {
"bg-violet-60 border-violet-60": isSelected, "bg-violet-60 border-violet-60": isSelected,
"bg-grey-5": isDisabled, "bg-grey-5": isDisabled,
@@ -1,13 +1,12 @@
import clsx from "clsx"; import clsx from "clsx"
import React from "react";
import { import {
GroupBase, GroupBase,
MultiValueGenericProps, MultiValueGenericProps,
MultiValueProps, MultiValueProps,
MultiValueRemoveProps MultiValueRemoveProps,
} from "react-select"; } from "react-select"
import CrossIcon from "../../../../fundamentals/icons/cross-icon"; import CrossIcon from "../../../../fundamentals/icons/cross-icon"
import { optionIsFixed } from "../utils"; import { optionIsFixed } from "../utils"
const MultiValue = < const MultiValue = <
Option, Option,
@@ -31,12 +30,15 @@ const MultiValue = <
<Container <Container
data={data} data={data}
innerProps={{ innerProps={{
className: cx({ className: cx(
{
"multi-value": true, "multi-value": true,
"multi-value--is-disabled": isDisabled, "multi-value--is-disabled": isDisabled,
}, clsx({ },
"bg-grey-70 text-grey-0": isFocused clsx({
})), "bg-grey-70 text-grey-0": isFocused,
})
),
...innerProps, ...innerProps,
}} }}
selectProps={selectProps} selectProps={selectProps}
@@ -84,7 +86,14 @@ export const MultiValueContainer = <
innerProps: { className }, innerProps: { className },
}: MultiValueGenericProps<Option, IsMulti, Group>) => { }: MultiValueGenericProps<Option, IsMulti, Group>) => {
return ( return (
<span className={clsx("flex items-center gap-x-2xsmall py-2xsmall pl-small pr-2.5 rounded-rounded transition-colors bg-grey-20 text-grey-50 inter-small-semibold", className)}>{children}</span> <span
className={clsx(
"gap-x-2xsmall py-2xsmall pl-small rounded-rounded bg-grey-20 text-grey-50 inter-small-semibold flex items-center pr-2.5 transition-colors",
className
)}
>
{children}
</span>
) )
} }
@@ -95,19 +104,15 @@ export const MultiValueRemove = <
>( >(
props: MultiValueRemoveProps<Option, IsMulti, Group> props: MultiValueRemoveProps<Option, IsMulti, Group>
) => { ) => {
const { children, innerProps, data } = props; const { children, innerProps, data } = props
if (optionIsFixed(data) && data.isFixed) { if (optionIsFixed(data) && data.isFixed) {
return null; return null
} }
return ( return (
<div <div {...innerProps} role="button" className="text-grey-40">
{...innerProps}
role="button"
className="text-grey-40"
>
{children || <CrossIcon size={16} />} {children || <CrossIcon size={16} />}
</div> </div>
); )
}; }
@@ -1,5 +1,4 @@
import clsx from "clsx" import clsx from "clsx"
import React from "react"
import { GroupBase, PlaceholderProps } from "react-select" import { GroupBase, PlaceholderProps } from "react-select"
const Placeholder = < const Placeholder = <
@@ -20,7 +19,7 @@ const Placeholder = <
placeholder: true, placeholder: true,
}, },
clsx( clsx(
"absolute top-1/2 -translate-y-1/2 select-none inter-base-regular text-grey-50", "inter-base-regular text-grey-50 absolute top-1/2 -translate-y-1/2 select-none",
className className
) )
)} )}
@@ -1,5 +1,4 @@
import clsx from "clsx" import clsx from "clsx"
import React from "react"
import { GroupBase, SingleValueProps } from "react-select" import { GroupBase, SingleValueProps } from "react-select"
import { hasPrefix } from "../utils" import { hasPrefix } from "../utils"
@@ -26,12 +25,12 @@ const SingleValue = <
"single-value--is-disabled": isDisabled, "single-value--is-disabled": isDisabled,
}, },
clsx( clsx(
"overflow-hidden absolute top-1/2 -translate-y-1/2 whitespace-nowrap overflow-ellipsis", "absolute top-1/2 -translate-y-1/2 overflow-hidden overflow-ellipsis whitespace-nowrap",
className className
) )
)} )}
> >
<div className="flex items-center gap-x-xsmall inter-base-regular"> <div className="gap-x-xsmall inter-base-regular flex items-center">
{prefix && <span className="inter-base-semibold">{prefix}</span>} {prefix && <span className="inter-base-semibold">{prefix}</span>}
{children} {children}
</div> </div>
@@ -1,5 +1,5 @@
import type { MutableRefObject, ReactElement, RefAttributes } from "react" import type { MutableRefObject, ReactElement, RefAttributes } from "react"
import React, { forwardRef } from "react" import { forwardRef } from "react"
import type { GroupBase, SelectInstance } from "react-select" import type { GroupBase, SelectInstance } from "react-select"
import type { CreatableProps } from "react-select/creatable" import type { CreatableProps } from "react-select/creatable"
import CreatableReactSelect from "react-select/creatable" import CreatableReactSelect from "react-select/creatable"
@@ -1,5 +1,4 @@
import clsx from "clsx" import clsx from "clsx"
import React from "react"
import { import {
ClearIndicatorProps, ClearIndicatorProps,
components, components,
@@ -39,7 +38,7 @@ const MultiValueLabel = <
return ( return (
<div <div
{...innerProps} {...innerProps}
className={clsx("bg-grey-5 mx-0 inter-base-regular p-0", { className={clsx("bg-grey-5 inter-base-regular mx-0 p-0", {
"after:content-[',']": !isLast, "after:content-[',']": !isLast,
})} })}
> >
@@ -59,9 +58,9 @@ const Menu = <
return ( return (
<components.Menu <components.Menu
className={clsx("!rounded-rounded", { className={clsx("!rounded-rounded", {
"-mt-1 z-60": "z-60 -mt-1":
!props.selectProps.isSearchable && props.menuPlacement === "bottom", !props.selectProps.isSearchable && props.menuPlacement === "bottom",
"mb-3 z-60": "z-60 mb-3":
!props.selectProps.isSearchable && props.menuPlacement === "top", !props.selectProps.isSearchable && props.menuPlacement === "top",
})} })}
{...props} {...props}
@@ -95,7 +94,7 @@ const Placeholder = <
props: PlaceholderProps<Option, IsMulti, Group> props: PlaceholderProps<Option, IsMulti, Group>
) => { ) => {
return props.selectProps.menuIsOpen ? null : ( return props.selectProps.menuIsOpen ? null : (
<components.Placeholder {...props} className="!mx-0 !text-grey-40" /> <components.Placeholder {...props} className="!text-grey-40 !mx-0" />
) )
} }
@@ -142,7 +141,7 @@ const SelectContainer = <
props: ContainerProps<Option, IsMulti, Group> props: ContainerProps<Option, IsMulti, Group>
) => { ) => {
return ( return (
<div className="bg-grey-5 h-10 border border-grey-20 rounded-rounded focus-within:shadow-cta focus-within:border-violet-60 px-small"> <div className="bg-grey-5 border-grey-20 rounded-rounded focus-within:shadow-cta focus-within:border-violet-60 px-small h-10 border">
<components.SelectContainer {...props} /> <components.SelectContainer {...props} />
</div> </div>
) )
@@ -164,8 +163,8 @@ const Input = <
} }
return ( return (
<div className="w-full flex items-center h-full space-between"> <div className="space-between flex h-full w-full items-center">
<div className="w-full flex items-center"> <div className="flex w-full items-center">
<span className="text-grey-40 mr-2"> <span className="text-grey-40 mr-2">
<SearchIcon size={16} /> <SearchIcon size={16} />
</span> </span>
@@ -190,7 +189,7 @@ const ClearIndicator = <
return ( return (
<div <div
{...innerProps} {...innerProps}
className="hover:bg-grey-10 text-grey-50 rounded cursor-pointer" className="hover:bg-grey-10 text-grey-50 cursor-pointer rounded"
> >
<XCircleIcon size={16} /> <XCircleIcon size={16} />
</div> </div>
@@ -201,7 +200,7 @@ const CheckboxAdornment = ({ isSelected }: { isSelected: boolean }) => {
return ( return (
<div <div
className={clsx( className={clsx(
`w-5 h-5 flex justify-center text-grey-0 border-grey-30 border rounded-base`, `text-grey-0 border-grey-30 rounded-base flex h-5 w-5 justify-center border`,
{ {
"bg-violet-60": isSelected, "bg-violet-60": isSelected,
} }
@@ -219,18 +218,18 @@ const RadioAdornment = ({ isSelected }: { isSelected: boolean }) => {
<div <div
className={clsx( className={clsx(
"radio-outer-ring outline-0", "radio-outer-ring outline-0",
"shrink-0 w-[20px] h-[20px] rounded-circle", "rounded-circle h-[20px] w-[20px] shrink-0",
{ {
"shadow-[0_0_0_1px] shadow-[#D1D5DB]": !isSelected, "shadow-[0_0_0_1px] shadow-[#D1D5DB]": !isSelected,
"shadow-[0_0_0_2px] shadow-violet-60": isSelected, "shadow-violet-60 shadow-[0_0_0_2px]": isSelected,
} }
)} )}
> >
{isSelected && ( {isSelected && (
<div <div
className={clsx( className={clsx(
"group flex items-center justify-center w-full h-full relative", "group relative flex h-full w-full items-center justify-center",
"after:absolute after:inset-0 after:m-auto after:block after:w-[12px] after:h-[12px] after:bg-violet-60 after:rounded-circle" "after:bg-violet-60 after:rounded-circle after:absolute after:inset-0 after:m-auto after:block after:h-[12px] after:w-[12px]"
)} )}
/> />
)} )}
@@ -248,7 +247,7 @@ const NoOptionsMessage = <
}: NoticeProps<Option, IsMulti, Group>) => { }: NoticeProps<Option, IsMulti, Group>) => {
return ( return (
<div <div
className="text-grey-50 inter-small-semibold text-center p-xsmall" className="text-grey-50 inter-small-semibold p-xsmall text-center"
{...innerProps} {...innerProps}
> >
<p>{isLoading ? "Loading..." : "No options"}</p> <p>{isLoading ? "Loading..." : "No options"}</p>
@@ -267,12 +266,12 @@ const Option = <
return ( return (
<components.Option <components.Option
{...props} {...props}
className="my-1 py-0 px-2 bg-grey-0 active:bg-grey-0" className="bg-grey-0 active:bg-grey-0 my-1 py-0 px-2"
> >
<div <div
className={`item-renderer h-full hover:bg-grey-10 py-2 px-2 cursor-pointer rounded`} className={`item-renderer hover:bg-grey-10 h-full cursor-pointer rounded py-2 px-2`}
> >
<div className="items-center h-full flex"> <div className="flex h-full items-center">
{props.data?.value !== "all" && props.data?.label !== "Select All" ? ( {props.data?.value !== "all" && props.data?.label !== "Select All" ? (
<> <>
{props.isMulti ? ( {props.isMulti ? (
@@ -280,7 +279,7 @@ const Option = <
) : ( ) : (
<RadioAdornment isSelected={props.isSelected} /> <RadioAdornment isSelected={props.isSelected} />
)} )}
<span className="ml-3 text-grey-90 inter-base-regular"> <span className="text-grey-90 inter-base-regular ml-3">
{props.data.label} {props.data.label}
</span> </span>
</> </>
@@ -32,10 +32,10 @@ const ShippingOption: React.FC<ShippingOptionProps> = ({
onEdit, onEdit,
}) => { }) => {
return ( return (
<div className="flex items-baseline justify-between p-base rounded-base border border-grey-20"> <div className="p-base rounded-base border-grey-20 flex items-baseline justify-between border">
<div className="truncate"> <div className="truncate">
<div className="flex items-center"> <div className="flex items-center">
<p className="inter-small-semibold truncate mr-xsmall"> <p className="inter-small-semibold mr-xsmall truncate">
{option.name} {option.data.name && `(${option.data.name})`}{" "} {option.name} {option.data.name && `(${option.data.name})`}{" "}
</p> </p>
{option.admin_only && <Badge variant="primary">Not on website</Badge>} {option.admin_only && <Badge variant="primary">Not on website</Badge>}
@@ -45,7 +45,7 @@ const ShippingOption: React.FC<ShippingOptionProps> = ({
{option.amount !== undefined && {option.amount !== undefined &&
`${option.amount / 100} ${currency_code.toUpperCase()}`} `${option.amount / 100} ${currency_code.toUpperCase()}`}
{option.requirements.length {option.requirements.length
? option.requirements.map(r => { ? option.requirements.map((r) => {
const type = const type =
r.type === "max_subtotal" ? "Max. subtotal" : "Min. subtotal" r.type === "max_subtotal" ? "Max. subtotal" : "Min. subtotal"
return ` - ${type}: ${ return ` - ${type}: ${
@@ -8,11 +8,11 @@ const SidebarCompanyLogo: React.FC<SidebarCompanyLogoProps> = ({
storeName, storeName,
}: SidebarCompanyLogoProps) => { }: SidebarCompanyLogoProps) => {
return ( return (
<div className="flex items-center bg-grey-0 px-2.5 pb-6 w-full mb-4"> <div className="bg-grey-0 mb-4 flex w-full items-center px-2.5 pb-6">
<div className="w-[32px] h-[32px] flex items-center justify-center bg-grey-90 text-grey-0 rounded"> <div className="bg-grey-90 text-grey-0 flex h-[32px] w-[32px] items-center justify-center rounded">
<div>{storeName?.slice(0, 1) || "M"}</div> <div>{storeName?.slice(0, 1) || "M"}</div>
</div> </div>
<span className="font-semibold ml-2.5">{storeName}</span> <span className="ml-2.5 font-semibold">{storeName}</span>
</div> </div>
) )
} }
@@ -40,7 +40,7 @@ const SidebarMenuItem: React.FC<SidebarMenuItemProps> & {
trigger={ trigger={
<NavLink className={classNameFn} to={pageLink}> <NavLink className={classNameFn} to={pageLink}>
<span className="items-start">{icon}</span> <span className="items-start">{icon}</span>
<span className="ml-3 group-[.is-active]:text-grey-90">{text}</span> <span className="group-[.is-active]:text-grey-90 ml-3">{text}</span>
</NavLink> </NavLink>
} }
> >
@@ -62,7 +62,7 @@ const SubItem = ({ pageLink, text }: SidebarMenuSubitemProps) => {
return ( return (
<NavLink className={classNameFn} to={pageLink}> <NavLink className={classNameFn} to={pageLink}>
<span className="ml-3 text-grey-90 text-small">{text}</span> <span className="text-grey-90 text-small ml-3">{text}</span>
</NavLink> </NavLink>
) )
} }
@@ -16,11 +16,11 @@ const SidebarTeamMember: React.FC<SidebarTeamMemberProps> = ({
: user.email : user.email
return ( return (
<div className="flex items-center bg-inherit px-2.5 py-1.5 w-full"> <div className="flex w-full items-center bg-inherit px-2.5 py-1.5">
<div className="w-[24px] h-[24px]"> <div className="h-[24px] w-[24px]">
<Avatar user={user} color={color} /> <Avatar user={user} color={color} />
</div> </div>
<span className="pl-2.5 w-40 truncate">{fullName}</span> <span className="w-40 truncate pl-2.5">{fullName}</span>
</div> </div>
) )
} }
@@ -29,7 +29,7 @@ const StatusSelector: React.FC<StatusSelectorProps> = ({
</DropdownMenu.Trigger> </DropdownMenu.Trigger>
<DropdownMenu.Content <DropdownMenu.Content
sideOffset={5} sideOffset={5}
className="border bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown p-xsmall min-w-[200px] z-30" className="bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown p-xsmall z-30 min-w-[200px] border"
> >
<DropdownMenu.Item> <DropdownMenu.Item>
{ {
@@ -24,7 +24,7 @@ const SwitchableItem: React.FC<SwitchableItemProps> = ({
<div> <div>
<div className="flex items-start justify-between"> <div className="flex items-start justify-between">
<div className="flex flex-col"> <div className="flex flex-col">
<div className="flex items-center gap-x-2xsmall"> <div className="gap-x-2xsmall flex items-center">
<p className="inter-base-semibold">{title}</p> <p className="inter-base-semibold">{title}</p>
{tooltip && <IconTooltip content={tooltip} />} {tooltip && <IconTooltip content={tooltip} />}
</div> </div>
@@ -39,7 +39,7 @@ const SwitchableItem: React.FC<SwitchableItemProps> = ({
</div> </div>
<div <div
className={clsx( className={clsx(
"transition-[max-height,opacity] duration-500 ease-in-out overflow-hidden", "overflow-hidden transition-[max-height,opacity] duration-500 ease-in-out",
{ {
"max-h-[1000px] opacity-100": open, "max-h-[1000px] opacity-100": open,
"max-h-0 opacity-0": !open, "max-h-0 opacity-0": !open,
@@ -44,7 +44,7 @@ type FieldMenuItemProps = {
function Chip(props: ChipProps) { function Chip(props: ChipProps) {
const { remove, short } = props const { remove, short } = props
return ( return (
<div className="rounded-lg h-[32px] inline-flex gap-1 shrink-0 items-center text-small text-grey-70 border border-gray-70 px-3 mr-1 last:mr-2"> <div className="text-small text-grey-70 border-gray-70 mr-1 inline-flex h-[32px] shrink-0 items-center gap-1 rounded-lg border px-3 last:mr-2">
{short} {short}
<CrossIcon <CrossIcon
className="text-grey-40 cursor-pointer" className="text-grey-40 cursor-pointer"
@@ -64,7 +64,7 @@ function FieldMenuItem(props: FieldMenuItemProps) {
<DropdownMenu.Item> <DropdownMenu.Item>
<Checkbox <Checkbox
checked={checked} checked={checked}
className="px-[6px] mx-2 h-[32px] hover:bg-grey-10 rounded text-small" className="hover:bg-grey-10 text-small mx-2 h-[32px] rounded px-[6px]"
onChange={onChange} onChange={onChange}
label={ label={
typeof field.label === "function" typeof field.label === "function"
@@ -132,9 +132,9 @@ function FieldsMenu(props: FieldsMenuProps) {
<Button <Button
onClick={onTriggerClick} onClick={onTriggerClick}
variant="secondary" variant="secondary"
className="rounded-lg h-[32px] px-3 text-small font-semibold text-grey-90 inline-flex" className="text-small text-grey-90 inline-flex h-[32px] rounded-lg px-3 font-semibold"
> >
<span className="flex whitespace-nowrap items-center gap-1"> <span className="flex items-center gap-1 whitespace-nowrap">
Add fields <PlusIcon size={14} /> Add fields <PlusIcon size={14} />
</span> </span>
</Button> </Button>
@@ -142,7 +142,7 @@ function FieldsMenu(props: FieldsMenuProps) {
<DropdownMenu.Content <DropdownMenu.Content
ref={contentRef} ref={contentRef}
className="w-[240px] bg-white shadow rounded-xl p-2" className="w-[240px] rounded-xl bg-white p-2 shadow"
> >
{fields.map((f) => ( {fields.map((f) => (
<FieldMenuItem <FieldMenuItem
@@ -179,8 +179,8 @@ function TableFieldsFilters(props: TableFieldsFilterProps) {
const visibleFields = _selected.map((id) => fields.find((f) => f.id === id)) const visibleFields = _selected.map((id) => fields.find((f) => f.id === id))
return ( return (
<div className="flex-wrap flex items-center gap-y-2"> <div className="flex flex-wrap items-center gap-y-2">
<span className="text-small font-semibold whitespace-nowrap text-gray-500 mr-2"> <span className="text-small mr-2 whitespace-nowrap font-semibold text-gray-500">
Currently editing these fields: Currently editing these fields:
</span> </span>
@@ -40,16 +40,16 @@ export const TablePagination = <T,>({
return ( return (
<div <div
className={clsx( className={clsx(
"inter-small-regular flex items-center justify-between text-grey-50", "inter-small-regular text-grey-50 flex items-center justify-between",
className className
)} )}
> >
<div> <div>
<p>{`${from} – ${to} of ${count} results`}</p> <p>{`${from} – ${to} of ${count} results`}</p>
</div> </div>
<div className="flex items-center gap-x-small"> <div className="gap-x-small flex items-center">
<p>{`${getState().pagination.pageIndex + 1} of ${getPageCount()}`}</p> <p>{`${getState().pagination.pageIndex + 1} of ${getPageCount()}`}</p>
<div className="flex items-center gap-x-2xsmall"> <div className="gap-x-2xsmall flex items-center">
<Button <Button
variant="ghost" variant="ghost"
size="small" size="small"
@@ -19,7 +19,7 @@ export const TableToasterContainer = ({
})} })}
{...toast?.ariaProps} {...toast?.ariaProps}
> >
<div className="flex items-center rounded-rounded bg-grey-90 px-base py-3.5"> <div className="rounded-rounded bg-grey-90 px-base flex items-center py-3.5">
{children} {children}
</div> </div>
</div> </div>
@@ -24,7 +24,7 @@ const FilteringOptions: React.FC<FilteringOptionProps> = ({
return ( return (
<div <div
className={clsx( className={clsx(
"inter-small-regular flex text-grey-50 mr-6 last:mr-0", "inter-small-regular text-grey-50 mr-6 flex last:mr-0",
className className
)} )}
{...props} {...props}
@@ -34,11 +34,11 @@ const FilteringOptions: React.FC<FilteringOptionProps> = ({
<DropdownMenu.Trigger <DropdownMenu.Trigger
asChild asChild
className={clsx( className={clsx(
"inter-small-regular text-grey-50 flex items-center pl-1.5 pr-0.5 rounded active:bg-grey-5 hover:bg-grey-5", "inter-small-regular text-grey-50 active:bg-grey-5 hover:bg-grey-5 flex items-center rounded pl-1.5 pr-0.5",
{ "bg-grey-5": open } { "bg-grey-5": open }
)} )}
> >
<div className="flex align-center"> <div className="align-center flex">
{selected} {selected}
<div className="text-grey-40 h-min"> <div className="text-grey-40 h-min">
<ChevronDownIcon size={16} /> <ChevronDownIcon size={16} />
@@ -47,7 +47,7 @@ const FilteringOptions: React.FC<FilteringOptionProps> = ({
</DropdownMenu.Trigger> </DropdownMenu.Trigger>
<DropdownMenu.Content <DropdownMenu.Content
sideOffset={8} sideOffset={8}
className="bg-grey-0 p-2 border border-grey-20 rounded-rounded shadow-dropdown" className="bg-grey-0 border-grey-20 rounded-rounded shadow-dropdown border p-2"
> >
{options.map((opt, idx) => ( {options.map((opt, idx) => (
<DropdownMenu.DropdownMenuItem <DropdownMenu.DropdownMenuItem
@@ -58,9 +58,9 @@ const FilteringOptions: React.FC<FilteringOptionProps> = ({
}} }}
disabled={typeof opt.count !== "undefined" && opt.count < 1} disabled={typeof opt.count !== "undefined" && opt.count < 1}
className={clsx( className={clsx(
"py-1.5 my-1 w-48 px-3 flex items-center rounded text-grey-90 hover:border-0 hover:outline-none inter-small-semibold", "text-grey-90 inter-small-semibold my-1 flex w-48 items-center rounded py-1.5 px-3 hover:border-0 hover:outline-none",
{ {
"cursor-pointer hover:bg-grey-10": "hover:bg-grey-10 cursor-pointer":
typeof opt.count === "undefined" || opt.count > 0, typeof opt.count === "undefined" || opt.count > 0,
} }
)} )}
@@ -71,7 +71,7 @@ const FilteringOptions: React.FC<FilteringOptionProps> = ({
</span> </span>
)} )}
<div <div
className={clsx("ml-3 w-full flex justify-between", { className={clsx("ml-3 flex w-full justify-between", {
"ml-7": selected !== opt.title, "ml-7": selected !== opt.title,
"text-grey-30": (opt.count || 0) < 1, "text-grey-30": (opt.count || 0) < 1,
})} })}
@@ -20,7 +20,7 @@ const TableSearch: React.FC<TableSearchProps> = ({
return ( return (
<div <div
className={clsx( className={clsx(
"inter-small-regular mt-1 transition-color flex text-grey-50 items-center mb-1 pl-1 py-1.5 rounded-rounded border border-grey-20 min-w-content w-60 focus-within:shadow-input focus-within:border-violet-60 bg-grey-5", "inter-small-regular transition-color text-grey-50 rounded-rounded border-grey-20 min-w-content focus-within:shadow-input focus-within:border-violet-60 bg-grey-5 mt-1 mb-1 flex w-60 items-center border py-1.5 pl-1",
className className
)} )}
{...props} {...props}
@@ -33,7 +33,7 @@ const TableSearch: React.FC<TableSearchProps> = ({
type="text" type="text"
value={searchValue} value={searchValue}
className={clsx( className={clsx(
"focus:outline-none focus:border-none inter-small-regular w-full bg-transparent focus:text-grey-90 caret-violet-60 placeholder:inter-small-regular placeholder-grey-40" "inter-small-regular focus:text-grey-90 caret-violet-60 placeholder:inter-small-regular placeholder-grey-40 w-full bg-transparent focus:border-none focus:outline-none"
)} )}
placeholder={placeholder} placeholder={placeholder}
onChange={(e) => { onChange={(e) => {
@@ -22,7 +22,7 @@ const TagGrid: React.FC<TagGridProps> = ({ tags, badgeVariant }) => {
const remainder = tags.length - columns const remainder = tags.length - columns
return ( return (
<div className="flex items-center gap-x-2xsmall w-1/2" ref={containerRef}> <div className="gap-x-2xsmall flex w-1/2 items-center" ref={containerRef}>
{visibleTags?.map((tag, index) => { {visibleTags?.map((tag, index) => {
return ( return (
<Badge className="mr-2xsmall" key={index} variant={badgeVariant}> <Badge className="mr-2xsmall" key={index} variant={badgeVariant}>
@@ -175,19 +175,20 @@ const TagInput: React.FC<TagInputProps> = ({
> >
<div <div
className={clsx( className={clsx(
"h-auto min-h-[40px] bg-grey-5 shadow-border focus-within:outline-4 focus-within:outline focus-within:outline-violet-60/10 transition-colors focus-within:shadow-focus-border rounded-rounded flex items-center px-3 box-border", "bg-grey-5 shadow-border focus-within:outline-violet-60/10 focus-within:shadow-focus-border rounded-rounded box-border flex h-auto min-h-[40px] items-center px-3 transition-colors focus-within:outline focus-within:outline-4",
{ {
"shadow-error-border focus-within:shadow-error-border focus-within:outline-rose-60/10": invalid, "shadow-error-border focus-within:shadow-error-border focus-within:outline-rose-60/10":
invalid,
} }
)} )}
> >
<div className="h-full"> <div className="h-full">
<div className="w-full gap-xsmall flex flex-wrap box-border h-28px py-1.5"> <div className="gap-xsmall h-28px box-border flex w-full flex-wrap py-1.5">
{values.map((v, index) => ( {values.map((v, index) => (
<div <div
key={index} key={index}
className={clsx( className={clsx(
"flex items-center justify-center whitespace-nowrap w-max bg-grey-20 rounded-rounded px-3 py-1 gap-x-1", "bg-grey-20 rounded-rounded flex w-max items-center justify-center gap-x-1 whitespace-nowrap px-3 py-1",
{ {
["!bg-grey-90"]: index === highlighted, ["!bg-grey-90"]: index === highlighted,
} }
@@ -195,7 +196,7 @@ const TagInput: React.FC<TagInputProps> = ({
> >
<span <span
className={clsx( className={clsx(
"inline-block text-grey-50 inter-small-semibold", "text-grey-50 inter-small-semibold inline-block",
{ {
["text-grey-20"]: index === highlighted, ["text-grey-20"]: index === highlighted,
} }
@@ -204,7 +205,7 @@ const TagInput: React.FC<TagInputProps> = ({
{v} {v}
</span> </span>
<CrossIcon <CrossIcon
className="inline cursor-pointer text-grey-40" className="text-grey-40 inline cursor-pointer"
size="16" size="16"
onClick={() => handleRemove(index)} onClick={() => handleRemove(index)}
/> />
@@ -216,7 +217,7 @@ const TagInput: React.FC<TagInputProps> = ({
onBlur={handleBlur} onBlur={handleBlur}
onKeyDown={handleKeyDown} onKeyDown={handleKeyDown}
onChange={handleInput} onChange={handleInput}
className={clsx("focus:outline-none bg-transparent flex-1")} className={clsx("flex-1 bg-transparent focus:outline-none")}
placeholder={values?.length ? "" : placeholder} // only visible if no tags exist placeholder={values?.length ? "" : placeholder} // only visible if no tags exist
{...props} {...props}
/> />
@@ -75,17 +75,17 @@ const TextArea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
)} )}
<div <div
className={clsx( className={clsx(
"w-full flex flex-col focus-within:shadow-input focus-within:border-violet-60 px-small py-xsmall bg-grey-5 border border-grey-20 rounded-rounded", "focus-within:shadow-input focus-within:border-violet-60 px-small py-xsmall bg-grey-5 border-grey-20 rounded-rounded flex w-full flex-col border",
{ {
"border-rose-50 focus-within:shadow-cta focus-within:shadow-rose-60/10 focus-within:border-rose-50": "focus-within:shadow-cta focus-within:shadow-rose-60/10 border-rose-50 focus-within:border-rose-50":
errors && name && errors[name], errors && name && errors[name],
} }
)} )}
> >
<textarea <textarea
className={clsx( className={clsx(
"relative text-justify overflow-hidden focus:overflow-auto resize-none bg-inherit outline-none outline-0", "relative resize-none overflow-hidden bg-inherit text-justify outline-none outline-0 focus:overflow-auto",
"w-full remove-number-spinner leading-base text-grey-90 font-normal caret-violet-60 placeholder-grey-40", "remove-number-spinner leading-base text-grey-90 caret-violet-60 placeholder-grey-40 w-full font-normal",
"line-clamp-[var(--lines)] focus:line-clamp-none" "line-clamp-[var(--lines)] focus:line-clamp-none"
)} )}
style={ style={
@@ -8,7 +8,7 @@ type EventActionablesProps = {
const EventActionables: React.FC<EventActionablesProps> = ({ actions }) => { const EventActionables: React.FC<EventActionablesProps> = ({ actions }) => {
const EventTrigger = ( const EventTrigger = (
<button className="btn-ghost py-0 px-2xsmall flex justify-center items-center focus:outline-none focus:ring-2 rounded-base focus:ring-violet-40"> <button className="btn-ghost px-2xsmall rounded-base focus:ring-violet-40 flex items-center justify-center py-0 focus:outline-none focus:ring-2">
<MoreHorizontalIcon size={20} /> <MoreHorizontalIcon size={20} />
</button> </button>
) )
@@ -48,12 +48,12 @@ const EventContainer: React.FC<EventContainerProps> = ({
return ( return (
<div className="mb-base"> <div className="mb-base">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div className="flex items-center gap-x-xsmall"> <div className="gap-x-xsmall flex items-center">
<div className={clsx("h-5 w-5", iconColor)}>{icon}</div> <div className={clsx("h-5 w-5", iconColor)}>{icon}</div>
<div className="inter-small-semibold">{title}</div> <div className="inter-small-semibold">{title}</div>
<div className="inter-small-regular text-grey-50"></div> <div className="inter-small-regular text-grey-50"></div>
</div> </div>
<div className="flex items-center gap-x-xsmall"> <div className="gap-x-xsmall flex items-center">
{noNotification && ( {noNotification && (
<Tooltip content="Notifications related to this event are disabled"> <Tooltip content="Notifications related to this event are disabled">
<BellOffIcon size={20} className="text-grey-40" /> <BellOffIcon size={20} className="text-grey-40" />
@@ -71,8 +71,8 @@ const EventContainer: React.FC<EventContainerProps> = ({
)} )}
</div> </div>
</div> </div>
<div className="flex gap-x-xsmall"> <div className="gap-x-xsmall flex">
<div className="flex w-5 justify-center pt-base"> <div className="pt-base flex w-5 justify-center">
{!isFirst && <div className="min-h-[24px] w-px" />} {!isFirst && <div className="min-h-[24px] w-px" />}
</div> </div>
<div className="inter-small-regular mt-2xsmall w-full"> <div className="inter-small-regular mt-2xsmall w-full">
@@ -90,7 +90,7 @@ const EventContainer: React.FC<EventContainerProps> = ({
{midNode} {midNode}
</div> </div>
{children && isExpanded && ( {children && isExpanded && (
<div className="mt-small w-full pb-base">{children}</div> <div className="mt-small pb-base w-full">{children}</div>
)} )}
</div> </div>
</div> </div>
@@ -16,9 +16,9 @@ const EventItemContainer: React.FC<EventItemContainerProps> = ({ item }) => {
return null return null
} }
return ( return (
<div className="flex items-center gap-x-small mb-base last:mb-0"> <div className="gap-x-small mb-base flex items-center last:mb-0">
{item.thumbnail && ( {item.thumbnail && (
<div className="h-10 w-[30px] rounded-base overflow-hidden"> <div className="rounded-base h-10 w-[30px] overflow-hidden">
<img <img
src={item.thumbnail} src={item.thumbnail}
alt={`Thumbnail for ${item.title}`} alt={`Thumbnail for ${item.title}`}
@@ -26,8 +26,8 @@ const EventItemContainer: React.FC<EventItemContainerProps> = ({ item }) => {
/> />
</div> </div>
)} )}
<div className="flex flex-col inter-small-regular w-full"> <div className="inter-small-regular flex w-full flex-col">
<div className="flex items-center justify-between w-full"> <div className="flex w-full items-center justify-between">
<p>{item.title}</p> <p>{item.title}</p>
<span className="inter-small-semibold text-violet-60">{`x${item.quantity}`}</span> <span className="inter-small-semibold text-violet-60">{`x${item.quantity}`}</span>
</div> </div>
@@ -49,7 +49,7 @@ const Note: React.FC<NoteProps> = ({ event }) => {
isFirst={event.first} isFirst={event.first}
> >
<div <div
className={clsx("rounded-2xl px-base py-base", { className={clsx("px-base py-base rounded-2xl", {
"bg-grey-5": !isMe, "bg-grey-5": !isMe,
"bg-violet-5 text-violet-90": isMe, "bg-violet-5 text-violet-90": isMe,
})} })}
@@ -67,11 +67,11 @@ const ResendModal: React.FC<ResendModalProps> = ({
</div> </div>
</Modal.Content> </Modal.Content>
<Modal.Footer> <Modal.Footer>
<div className="flex w-full h-8 justify-end"> <div className="flex h-8 w-full justify-end">
<div className="flex"> <div className="flex">
<Button <Button
variant="ghost" variant="ghost"
className="mr-2 w-32 text-small justify-center" className="text-small mr-2 w-32 justify-center"
size="large" size="large"
onClick={handleCancel} onClick={handleCancel}
> >
@@ -79,7 +79,7 @@ const ResendModal: React.FC<ResendModalProps> = ({
</Button> </Button>
<Button <Button
size="large" size="large"
className="w-32 text-small justify-center" className="text-small w-32 justify-center"
variant="primary" variant="primary"
type="submit" type="submit"
disabled={isLoading} disabled={isLoading}
@@ -45,9 +45,8 @@ const getInfo = (edit: OrderEdit): { type: string; user_id: string } => {
} }
const EditCreated: React.FC<EditCreatedProps> = ({ event }) => { const EditCreated: React.FC<EditCreatedProps> = ({ event }) => {
const { isModalVisible, showModal, setActiveOrderEdit } = useContext( const { isModalVisible, showModal, setActiveOrderEdit } =
OrderEditContext useContext(OrderEditContext)
)
const { order_edit: orderEdit, isFetching } = useAdminOrderEdit(event.edit.id) const { order_edit: orderEdit, isFetching } = useAdminOrderEdit(event.edit.id)
@@ -90,8 +89,7 @@ const EditCreated: React.FC<EditCreatedProps> = ({ event }) => {
const onConfirmEditClicked = async () => { const onConfirmEditClicked = async () => {
const shouldDelete = await forceConfirmDialog({ const shouldDelete = await forceConfirmDialog({
heading: "Delete Confirm", heading: "Delete Confirm",
text: text: "By force confirming you allow the order edit to be fulfilled. You will still have to reconcile payments manually after confirming.",
"By force confirming you allow the order edit to be fulfilled. You will still have to reconcile payments manually after confirming.",
confirmText: "Yes, Force Confirm", confirmText: "Yes, Force Confirm",
cancelText: "No, Cancel", cancelText: "No, Cancel",
}) })
@@ -149,7 +147,7 @@ const EditCreated: React.FC<EditCreatedProps> = ({ event }) => {
{type === "created" ? ( {type === "created" ? (
<> <>
<Button <Button
className="w-full border border-grey-20" className="border-grey-20 w-full border"
size="small" size="small"
variant="ghost" variant="ghost"
onClick={onContinueEdit} onClick={onContinueEdit}
@@ -158,7 +156,7 @@ const EditCreated: React.FC<EditCreatedProps> = ({ event }) => {
</Button> </Button>
<TwoStepDelete <TwoStepDelete
onDelete={onDeleteOrderEditClicked} onDelete={onDeleteOrderEditClicked}
className="w-full border border-grey-20" className="border-grey-20 w-full border"
> >
Delete the order edit Delete the order edit
</TwoStepDelete> </TwoStepDelete>
@@ -166,7 +164,7 @@ const EditCreated: React.FC<EditCreatedProps> = ({ event }) => {
) : ( ) : (
<> <>
<Button <Button
className="w-full border border-grey-20" className="border-grey-20 w-full border"
size="small" size="small"
variant="ghost" variant="ghost"
onClick={onCopyConfirmationLinkClicked} onClick={onCopyConfirmationLinkClicked}
@@ -174,7 +172,7 @@ const EditCreated: React.FC<EditCreatedProps> = ({ event }) => {
Copy Confirmation-Request Link Copy Confirmation-Request Link
</Button> </Button>
<Button <Button
className="w-full border border-grey-20" className="border-grey-20 w-full border"
size="small" size="small"
variant="ghost" variant="ghost"
onClick={onConfirmEditClicked} onClick={onConfirmEditClicked}
@@ -184,7 +182,7 @@ const EditCreated: React.FC<EditCreatedProps> = ({ event }) => {
<TwoStepDelete <TwoStepDelete
onDelete={onCancelOrderEditClicked} onDelete={onCancelOrderEditClicked}
className="w-full border border-grey-20" className="border-grey-20 w-full border"
> >
Cancel Order Edit Cancel Order Edit
</TwoStepDelete> </TwoStepDelete>
@@ -220,7 +218,7 @@ const OrderEditChanges = ({ orderEdit }) => {
) )
return ( return (
<div className="flex flex-col gap-y-base"> <div className="gap-y-base flex flex-col">
{added.length > 0 && ( {added.length > 0 && (
<div> <div>
<span className="inter-small-regular text-grey-50">Added</span> <span className="inter-small-regular text-grey-50">Added</span>
@@ -264,9 +262,9 @@ const OrderEditChangeItem: React.FC<OrderEditChangeItemProps> = ({
const lineItem = isAdd ? change.line_item : change.original_line_item const lineItem = isAdd ? change.line_item : change.original_line_item
return ( return (
<div className="flex gap-x-base mt-xsmall"> <div className="gap-x-base mt-xsmall flex">
<div> <div>
<div className="flex h-[40px] w-[30px] rounded-rounded overflow-hidden"> <div className="rounded-rounded flex h-[40px] w-[30px] overflow-hidden">
{lineItem?.thumbnail ? ( {lineItem?.thumbnail ? (
<img src={lineItem.thumbnail} className="object-cover" /> <img src={lineItem.thumbnail} className="object-cover" />
) : ( ) : (
@@ -281,7 +279,7 @@ const OrderEditChangeItem: React.FC<OrderEditChangeItemProps> = ({
<CopyToClipboard value={lineItem?.variant?.sku} iconSize={14} /> <CopyToClipboard value={lineItem?.variant?.sku} iconSize={14} />
)} )}
</span> </span>
<span className="flex inter-small-regular text-grey-50"> <span className="inter-small-regular text-grey-50 flex">
{lineItem?.variant?.options?.map((option) => option.value)} {lineItem?.variant?.options?.map((option) => option.value)}
</span> </span>
</div> </div>
@@ -16,7 +16,7 @@ export const ByLine: React.FC<ByLineProps> = ({ user }) => {
!first_name && !last_name ? email : `${first_name || ""} ${last_name || ""}` !first_name && !last_name ? email : `${first_name || ""} ${last_name || ""}`
return ( return (
<div className="flex inter-small-regular items-center text-grey-50"> <div className="inter-small-regular text-grey-50 flex items-center">
By By
<span className="w-base h-base mx-xsmall"> <span className="w-base h-base mx-xsmall">
<Avatar user={user} font="inter-xsmall-semibold" /> <Avatar user={user} font="inter-xsmall-semibold" />
@@ -59,7 +59,7 @@ const PaymentRequired: React.FC<RequestedProps> = ({ event }) => {
> >
<Button <Button
size="small" size="small"
className="w-full border border-grey-20 mb-xsmall" className="border-grey-20 mb-xsmall w-full border"
variant="ghost" variant="ghost"
onClick={onCopyPaymentLinkClicked} onClick={onCopyPaymentLinkClicked}
> >
@@ -67,7 +67,7 @@ const PaymentRequired: React.FC<RequestedProps> = ({ event }) => {
</Button> </Button>
<Button <Button
size="small" size="small"
className="w-full border border-grey-20" className="border-grey-20 w-full border"
variant="ghost" variant="ghost"
onClick={onMarkAsPaidClicked} onClick={onMarkAsPaidClicked}
> >
@@ -49,7 +49,7 @@ const RefundRequired: React.FC<RequestedProps> = ({ event }) => {
onClick={() => setShowRefundModal(true)} onClick={() => setShowRefundModal(true)}
variant="ghost" variant="ghost"
size="small" size="small"
className="w-full border border-grey-20 mb-xsmall text-rose-50" className="border-grey-20 mb-xsmall w-full border text-rose-50"
> >
Refund Refund
{formatAmountWithSymbol({ {formatAmountWithSymbol({
@@ -40,7 +40,7 @@ const EditRequested: React.FC<RequestedProps> = ({ event }) => {
} }
> >
<Button <Button
className="w-full border border-grey-20 mb-5" className="border-grey-20 mb-5 w-full border"
size="small" size="small"
variant="ghost" variant="ghost"
onClick={() => setShowResend(true)} onClick={() => setShowResend(true)}
@@ -2,7 +2,7 @@ import React from "react"
import { OrderPlacedEvent } from "../../../hooks/use-build-timeline" import { OrderPlacedEvent } from "../../../hooks/use-build-timeline"
import { formatAmountWithSymbol } from "../../../utils/prices" import { formatAmountWithSymbol } from "../../../utils/prices"
import CheckCircleIcon from "../../fundamentals/icons/check-circle-icon" import CheckCircleIcon from "../../fundamentals/icons/check-circle-icon"
import EventContainer, { EventIconColor } from "./event-container" import EventContainer from "./event-container"
type OrderPlacedProps = { type OrderPlacedProps = {
event: OrderPlacedEvent event: OrderPlacedEvent
Loaded 100 of 430 files, more files were not shown because too many files have changed in this diff. Show more