@internxt/ui 0.1.21 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/components/data-display/avatar/components/DefaultAvatar.tsx","../src/components/data-display/avatar/components/PictureAvatar.tsx","../src/components/data-display/avatar/Avatar.tsx","../src/components/data-display/card/Card.tsx","../src/hooks/useHotKeys.ts","../src/components/navigation/menu/Menu.tsx","../src/components/overlay/contextMenu/ContextMenu.tsx","../src/assets/icons/check.svg?react","../src/assets/icons/minus.svg?react","../src/components/input/checkbox/Checkbox.tsx","../src/components/data-display/list/ListItem.tsx","../src/components/data-display/list/ListHeader.tsx","../src/components/feedback/skeletonLoader/SkeletonLoader.tsx","../src/components/layout/infiniteScroll/InfiniteScroll.tsx","../src/components/data-display/list/List.tsx","../src/components/data-display/table/Table.tsx","../src/components/feedback/loader/Loader.tsx","../src/components/input/button/Button.tsx","../src/components/feedback/empty/Empty.tsx","../src/components/input/buttonCircle/CircleButton.tsx","../src/components/overlay/tooltip/Tooltip.tsx","../src/components/input/copyable/Copyable.tsx","../src/components/input/input/Input.tsx","../src/components/input/radioButton/RadioButton.tsx","../src/components/input/slider/RangeSlider.tsx","../src/components/input/switch/Switch.tsx","../src/components/input/textArea/TextArea.tsx","../src/components/layout/header/Header.tsx","../src/components/layout/grid/Grid.tsx","../src/components/navigation/dropdown/Dropdown.tsx","../src/components/navigation/breadcrumbs/BreadcrumbsItem.tsx","../src/components/navigation/breadcrumbs/Breadcrumbs.tsx","../src/components/navigation/sidenav/SidenavItem.tsx","../src/components/navigation/sidenav/SidenavOptions.tsx","../src/components/overlay/popover/Popover.tsx","../src/components/navigation/suiteLauncher/SuiteLauncher.tsx","../src/components/navigation/sidenav/SidenavHeader.tsx","../src/components/navigation/sidenav/SidenavStorage.tsx","../src/components/navigation/sidenav/Sidenav.tsx","../src/components/overlay/baseDialog/BaseDialog.tsx","../src/components/overlay/dialog/Dialog.tsx","../src/components/overlay/modal/Modal.tsx","../src/components/overlay/modalTransparent/TransparentModal.tsx","../src/components/mail/cheaps/MessageCheapSkeleton.tsx","../src/components/mail/cheaps/MessageCheap.tsx","../src/components/mail/tray/TrayList.tsx","../src/components/mail/cheaps/user/UserCheap.tsx"],"sourcesContent":["export default function DefaultAvatar({\n fullName,\n diameter,\n className = '',\n}: Readonly<{\n fullName: string;\n diameter: number;\n className?: string;\n}>): JSX.Element {\n const initials = nameToInitials(fullName);\n\n return (\n <div\n style={{ width: diameter, height: diameter, fontSize: diameter / 2.1 }}\n className={`${className} flex shrink-0 select-none items-center justify-center rounded-full bg-primary/20 font-medium text-primary dark:bg-primary/75 dark:text-white`}\n >\n <p>{initials}</p>\n </div>\n );\n}\n\nfunction nameToInitials(fullName: string) {\n if (!fullName) {\n return '';\n }\n\n const trimmedName = fullName?.trim();\n\n if (!trimmedName) {\n return '';\n }\n const namesArray = trimmedName.split(' ');\n if (namesArray.length === 1) return `${namesArray[0].charAt(0)}`;\n else {\n const first = namesArray[0].charAt(0);\n const second = namesArray[1].charAt(0);\n return first + second;\n }\n}\n","export default function PictureAvatar({\n src,\n diameter,\n className = '',\n style = {},\n}: Readonly<{\n src: string;\n diameter: number;\n className?: string;\n style?: Record<string, string | number>;\n}>): JSX.Element {\n return (\n <img\n style={{ width: diameter, height: diameter, ...style }}\n className={`${className} shrink-0 select-none rounded-full object-cover`}\n src={src}\n draggable={false}\n />\n );\n}\n","import DefaultAvatar from './components/DefaultAvatar';\nimport PictureAvatar from './components/PictureAvatar';\n\ntype SIZE_KEYS = 'xxs' | 'xs' | 'sm' | 'base' | 'lg' | 'xl';\n\nconst SIZES: Record<SIZE_KEYS, number> = {\n xxs: 28,\n xs: 36,\n sm: 40,\n base: 48,\n lg: 80,\n xl: 128,\n};\n\n/**\n * Renders an avatar component which can be either a picture or a default avatar with initials.\n *\n * @param {Object} props - The properties for the Avatar component.\n * @param {string} props.fullName - The full name of the user, used to generate initials if no image is provided.\n * @param {number} [props.diameter=80] - The diameter of the avatar in pixels. Ignored if `size` is provided.\n * @param {SIZE_KEYS} [props.size] - Predefined size for the avatar. If provided, overrides the `diameter`.\n * The associated value in `SIZES` will be used as the diameter. Possible values are:\n * - `'xxs'`: 28px\n * - `'xs'`: 36px\n * - `'sm'`: 40px\n * - `'base'`: 48px\n * - `'lg'`: 80px\n * - `'xl'`: 128px\n * @param {string|null} [props.src] - The URL of the image to display as the avatar. If not provided, initials are shown\n * @param {string} [props.className=''] - Additional CSS classes to apply to the avatar component.\n * @param {Object} [props.style={}] - Additional inline styles to apply to the avatar component.\n * @returns {JSX.Element} The rendered avatar component.\n */\n\nconst Avatar = ({\n src,\n diameter = 80,\n size,\n className = '',\n fullName,\n style = {},\n}: {\n fullName: string;\n diameter?: number;\n size?: SIZE_KEYS;\n src?: string | null;\n className?: string;\n style?: Record<string, string | number>;\n}): JSX.Element => {\n const diameterValue = size ? SIZES[size] : diameter;\n\n return src ? (\n <PictureAvatar src={src} diameter={diameterValue} className={className} style={style} />\n ) : (\n <DefaultAvatar diameter={diameterValue} className={className} fullName={fullName} />\n );\n};\n\nexport default Avatar;\n","import { ReactNode } from 'react';\n\n/**\n * Card component\n *\n * @property {string} [className]\n * - Optional additional CSS classes to customize the appearance of the card.\n * By default, the card has rounded corners, border, padding, and shadow.\n *\n * @property {ReactNode} children\n * - The content to be rendered inside the card. This can be any valid React node.\n */\n\nconst Card = ({ className = '', children }: { className?: string; children: ReactNode }): JSX.Element => {\n return (\n <div\n className={`rounded-xl border border-gray-10 bg-surface p-5 shadow-[0_12px_20px_0_rgba(0,0,0,0.02)] dark:bg-gray-1 ${className}`}\n >\n {children}\n </div>\n );\n};\n\nexport default Card;\n","import { useEffect } from 'react';\n\ntype KeyMap = { [key: string]: () => void };\n\nconst useHotkeys = (keyMap: KeyMap, dependencies: unknown[] = []) => {\n const handleKeyDown = (event: KeyboardEvent) => {\n const isInputElement = ['input', 'textarea'].includes(document.activeElement?.tagName.toLowerCase() ?? '');\n\n if (isInputElement && event.key.toLowerCase() !== 'escape') {\n return;\n }\n\n const keyCombination = `${event.ctrlKey ? 'ctrl+' : ''}${event.metaKey ? 'meta+' : ''}${event.key.toLowerCase()}`;\n if (keyMap[keyCombination]) {\n event.preventDefault();\n keyMap[keyCombination]();\n }\n };\n\n useEffect(() => {\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, dependencies);\n};\n\nexport default useHotkeys;\n","import { isValidElement, ReactNode, useEffect, useState } from 'react';\nimport useHotkeys from '../../../hooks/useHotKeys';\n\nexport type MenuItemType<T> =\n | { separator: true }\n | {\n name?: string;\n separator?: false;\n disabled?: (target: T) => boolean;\n isTitle?: (target: T) => boolean;\n icon?: React.ForwardRefExoticComponent<{ size?: number | string }>;\n keyboardShortcutOptions?: {\n keyboardShortcutIcon?: React.ForwardRefExoticComponent<{ size?: number | string }>;\n keyboardShortcutText?: string;\n };\n\n action?: (target: T) => void | Promise<void>;\n onClick?: () => void;\n node?: ReactNode;\n };\n\nexport type MenuItemsType<T> = Array<MenuItemType<T>>;\n\nexport interface MenuProps<T> {\n item?: T;\n isOpen: boolean;\n menu?: MenuItemsType<T>;\n handleMenuClose: () => void;\n genericEnterKey?: () => void;\n paddingX?: string;\n paddingY?: string;\n}\n\n/**\n * Menu component\n *\n * @template T\n * @param {MenuProps<T>} props - Properties of the Menu component.\n *\n * @property {T} [item]\n * - Optional item that may be used in menu actions (e.g., data passed for actions).\n *\n * @property {boolean} [isOpen]\n * - To know is Menu is visible.\n *\n * @property {MenuItemsType<T>} [menu]\n * - Optional array of menu items. Each item can define a separator, title, icon, action, etc.\n *\n * @property {() => void} handleMenuClose\n * - Function to close the menu.\n *\n * @property {() => void} [genericEnterKey]\n * - Optional callback for when the Enter key is pressed without selecting a menu item.\n *\n * @property {string} [paddingX='px-4']\n * - Optional padding for the X axis (horizontal) of each menu item. Defaults to `px-4`.\n *\n * @property {string} [paddingY='py-1.5']\n * - Optional padding for the Y axis (vertical) of each menu item. Defaults to `py-1.5`.\n *\n * @returns {JSX.Element}\n * - The rendered Menu component.\n *\n * The component handles key events such as Arrow Down, Arrow Up, and Enter for navigation and action execution.\n * It also supports mouse interactions for hovering and selecting menu items.\n *\n * Each menu item can have an action, an optional keyboard shortcut, and an icon.\n * If the item is disabled or marked as a title, it won't be clickable.\n *\n * It features a dynamic index for item selection, with keyboard and mouse-based navigation.\n */\n\nconst Menu = <T,>({\n item,\n menu,\n isOpen,\n genericEnterKey,\n handleMenuClose,\n paddingX = 'px-4',\n paddingY = 'py-1.5',\n}: MenuProps<T>): JSX.Element => {\n const [selectedIndex, setSelectedIndex] = useState<number | null>(null);\n const [enterPressed, setEnterPressed] = useState<boolean>(false);\n const handleMouseEnter = (index: number) => {\n setSelectedIndex(index);\n };\n\n const isUnClickableItem = (menuItem: MenuItemType<T>) =>\n menuItem?.separator || (item && menuItem?.disabled?.(item)) || (item && menuItem?.isTitle?.(item));\n\n const handleArrowDown = () => {\n menu &&\n isOpen &&\n setSelectedIndex((prevIndex) => {\n const getNextEnabledIndex = (startIndex: number): number => {\n let newIndex = startIndex;\n let menuItem = menu[newIndex];\n while (isUnClickableItem(menuItem)) {\n newIndex = (newIndex + 1) % menu.length;\n menuItem = menu[newIndex];\n if (startIndex === newIndex) break;\n }\n return newIndex;\n };\n\n const newCurrentIndex = prevIndex === null ? 0 : (prevIndex + 1) % menu.length;\n const newIndex = getNextEnabledIndex(newCurrentIndex);\n const menuItem = menu[newIndex];\n return isUnClickableItem(menuItem) ? null : newIndex;\n });\n };\n\n const handleArrowUp = () => {\n menu &&\n isOpen &&\n setSelectedIndex((prevIndex) => {\n const getPreviousEnabledIndex = (startIndex: number): number => {\n let newIndex = startIndex;\n let menuItem = menu[newIndex];\n while (isUnClickableItem(menuItem)) {\n newIndex = (newIndex - 1 + menu.length) % menu.length;\n menuItem = menu[newIndex];\n if (startIndex === newIndex) break;\n }\n return newIndex;\n };\n\n const newCurrentIndex = prevIndex === null ? menu.length - 1 : (prevIndex - 1 + menu.length) % menu.length;\n const newIndex = getPreviousEnabledIndex(newCurrentIndex);\n const menuItem = menu[newIndex];\n return isUnClickableItem(menuItem) ? null : newIndex;\n });\n };\n\n const handleEnterKey = () => {\n menu &&\n isOpen &&\n setSelectedIndex((prevIndex) => {\n if (prevIndex !== null) {\n const menuItem = menu ? menu[prevIndex] : undefined;\n if (item && menuItem && 'action' in menuItem && menuItem.action) menuItem.action(item);\n if (item && menuItem && 'node' in menuItem && menuItem.node && isValidElement(menuItem.node)) {\n const onClick = menuItem.node.props.onClick;\n onClick && onClick();\n }\n } else if (genericEnterKey) genericEnterKey();\n setEnterPressed(true);\n return null;\n });\n };\n\n useEffect(() => {\n if (enterPressed) {\n handleMenuClose();\n setEnterPressed(false);\n }\n }, [enterPressed]);\n\n useHotkeys(\n {\n arrowdown: handleArrowDown,\n arrowup: handleArrowUp,\n enter: handleEnterKey,\n },\n [isOpen],\n );\n\n return (\n <div className={`z-20 mt-0 flex flex-col rounded-lg bg-surface ${paddingY} outline-none dark:bg-gray-5`}>\n {menu?.map((option, i) => (\n <div key={i}>\n {option && option.separator ? (\n <div className=\"my-0.5 flex w-full flex-row px-4\">\n <div className=\"h-px w-full bg-gray-10\" />\n </div>\n ) : (\n option && (\n <div\n className={`${isUnClickableItem(option) ? 'pointer-events-none' : ''}`}\n onClick={(e) => {\n if (!isUnClickableItem(option)) {\n e.stopPropagation();\n item && option.action?.(item);\n option.onClick && option.onClick();\n handleMenuClose();\n }\n }}\n onMouseEnter={() => handleMouseEnter(i)}\n >\n <div\n className={`flex cursor-pointer flex-row whitespace-nowrap ${paddingX} ${paddingY} text-base\n ${item && option.disabled?.(item) && 'font-medium text-gray-50'}\n ${item && option.isTitle?.(item) && !option.disabled?.(item) && 'font-medium text-gray-100'}\n ${selectedIndex === i && item && !option.disabled?.(item) && 'bg-gray-5 text-gray-100 dark:bg-gray-10'}\n ${item && !option.disabled?.(item) && !option.isTitle?.(item) && selectedIndex !== i && 'text-gray-80'}\n `}\n >\n {option.node ? (\n option.node\n ) : (\n <div className=\"flex flex-row items-center space-x-2\">\n {option.icon && <option.icon size={20} />}\n <span>{option.name}</span>\n </div>\n )}\n {option.keyboardShortcutOptions && (\n <span className=\"ml-5 flex grow items-center justify-end text-sm text-gray-40\">\n {option.keyboardShortcutOptions?.keyboardShortcutIcon && (\n <option.keyboardShortcutOptions.keyboardShortcutIcon size={14} />\n )}\n {option.keyboardShortcutOptions?.keyboardShortcutText ?? ''}\n </span>\n )}\n </div>\n </div>\n )\n )}\n </div>\n ))}\n </div>\n );\n};\n\nexport default Menu;\n","import Menu, { MenuItemsType } from '../../navigation/menu/Menu';\n\nconst MENU_BUTTON_HEIGHT = 40;\n\nexport interface ContextMenuProps<T> {\n item: T;\n menuItemsRef: React.MutableRefObject<HTMLDivElement | null>;\n menu?: MenuItemsType<T>;\n openedFromRightClick: boolean;\n isOpen: boolean;\n posX: number;\n posY: number;\n isContextMenuCutOff: boolean;\n genericEnterKey: () => void;\n handleMenuClose: () => void;\n}\n\n/**\n * Properties for `ContextMenuProps<T>`\n *\n * @template T - Generic type representing the item to which the context menu applies.\n *\n * @property {T} item\n * - The current item associated with the context menu.\n * This object is passed to each menu option's `action` and `disabled` functions.\n *\n * @property {React.MutableRefObject<HTMLDivElement | null>} menuItemsRef\n * - A mutable ref to the `div` containing the context menu. Used for handling the menu's positioning and visibility.\n *\n * @property {MenuType<T>} [menu]\n * - An array of menu options, where each option includes properties like `name`, `icon`, `action`, etc.\n * The `MenuType<T>` type allows some options to be separators (`separator: boolean`).\n *\n * @property {boolean} openedFromRightClick\n * - Indicates whether the context menu was opened via a right-click (`true`).\n * Determines whether the menu's position is set based on the click location or a predefined position.\n *\n * @property {boolean} [isOpen]\n * - To know is Menu is visible.\n *\n * @property {number} posX\n * - X-coordinate for the menu's position, used if `openedFromRightClick` is `true`.\n *\n * @property {number} posY\n * - Y-coordinate for the menu's position, used if `openedFromRightClick` is `true`.\n *\n * @property {boolean} isContextMenuCutOff\n * - Specifies whether the menu should align to the bottom of the screen to prevent it\n * from being cut off on smaller screens. Switches menu positioning between top or bottom.\n *\n * @property {() => void} genericEnterKey\n * - A callback that executes if the Enter key is pressed without a selected menu option.\n * Can be used to define a default action.\n *\n * @property {() => void} handleMenuClose\n * - Function to close the context menu. Called after an action is executed or when pressing Enter in the menu.\n */\n\nconst ContextMenu = <T,>({\n item,\n menuItemsRef,\n menu,\n openedFromRightClick,\n posX,\n posY,\n isContextMenuCutOff,\n isOpen,\n genericEnterKey,\n handleMenuClose,\n}: ContextMenuProps<T>): JSX.Element => {\n return (\n <div\n className=\"z-20 mt-0 flex flex-col rounded-lg bg-surface py-1.5 shadow-subtle-hard outline-none dark:bg-gray-5\"\n style={\n openedFromRightClick\n ? { position: 'absolute', left: posX, top: posY, zIndex: 99 }\n : {\n position: 'absolute',\n right: 20,\n [isContextMenuCutOff ? 'bottom' : 'top']: MENU_BUTTON_HEIGHT,\n zIndex: 9999,\n }\n }\n ref={menuItemsRef}\n >\n <Menu\n item={item}\n isOpen={isOpen}\n genericEnterKey={genericEnterKey}\n handleMenuClose={handleMenuClose}\n menu={menu}\n />\n </div>\n );\n};\n\nexport default ContextMenu;\n","import * as React from \"react\";\nconst SvgCheck = (props) => /* @__PURE__ */ React.createElement(\"svg\", { fill: \"none\", height: 20, viewBox: \"0 0 20 20\", width: 20, xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m8.85955 15c.38202 0 .67978-.1461.88202-.4551l5.23593-8.00557c.1461-.22472.2079-.43259.2079-.62922 0-.52809-.3933-.91011-.9326-.91011-.3708 0-.6011.13483-.8258.48876l-4.59554 7.24724-2.33146-2.8933c-.20787-.24719-.43259-.35955-.74719-.35955-.54495 0-.9382.38764-.9382.91575 0 .2359.07303.4438.27528.6741l2.89887 3.5113c.24158.2865.51124.4157.87079.4157z\", fill: \"currentColor\" }));\nexport default SvgCheck;\n","import * as React from \"react\";\nconst SvgMinus = (props) => /* @__PURE__ */ React.createElement(\"svg\", { fill: \"none\", height: 20, viewBox: \"0 0 20 20\", width: 20, xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"rect\", { fill: \"currentColor\", height: 2, rx: 1, width: 12, x: 4, y: 9 }));\nexport default SvgMinus;\n","/// <reference types=\"vite-plugin-svgr/client\" />\nimport Check from '../../../assets/icons/check.svg?react';\nimport Minus from '../../../assets/icons/minus.svg?react';\n\nexport interface CheckboxProps {\n id?: string;\n checked?: boolean;\n indeterminate?: boolean;\n onClick?: React.DOMAttributes<HTMLLabelElement>['onClick'];\n required?: boolean;\n className?: string;\n checkboxDataCy?: string;\n disabled?: boolean;\n}\n\n/**\n * Checkbox component\n *\n * @property {string} [id]\n * - Optional ID for the checkbox input element, useful for accessibility and styling.\n *\n * @property {boolean} [checked]\n * - Controls whether the checkbox is checked. Defaults to true.\n * - If true, the checkbox appears checked.\n * - If false, the checkbox appears unchecked.\n *\n * @property {boolean} [indeterminate]\n * - If true, the checkbox appears in an indeterminate state (a visual state between checked and unchecked).\n * - This state is typically used for a parent checkbox representing a partial selection of child checkboxes.\n *\n * @property {React.DOMAttributes<HTMLLabelElement>['onClick']} [onClick]\n * - Function called when the checkbox label is clicked. It is triggered only if the checkbox is not disabled.\n * - Accepts an event object from the click event.\n *\n * @property {boolean} [required]\n * - If true, marks the checkbox as required in form validation.\n * - Defaults to false.\n *\n * @property {string} [className]\n * - Custom CSS classes for additional styling of the checkbox container element.\n *\n * @property {string} [checkboxDataCy]\n * - Custom data attribute for the checkbox element.\n *\n * @property {boolean} [disabled]\n * - Disables the checkbox, preventing user interaction and applying a disabled style.\n * - If true, the checkbox cannot be checked or unchecked.\n * - Defaults to false.\n */\n\nconst Checkbox = ({\n id,\n checked = true,\n indeterminate = false,\n onClick,\n required,\n className,\n checkboxDataCy,\n disabled = false,\n}: CheckboxProps): JSX.Element => {\n return (\n <label\n className={`relative h-5 w-5 rounded focus-within:outline-primary ${className}`}\n onClick={disabled ? undefined : onClick}\n onKeyDown={() => {}}\n >\n <div\n onClick={(e) => e.preventDefault()}\n data-cy={checkboxDataCy}\n onKeyDown={() => {}}\n className={`relative flex h-5 w-5 cursor-pointer flex-col items-center justify-center rounded border text-white ${\n !disabled\n ? indeterminate || checked\n ? 'border-primary bg-primary'\n : 'border-gray-30 hover:border-gray-40'\n : indeterminate || checked\n ? 'bg-gray-20 cursor-auto'\n : 'border-gray-10 cursor-auto'\n }`}\n >\n {indeterminate ? <Minus className=\"absolute -inset-px\" /> : checked && <Check className=\"absolute -inset-px\" />}\n </div>\n <input\n id={id}\n checked={checked}\n type=\"checkbox\"\n required={required ?? false}\n readOnly\n className=\"base-checkbox h-0 w-0 appearance-none opacity-0\"\n disabled={disabled}\n />\n </label>\n );\n};\n\nexport default Checkbox;\n","import { LegacyRef, useEffect, useRef, useState } from 'react';\nimport { DotsThree } from '@phosphor-icons/react';\nimport ContextMenu from '../../overlay/contextMenu/ContextMenu';\nimport useHotkeys from '../../../hooks/useHotKeys';\nimport Checkbox from '../../input/checkbox/Checkbox';\nimport { MenuItemsType } from '../../navigation/menu/Menu';\n\ninterface ListItemProps<T> {\n item: T;\n listIndex: number;\n itemComposition: Array<(props: T) => JSX.Element>;\n selected: boolean;\n isOpen: boolean;\n columnsWidth: Array<string>;\n onClose: () => void;\n onSelectedChanged: (value: boolean) => void;\n onDoubleClick?: () => void;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n onClickContextMenu?: (e: React.MouseEvent<HTMLDivElement>) => void;\n onThreeDotsButtonPressed?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n menu?: MenuItemsType<T>;\n disableItemCompositionStyles?: boolean;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n genericEnterKey: () => void;\n}\nconst TOP_MIN_HEIGHT = 500;\n\nconst ListItem = <T extends { id: number }>({\n item,\n listIndex,\n itemComposition,\n selected,\n isOpen,\n columnsWidth,\n onClose,\n onSelectedChanged,\n onDoubleClick,\n onClick,\n onClickContextMenu,\n onThreeDotsButtonPressed,\n disableItemCompositionStyles,\n menu,\n onMouseEnter,\n onMouseLeave,\n genericEnterKey,\n}: ListItemProps<T>): JSX.Element => {\n const menuButtonRef = useRef<HTMLButtonElement | undefined>();\n const rootWrapperRef = useRef<HTMLDivElement | null>(null);\n const menuItemsRef = useRef<HTMLDivElement | null>(null);\n\n const [openedFromRightClick, setOpenedFromRightClick] = useState(false);\n const [posX, setPosX] = useState(0);\n const [posY, setPosY] = useState(0);\n const [dimensions, setDimensions] = useState({ width: 0, height: 0 });\n const [isContextMenuCutOff, setIsContextMenuCutOff] = useState(false);\n\n useEffect(() => {\n if (\n menuItemsRef.current &&\n (menuItemsRef.current.offsetHeight !== dimensions.height ||\n menuItemsRef.current?.offsetWidth !== dimensions.width)\n )\n setDimensions({\n width: menuItemsRef.current.offsetWidth,\n height: menuItemsRef.current.offsetHeight,\n });\n }, [dimensions.height, dimensions.width]);\n\n useEffect(() => {\n if (!openedFromRightClick) handleOpenPosition();\n\n if (!isOpen) {\n setOpenedFromRightClick(false);\n setPosX(0);\n setPosY(0);\n }\n }, [isOpen]);\n\n function handleOpenPosition() {\n const element = menuButtonRef.current;\n const contextMenuHeight = menuItemsRef?.current?.offsetHeight || 300;\n if (!element) return;\n if (!contextMenuHeight) return;\n\n const { bottom } = element.getBoundingClientRect();\n const windowHeight = window.innerHeight;\n\n const isContextCutOff = bottom + contextMenuHeight > windowHeight;\n setIsContextMenuCutOff(isContextCutOff);\n }\n\n const handleContextMenuClick = (event: React.MouseEvent<HTMLDivElement>) => {\n event.preventDefault();\n\n onClickContextMenu?.(event);\n const childWidth = menuItemsRef?.current?.offsetWidth || 240;\n const childHeight = menuItemsRef?.current?.offsetHeight || 300;\n const wrapperRect = rootWrapperRef?.current?.getBoundingClientRect();\n const { innerWidth, innerHeight } = window;\n let x = event.clientX - (wrapperRect?.left || 0);\n let y = event.clientY - (wrapperRect?.top || 0);\n\n if (event.clientX + childWidth > innerWidth) {\n x = x - childWidth;\n }\n\n if (event.clientY + childHeight > innerHeight && event.clientY > TOP_MIN_HEIGHT) {\n y = y - childHeight;\n }\n\n setPosX(x);\n setPosY(y);\n setOpenedFromRightClick(true);\n };\n\n const handleContextMenuDotsButton = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n\n onThreeDotsButtonPressed?.(event);\n setOpenedFromRightClick(false);\n };\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n onClick?.(event);\n openedFromRightClick && handleMenuClose();\n };\n\n const handleMenuClose = () => {\n onClose();\n };\n\n const handleEnterKey = () => {\n if (!isOpen) {\n genericEnterKey();\n }\n };\n\n useHotkeys(\n {\n r: handleMenuClose,\n backspace: handleMenuClose,\n enter: handleEnterKey,\n },\n [],\n );\n\n return (\n <div\n onDoubleClick={onDoubleClick}\n onClick={handleClick}\n onContextMenu={handleContextMenuClick}\n ref={rootWrapperRef}\n className={`group relative flex h-14 flex-row items-center pl-14 pr-5 ${\n selected ? 'bg-primary/10 text-gray-100 dark:bg-primary/20' : 'focus-within:bg-gray-1 hover:bg-gray-1'\n } ${isOpen ? 'z-40' : ''}`}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {isOpen && selected && (\n <ContextMenu\n item={item}\n menu={menu}\n menuItemsRef={menuItemsRef}\n openedFromRightClick={openedFromRightClick}\n isOpen={isOpen}\n posX={posX}\n posY={posY}\n isContextMenuCutOff={isContextMenuCutOff}\n genericEnterKey={genericEnterKey}\n handleMenuClose={handleMenuClose}\n />\n )}\n\n <div\n className={`absolute left-5 top-0 flex h-full w-0 flex-row items-center justify-start p-0 opacity-0 focus-within:opacity-100 group-hover:opacity-100 ${\n selected && 'opacity-100'\n }`}\n >\n <Checkbox\n onClick={(e) => {\n e.stopPropagation();\n onSelectedChanged(!selected);\n }}\n checked={selected}\n checkboxDataCy={`driveListItemCheckbox${listIndex}`}\n />\n </div>\n {disableItemCompositionStyles ? (\n <div\n key={0}\n className={`grow-1 relative flex h-full w-full flex-row items-center border-b ${\n selected ? 'border-primary/5' : 'border-gray-5'\n }`}\n >\n {itemComposition[0](item)}\n </div>\n ) : (\n new Array(itemComposition.length).fill(0).map((_col, i) => (\n <div\n key={i}\n className={`relative flex h-full shrink-0 flex-row items-center border-b ${\n selected ? 'border-primary/5' : 'border-gray-5'\n } ${columnsWidth[i]}`}\n >\n {itemComposition[i](item)}\n </div>\n ))\n )}\n <div\n className={`flex h-14 w-12 shrink-0 flex-col items-center justify-center border-b ${\n selected ? 'border-primary/5' : 'border-gray-5'\n }`}\n >\n <button\n ref={menuButtonRef as LegacyRef<HTMLButtonElement>}\n className={`flex h-10 w-10 flex-col items-center justify-center rounded-md opacity-0 outline-none focus-visible:opacity-100 group-hover:opacity-100 ${\n selected\n ? 'text-gray-80 hover:bg-primary/10 focus-visible:bg-primary/10'\n : 'text-gray-60 hover:bg-gray-10 focus-visible:bg-gray-10'\n }`}\n onClick={(e) => {\n handleContextMenuDotsButton(e);\n }}\n >\n <DotsThree size={24} weight=\"bold\" />\n </button>\n </div>\n </div>\n );\n};\n\nexport default ListItem;\n","import { ArrowDown, ArrowUp } from '@phosphor-icons/react';\nimport Checkbox from '../../input/checkbox/Checkbox';\nimport { MenuItemsType } from '../../navigation/menu/Menu';\n\nexport type HeaderProps<T, F> = {\n label: string;\n width: string;\n} & (\n | { name: F; orderable: true; defaultDirection: 'ASC' | 'DESC'; buttonDataCy?: string; textDataCy?: string }\n | { name: keyof T; orderable: false }\n);\n\ninterface ListHeaderProps<T, F> {\n selectedItems: T[];\n items: T[];\n header: HeaderProps<T, F>[];\n isVerticalScrollbarVisible: boolean | null;\n orderBy?: { field: F; direction: 'ASC' | 'DESC' };\n menu?: MenuItemsType<T>;\n displayMenuDiv?: boolean;\n checkboxDataCy?: string;\n onTopSelectionCheckboxClick: () => void;\n onOrderableColumnClicked: (column: HeaderProps<T, F>) => void;\n onClose?: () => void;\n}\n\nconst ListHeader = <T, F extends keyof T>({\n selectedItems,\n onTopSelectionCheckboxClick,\n items,\n header,\n orderBy,\n onOrderableColumnClicked,\n menu,\n displayMenuDiv,\n isVerticalScrollbarVisible,\n checkboxDataCy,\n onClose,\n}: ListHeaderProps<T, F>) => {\n return (\n <div onClick={onClose} onContextMenu={onClose} className=\"flex min-w-max h-12 shrink-0 flex-row px-5\">\n {/* COLUMN */}\n <div className=\"flex h-full min-w-full flex-row items-center border-b border-gray-10\">\n {/* SELECTION CHECKBOX */}\n <div className=\"flex h-full flex-row items-center justify-between pr-4\">\n <Checkbox\n checked={selectedItems.length > 0}\n indeterminate={items.length > selectedItems.length && selectedItems.length > 0}\n onClick={onTopSelectionCheckboxClick}\n checkboxDataCy={checkboxDataCy}\n />\n </div>\n\n {header.map((column) => (\n <button\n onClick={\n column.orderable\n ? () => {\n onOrderableColumnClicked(column);\n }\n : undefined\n }\n key={column.name.toString()}\n data-cy={'buttonDataCy' in column && column?.buttonDataCy}\n className={`flex h-full shrink-0 flex-row items-center space-x-1.5 text-base font-medium text-gray-60 ${\n column.width\n } ${column.orderable ? 'cursor-pointer hover:text-gray-80' : ''}`}\n >\n <span data-cy={'textDataCy' in column && column?.textDataCy}>{column.label}</span>\n {column.name === orderBy?.field &&\n column.orderable &&\n (orderBy?.direction === 'ASC' ? (\n <ArrowUp size={14} weight=\"bold\" />\n ) : (\n <ArrowDown size={14} weight=\"bold\" />\n ))}\n </button>\n ))}\n {isVerticalScrollbarVisible && <div className=\"mr-15px\" />}\n {(menu || displayMenuDiv) && <div className=\"flex h-full w-12 shrink-0\" />}\n </div>\n </div>\n );\n};\n\nexport default ListHeader;\n","export interface SkeletonLoaderItemProps {\n skeletonItem: Array<React.ReactElement> | undefined;\n columns: Array<string>;\n}\n\nexport interface SkeletonLoaderProps {\n skeleton: Array<SkeletonLoaderItemProps>;\n}\n\nexport const SkeletonLoaderItem = ({ skeletonItem, columns }: SkeletonLoaderItemProps): React.ReactElement => {\n return (\n <div\n data-testid=\"skeleton-loader-item\"\n className={'group relative flex h-14 animate-pulse flex-row items-center px-5'}\n >\n <div className=\"w-9 shrink-0\" />\n {new Array(columns.length).fill(0).map((col, i) => (\n <div\n key={`${col}-${i}`}\n className={`relative flex h-full shrink-0 flex-row items-center overflow-hidden whitespace-nowrap border-b border-gray-5 ${columns[i]}`}\n >\n {skeletonItem?.[i]}\n </div>\n ))}\n <div className=\"flex h-14 w-12 shrink-0 flex-col items-center justify-center border-b border-gray-5\" />\n </div>\n );\n};\n\n/**\n * SkeletonLoader component to display loading placeholders in list layouts.\n *\n * @param skeleton - Array of skeleton items, {skeletonItem, columns}\n * - The params of each skeletonItem:\n * - skeletonItem: - Array of elements representing the loading placeholders.\n * - columns: - An array of CSS class names for each column, defining their layout and style.\n *\n */\nconst SkeletonLoader = ({ skeleton }: SkeletonLoaderProps): React.ReactElement => {\n return (\n <>\n {new Array(skeleton.length).fill(0).map((_col, i) => (\n <SkeletonLoaderItem\n key={`skinSkeletonRow${i}`}\n skeletonItem={skeleton[i].skeletonItem}\n columns={skeleton[i].columns}\n />\n ))}\n </>\n );\n};\n\nexport default SkeletonLoader;\n","import React from 'react';\nimport { useRef, useEffect, ReactNode, useState } from 'react';\n\nexport interface InfiniteScrollProps {\n children: ReactNode;\n handleNextPage: () => void;\n hasMoreItems: boolean | undefined;\n loader: React.ReactNode;\n scrollableTarget?: string;\n classNameLoader?: string;\n}\n\n/**\n * InfiniteScroll component\n *\n * @param {InfiniteScrollProps} props - The properties of the component.\n *\n * @property {ReactNode} children\n * - The child components or elements to be rendered inside the scrollable container.\n *\n * @property {() => void} handleNextPage\n * - A callback function that is triggered when the user reaches the bottom of the container\n * and more items need to be loaded.\n *\n * @property {boolean | undefined} hasMoreItems\n * - A flag indicating whether there are more items to load. If `false`, the loader will not be shown,\n * and no more items will be fetched.\n *\n * @property {React.ReactNode} loader\n * - The content to be shown as a loader while waiting for more items to load.\n *\n * @property {string} [scrollableTarget]\n * - An optional ID of the scrollable container that will be observed for scroll events.\n * If not provided, the default behavior is to observe the entire window.\n *\n * @property {string} [classNameLoader]\n * - An optional custom class name for the loader element, used to style the loader component.\n *\n * @returns {JSX.Element}\n * - A JSX element containing the children with the loader attached to the last item, if there are more items to load.\n *\n * The component uses the `IntersectionObserver` API to detect when the loader element (at the bottom of the list)\n * comes into view. When this happens, it triggers the `handleNextPage` callback to load the next set of items.\n * It also shows the loader element only when there are more items to load (`hasMoreItems` is `true`).\n */\n\nconst InfiniteScroll = ({\n children,\n handleNextPage,\n hasMoreItems,\n loader,\n scrollableTarget,\n classNameLoader,\n}: InfiniteScrollProps) => {\n const loaderRef = useRef<HTMLDivElement>(null);\n const scrollContainerRef = useRef<HTMLElement | null>(null);\n const [showLoader, setShowLoader] = useState<boolean>(false);\n\n useEffect(() => {\n if (scrollableTarget) {\n scrollContainerRef.current = document.getElementById(scrollableTarget);\n }\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n if (hasMoreItems) {\n handleNextPage();\n setShowLoader(true);\n } else {\n setShowLoader(false);\n }\n }\n },\n {\n root: scrollContainerRef.current || null,\n rootMargin: '100px',\n threshold: 0,\n },\n );\n\n const currentLoaderRef = loaderRef.current;\n if (currentLoaderRef) {\n observer.observe(currentLoaderRef);\n }\n\n return () => {\n currentLoaderRef && observer.unobserve(currentLoaderRef);\n };\n }, [hasMoreItems, handleNextPage, scrollableTarget]);\n\n const childrenWithLoader = React.Children.map(children, (child, index) => {\n if (index === React.Children.count(children) - 1 && hasMoreItems) {\n return (\n <>\n {child}\n <div ref={loaderRef} className={classNameLoader}>\n {showLoader && loader}\n </div>\n </>\n );\n }\n return child;\n });\n\n return <div>{childrenWithLoader}</div>;\n};\n\nexport default InfiniteScroll;\n","import React, { ReactNode, useEffect, useRef, useState } from 'react';\nimport ListItem from './ListItem';\nimport ListHeader, { HeaderProps } from './ListHeader';\nimport useHotkeys from '../../../hooks/useHotKeys';\nimport { SkeletonLoader } from '../../feedback/skeletonLoader';\nimport { InfiniteScroll } from '../../layout/infiniteScroll';\nimport { MenuItemsType } from '../../navigation/menu/Menu';\n\nexport interface ListProps<T, F> {\n header: HeaderProps<T, F>[];\n checkboxDataCy?: string;\n items: T[];\n itemComposition: Array<(props: T) => JSX.Element>;\n selectedItems: T[];\n onClick?: (props: T) => void;\n onDoubleClick?: (props: T) => void;\n onEnterPressed?: (props: T) => void;\n onSelectedItemsChanged: (changes: { props: T; value: boolean }[]) => void;\n isLoading?: boolean;\n forceLoading?: boolean;\n skinSkeleton?: Array<JSX.Element>;\n emptyState?: ReactNode;\n onNextPage?: () => void;\n onOrderByChanged?: (value: { field: F; direction: 'ASC' | 'DESC' }) => void;\n orderBy?: { field: F; direction: 'ASC' | 'DESC' };\n hasMoreItems?: boolean;\n menu?: MenuItemsType<T>;\n displayMenuDiv?: boolean;\n className?: string;\n keyboardShortcuts?: Array<'selectAll' | 'unselectAll' | 'multiselect' | Array<'delete' & (() => void)>>;\n disableKeyboardShortcuts?: boolean;\n disableItemCompositionStyles?: boolean;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n headerBackgroundColor?: string;\n keyBoardShortcutActions?: {\n onShiftFKeysPressed?: () => void;\n onRKeyPressed?: () => void;\n onBackspaceKeyPressed?: () => void;\n };\n}\n\n/**\n * List component\n *\n * @property {HeaderProps<T, F>[]} header\n * - Array of headers for the list. Each header defines the properties of the columns displayed.\n *\n * @property {string} [checkboxDataCy]\n * - Optional `data-cy` attribute used for testing checkboxes in the list.\n *\n * @property {T[]} items\n * - Array of items to be displayed in the list. Each item corresponds to the data for each row.\n *\n * @property {(props: T) => JSX.Element}[] itemComposition\n * - Array of functions that return JSX elements for rendering each item in the list.\n *\n * @property {T[]} selectedItems\n * - Array of selected items.\n *\n * @property {(props: T) => void} [onClick]\n * - Optional callback triggered when an item is clicked.\n *\n * @property {(props: T) => void} [onDoubleClick]\n * - Optional callback triggered when an item is double-clicked.\n *\n * @property {(props: T) => void} [onEnterPressed]\n * - Optional callback triggered when the Enter key is pressed on an item.\n *\n * @property {(changes: { props: T; value: boolean }[]) => void} onSelectedItemsChanged\n * - Callback triggered when the selection state of the items changes.\n *\n * @property {boolean} [isLoading]\n * - Optional flag indicating if the list is loading. If true, a loading state will be shown.\n *\n * @property {boolean} [forceLoading]\n * - Optional flag to force the loading state, even if no items are loading.\n *\n * @property {JSX.Element[]} [skinSkeleton]\n * - Optional array of skeleton elements to be displayed while the list is loading.\n *\n * @property {ReactNode} [emptyState]\n * - Optional content to display when there are no items in the list and no loading state.\n *\n * @property {() => void} [onNextPage]\n * - Optional callback triggered when the user scrolls to load the next page of items.\n *\n * @property {({ field: F; direction: 'ASC' | 'DESC' }) => void} [onOrderByChanged]\n * - Optional callback triggered when the user changes the sorting order of the list.\n *\n * @property {{ field: F; direction: 'ASC' | 'DESC' }} [orderBy]\n * - Optional object specifying the current sorting state of the list.\n *\n * @property {boolean} [hasMoreItems]\n * - Optional flag indicating if there are more items to load.\n *\n * @property {MenuItemsType<T>} [menu]\n * - Optional menu items to be displayed for each item in the list.\n *\n * @property {boolean} [displayMenuDiv]\n * - Optional flag to control whether the menu is displayed as a separate div.\n *\n * @property {string} [className]\n * - Optional CSS class name to apply additional styles to the list container.\n *\n * @property {Array<'selectAll' | 'unselectAll' | 'multiselect' | Array<'delete' & (() => void)>>} [keyboardShortcuts]\n * - Optional array of keyboard shortcut actions to be handled.\n *\n * @property {boolean} [disableKeyboardShortcuts]\n * - Optional flag to disable keyboard shortcuts for the list.\n *\n * @property {boolean} [disableItemCompositionStyles]\n * - Optional flag to disable custom styles for item composition.\n *\n * @property {() => void} [onMouseEnter]\n * - Optional callback triggered when the mouse enters the list.\n *\n * @property {() => void} [onMouseLeave]\n * - Optional callback triggered when the mouse leaves the list.\n *\n * @property {string} [headerBackgroundColor]\n * - Optional background color for the header.\n *\n * @property {\n * { onShiftFKeysPressed?: () => void; onRKeyPressed?: () => void; onBackspaceKeyPressed?: () => void }\n * } [keyBoardShortcutActions]\n * - Optional object with custom actions for specific keyboard shortcuts like Shift+F, R, and Backspace.\n *\n * @returns {JSX.Element}\n * - The rendered list component.\n */\n\nconst List = <T extends { id: number }, F extends keyof T>({\n header,\n checkboxDataCy,\n items,\n itemComposition,\n selectedItems,\n onClick,\n onDoubleClick,\n onEnterPressed,\n onSelectedItemsChanged,\n isLoading,\n forceLoading,\n skinSkeleton,\n emptyState,\n orderBy,\n onOrderByChanged,\n onNextPage,\n hasMoreItems,\n menu,\n displayMenuDiv,\n className,\n disableItemCompositionStyles,\n onMouseEnter,\n onMouseLeave,\n headerBackgroundColor = 'bg-surface',\n keyBoardShortcutActions,\n disableKeyboardShortcuts,\n}: ListProps<T, F>): JSX.Element => {\n const containerRef = useRef<HTMLDivElement>(null);\n const isItemSelected = (item: T) => {\n return selectedItems.some((i) => item.id === i.id);\n };\n const container = document.getElementById('scrollableList');\n const isVerticalScrollbarVisible = container && container.scrollHeight > container.clientHeight;\n const isEmptyState = !hasMoreItems && items.length === 0 && !isLoading;\n const [idItemContextMenuOpen, setIdItemContextMenuOpen] = useState<number | null>(null);\n\n const skeletonData = new Array(25).fill(0).map(() => ({\n skeletonItem: skinSkeleton,\n columns: header.map((column) => column.width),\n }));\n\n const loader = <SkeletonLoader skeleton={skeletonData} />;\n\n useEffect(() => {\n const handleClickOutside = (e: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n setIdItemContextMenuOpen(null);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('contextmenu', handleClickOutside);\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('contextmenu', handleClickOutside);\n };\n }, []);\n\n const handleNextPage = () => {\n onNextPage?.();\n };\n\n const unselectAllItems = () => {\n const changesToMake = selectedItems.map((item) => ({ props: item, value: false }));\n onSelectedItemsChanged(changesToMake);\n };\n\n const unselectAllItemsAndSelectOne = (props: T) => {\n const changesToMake = [...selectedItems.map((item) => ({ props: item, value: false })), { props, value: true }];\n onSelectedItemsChanged(changesToMake);\n };\n\n const executeClickOnSelectedItem = () => {\n const oneItemSelected = selectedItems.length === 1;\n if (oneItemSelected) {\n const selectedItem = selectedItems[0];\n onEnterPressed?.(selectedItem);\n }\n };\n\n const selectAllItems = () => {\n const notSelectedItems = items.filter((item) => !selectedItems.some((s) => s.id === item.id));\n const changesToMake = notSelectedItems.map((item) => ({ props: item, value: true }));\n onSelectedItemsChanged(changesToMake);\n };\n\n const onTopSelectionCheckboxClick = () => {\n const areAllItemsSelected = selectedItems.length === items.length;\n\n if (areAllItemsSelected) {\n unselectAllItems();\n } else {\n selectAllItems();\n }\n };\n\n const onOrderableColumnClicked = (field: HeaderProps<T, F>) => {\n onCloseContextMenu();\n if (!field.orderable || !onOrderByChanged) return;\n\n const columnWasAlreadySelected = orderBy?.field === field.name;\n if (columnWasAlreadySelected) {\n onOrderByChanged({ field: field.name, direction: orderBy.direction === 'ASC' ? 'DESC' : 'ASC' });\n } else {\n onOrderByChanged({ field: field.name, direction: field.defaultDirection ?? 'ASC' });\n }\n };\n\n const handleKeyPress = (action: () => void) => {\n if (!disableKeyboardShortcuts) action();\n };\n\n const handleRKeyPressed = () => {\n keyBoardShortcutActions?.onRKeyPressed?.();\n };\n\n const handleBackspaceKeyPressed = () => {\n keyBoardShortcutActions?.onBackspaceKeyPressed?.();\n };\n\n useHotkeys(\n {\n 'ctrl+a': () => handleKeyPress(selectAllItems),\n 'meta+a': () => handleKeyPress(selectAllItems),\n esc: () => handleKeyPress(unselectAllItems),\n r: () => handleKeyPress(handleRKeyPressed),\n backspace: () => handleKeyPress(handleBackspaceKeyPressed),\n delete: () => handleKeyPress(handleBackspaceKeyPressed),\n },\n [items, selectedItems, disableKeyboardShortcuts],\n );\n\n const onItemClick = (itemClicked: T, e: React.MouseEvent<HTMLDivElement>) => {\n if (e.metaKey || e.ctrlKey) {\n onSelectedItemsChanged([{ props: itemClicked, value: !isItemSelected(itemClicked) }]);\n } else if (!isItemSelected(itemClicked)) {\n onClick?.(itemClicked);\n }\n setIdItemContextMenuOpen(null);\n };\n\n const onRightItemClick = (props: T, e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n if (!isItemSelected(props)) {\n unselectAllItemsAndSelectOne(props);\n }\n setIdItemContextMenuOpen(props.id);\n };\n\n const onCloseContextMenu = () => {\n setIdItemContextMenuOpen(null);\n };\n\n const handleThreeDotsButtonClick = (e: React.MouseEvent<HTMLButtonElement>, item: T) => {\n e.stopPropagation();\n\n setIdItemContextMenuOpen((prevId) => (prevId ? null : item.id));\n if (!isItemSelected(item)) {\n unselectAllItemsAndSelectOne(item);\n }\n };\n\n return (\n <div\n id=\"generic-list-component\"\n className={`relative isolate flex h-full flex-col overflow-x-auto overflow-y-hidden ${className}`}\n ref={containerRef}\n >\n {/* BODY */}\n <div id=\"scrollableList\" className=\"flex h-full flex-col min-w-max overflow-x-hidden overflow-y-auto\">\n <div className={`sticky top-0 z-50 ${headerBackgroundColor}`}>\n {!isEmptyState ? (\n <ListHeader\n selectedItems={selectedItems}\n onTopSelectionCheckboxClick={onTopSelectionCheckboxClick}\n items={items}\n header={header}\n orderBy={orderBy}\n onOrderableColumnClicked={onOrderableColumnClicked}\n menu={menu}\n displayMenuDiv={displayMenuDiv}\n isVerticalScrollbarVisible={isVerticalScrollbarVisible}\n checkboxDataCy={checkboxDataCy}\n onClose={onCloseContextMenu}\n />\n ) : null}\n </div>\n {isEmptyState ? (\n emptyState\n ) : items.length > 0 && !forceLoading ? (\n <InfiniteScroll\n handleNextPage={handleNextPage}\n hasMoreItems={!!hasMoreItems}\n loader={loader}\n scrollableTarget=\"scrollableList\"\n >\n {items.map((item, index) => (\n <ListItem<T>\n key={item.id}\n item={item}\n listIndex={index}\n isOpen={idItemContextMenuOpen === item.id}\n onClose={onCloseContextMenu}\n itemComposition={itemComposition}\n selected={isItemSelected(item)}\n onDoubleClick={onDoubleClick && (() => onDoubleClick(item))}\n onClick={(e) => onItemClick(item, e)}\n onClickContextMenu={(e) => onRightItemClick(item, e)}\n onThreeDotsButtonPressed={(e) => handleThreeDotsButtonClick(e, item)}\n columnsWidth={header.map((column) => column.width)}\n menu={menu}\n onSelectedChanged={(value) => onSelectedItemsChanged([{ props: item, value }])}\n disableItemCompositionStyles={disableItemCompositionStyles}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n genericEnterKey={executeClickOnSelectedItem}\n />\n ))}\n </InfiniteScroll>\n ) : (\n <div>{loader}</div>\n )}\n\n {/* Click outside of the list to unselect all items */}\n {items.length > 0 && (\n <div\n data-testid=\"outside-click-element\"\n className=\"h-full w-full py-6\"\n onClick={unselectAllItems}\n onContextMenu={(e) => {\n e.preventDefault();\n unselectAllItems();\n }}\n />\n )}\n </div>\n </div>\n );\n};\n\nexport default List;\n","import React from 'react';\n\nexport interface TableProps extends React.HTMLAttributes<HTMLTableElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElement> {\n children: React.ReactNode;\n className?: string;\n isHeader?: boolean;\n}\n\n/**\n * Table component\n *\n * A container for tabular data. Wraps the `<table>` element with a div for additional styling or layout purposes.\n * @param {TableProps} props - The props for the table component.\n */\nexport const Table: React.FC<TableProps> = ({ children, className, ...props }) => (\n <div className={className}>\n <table className=\"w-full\" {...props}>\n {children}\n </table>\n </div>\n);\n\n/**\n * TableHeader component\n *\n * Represents the header section of the table. Wraps the `<thead>` element.\n * @param {TableHeaderProps} props - The props for the table header component.\n */\nexport const TableHeader: React.FC<TableHeaderProps> = ({ children, className, ...props }) => (\n <thead className={className} {...props}>\n {children}\n </thead>\n);\n\n/**\n * TableBody component\n *\n * Represents the body section of the table. Wraps the `<tbody>` element.\n * @param {TableBodyProps} props - The props for the table body component.\n */\nexport const TableBody: React.FC<TableBodyProps> = ({ children, className, ...props }) => (\n <tbody className={className} {...props}>\n {children}\n </tbody>\n);\n\n/**\n * TableRow component\n *\n * Represents a single row in the table. Wraps the `<tr>` element.\n * @param {TableRowProps} props - The props for the table row component.\n */\nexport const TableRow: React.FC<TableRowProps> = ({ children, className, onClick, ...props }) => (\n <tr onClick={onClick} className={className} {...props}>\n {children}\n </tr>\n);\n\n/**\n * TableCell component\n *\n * Represents a single cell in the table, either header (`<th>`) or data (`<td>`).\n * @param {TableCellProps} props - The props for the table cell component.\n * @param {boolean} [props.isHeader=false] - Determines if the cell is a header (`<th>`).\n */\nexport const TableCell: React.FC<TableCellProps> = ({ children, className, isHeader = false, onClick, ...props }) => {\n const Component = isHeader ? 'th' : 'td';\n return (\n <Component onClick={onClick} className={className} {...props}>\n {children}\n </Component>\n );\n};\n","import React from 'react';\nimport '../../../styles/Loader.css';\n\nexport interface LoaderProps {\n classNameContainer?: string;\n classNameLoader?: string;\n classNameText?: string;\n type?: 'spinner' | 'pulse';\n text?: string;\n size?: number;\n}\n\n/**\n * Loader component.\n *\n * @property {string} [classNameContainer]\n * - Optional class name for the container wrapping the loader.\n * Useful for applying custom styles to the outermost container.\n *\n * @property {string} [classNameLoader]\n * - Optional class name for the loader element itself (spinner or pulse).\n * Allows custom styling of the loading animation.\n *\n * @property {string} [classNameText]\n * - Optional class name for the text displayed below the loader.\n * Allows style or adjust the appearance of the text.\n *\n * @property {'spinner' | 'pulse'} [type='spinner']\n * - Determines the type of loader to render.\n * Can be `'spinner'` for a rotating animation or `'pulse'` for a pulsing effect.\n * Defaults to `'spinner'`.\n *\n * @property {string} [text]\n * - Optional text to display below the loader.\n *\n * @property {number} [size=32]\n * - Size of the spinner loader in pixels.\n * Applies to the width and height of the SVG element for the `'spinner'` type.\n * Defaults to `32`.\n */\n\nconst Loader: React.FC<LoaderProps> = ({\n classNameContainer,\n classNameLoader,\n classNameText,\n type = 'spinner',\n text,\n size = 32,\n}) => {\n const isSpinner = type === 'spinner';\n\n return (\n <div className={classNameContainer}>\n {isSpinner ? (\n <>\n <svg\n className={`animate-spin ${classNameLoader}`}\n width={size}\n height={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n role=\"img\"\n >\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\"></circle>\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824\n 3 7.938l3-2.647z\"\n ></path>\n </svg>\n {text && <p className={classNameText}>{text}</p>}\n </>\n ) : (\n <div className={`loader-container ${classNameLoader}`}>\n <div className=\"loader06\"></div>\n {text && <p className={`loader-text ${classNameText}`}>{text}</p>}\n </div>\n )}\n </div>\n );\n};\n\nexport default Loader;\n","import { ReactNode } from 'react';\nimport Loader from '../../feedback/loader/Loader';\n\nexport interface ButtonProps {\n id?: string;\n variant?: 'primary' | 'secondary' | 'ghost' | 'destructive' | 'tertiary';\n type?: 'button' | 'submit';\n children?: ReactNode;\n className?: string;\n disabled?: boolean;\n onClick?: (e?: unknown) => void;\n onKeyDown?: (e?: unknown) => void;\n size?: 'medium' | 'default';\n loading?: boolean;\n dataTest?: string;\n autofocus?: boolean;\n buttonDataCy?: string;\n buttonChildrenDataCy?: string;\n}\n\n/**\n * Button component\n *\n * @property {string} [id]\n * - Optional ID for the button element, useful for accessibility and styling.\n *\n * @property {'primary' | 'secondary' | 'ghost' | 'destructive'} [variant]\n * - Defines the button's style variant. Options are:\n * - 'primary': Standard button style with primary color.\n * - 'secondary': Button with border and subtle background color.\n * - 'ghost': Button with transparent background, suitable for icons or light use.\n * - 'destructive': Button for destructive actions.\n *\n * @property {'button' | 'submit'} [type]\n * - Specifies the type of the button. Defaults to 'button'.\n * - 'button': Standard button behavior.\n * - 'submit': Button submits a form when used inside a form element.\n *\n * @property {ReactNode} [children]\n * - The content inside the button, such as text or icons.\n * - Can be a single element or an array of elements.\n *\n * @property {string} [className]\n * - Custom CSS classes for additional styling of the button.\n *\n * @property {boolean} [disabled]\n * - Disables the button, preventing user interaction and applying a disabled style.\n * - Defaults to false.\n *\n * @property {(e?: unknown) => void} [onClick]\n * - Function called when the button is clicked. Accepts an optional event object.\n *\n * @property {(e?: unknown) => void} [onKeyDown]\n * - Function called when a key is pressed while the button is focused. Accepts an optional event object.\n *\n * @property {'medium' | 'default'} [size]\n * - Specifies the button size. Options are:\n * - 'default': Standard size.\n * - 'medium': Slightly smaller size for compact use.\n *\n * @property {boolean} [loading]\n * - If true, shows a loading spinner inside the button.\n *\n * @property {string} [dataTest]\n * - Custom data attribute used for test automation or tracking purposes.\n *\n * @property {boolean} [autofocus]\n * - If true, the button will be focused automatically when the page loads.\n *\n * @property {string} [buttonDataCy]\n * - Custom data attribute for the button element.\n *\n * @property {string} [buttonChildrenDataCy]\n * - Custom data attribute for the children of the button.\n */\n\nconst Button = ({\n variant = 'primary',\n type = 'button',\n id,\n children,\n className = '',\n disabled = false,\n onClick = () => undefined,\n onKeyDown = () => undefined,\n size = 'default',\n loading,\n dataTest,\n autofocus,\n buttonDataCy,\n buttonChildrenDataCy,\n}: Readonly<ButtonProps>): JSX.Element => {\n let styles = '';\n\n if (variant === 'primary' && !disabled) {\n styles = `${loading ? 'bg-primary-dark' : 'bg-primary'} active:bg-primary-dark text-white shadow-sm`;\n } else if (variant === 'primary' && disabled) {\n styles = 'bg-gray-30 text-white shadow-sm';\n } else if (variant === 'destructive' && !disabled) {\n styles = `${loading ? 'bg-red-dark' : 'bg-red'} active:bg-red-dark text-white shadow-sm`;\n } else if (variant === 'destructive' && disabled) {\n styles = 'bg-gray-30 text-white shadow-sm';\n } else if (variant === 'secondary' && !disabled) {\n styles =\n 'bg-surface dark:bg-gray-5 border border-gray-10' +\n ' hover:border-gray-20 active:bg-gray-1 dark:active:bg-gray-10 text-gray-80 shadow-sm';\n } else if (variant === 'secondary' && disabled) {\n styles = 'bg-surface dark:bg-gray-5 text-gray-30 border border-gray-5 shadow-sm';\n } else if (variant === 'ghost' && !disabled) {\n styles = 'hover:bg-gray-5 active:bg-gray-10 focus-visible:bg-gray-10';\n } else if (variant === 'ghost' && disabled) {\n styles = 'text-gray-30';\n } else if (variant === 'tertiary' && !disabled) {\n styles = `${loading ? 'bg-white/45' : 'bg-white/15'} active:bg-white/25 text-white shadow-sm border border-white/20 active:border-white hover:border-white/40 active:border-white \n transition-all duration-200`;\n } else if (variant === 'tertiary' && disabled) {\n styles = 'bg-white/45 text-white shadow-sm border border-white/20';\n }\n\n return (\n <button\n data-cy={buttonDataCy}\n id={id}\n onClick={onClick}\n onKeyDown={onKeyDown}\n disabled={disabled || loading}\n type={type}\n data-test={dataTest}\n autoFocus={autofocus}\n className={`${\n size === 'default' ? 'h-10 px-5' : 'h-8 px-3.5'\n } relative flex shrink-0 select-none flex-row items-center justify-center space-x-2 \n whitespace-nowrap rounded-lg text-base font-medium outline-none ring-2 ring-primary/0 \n ring-offset-2 ring-offset-transparent transition-all duration-100 ease-in-out \n focus-visible:ring-primary/50 ${styles} ${className}`}\n >\n {loading && <Loader size={18} />}\n <div className=\"flex items-center justify-center space-x-2\" data-cy={buttonChildrenDataCy}>\n {children}\n </div>\n </button>\n );\n};\n\nexport default Button;\n","import { Upload } from '@phosphor-icons/react';\nimport { ReactNode } from 'react';\nimport { Button } from '../../input/button';\n\nexport interface EmptyProps {\n icon: JSX.Element;\n title: string;\n subtitle: string;\n action?: {\n text: string;\n icon: typeof Upload;\n style: 'plain' | 'elevated';\n onClick: () => void;\n };\n contextMenuClick?: (event: React.MouseEvent<HTMLDivElement>) => void;\n}\n\n/**\n * Empty component\n *\n * This component is used to display a message or placeholder content when there is no data or items available.\n * It allows for a customizable icon, title, subtitle, and an optional action button.\n *\n * @property {JSX.Element} icon\n * - The icon to be displayed at the top of the component. This can be any valid React element.\n *\n * @property {string} title\n * - The main title or heading to be displayed in the component.\n *\n * @property {string} subtitle\n * - A secondary subtitle or description.\n *\n * @property {object} [action]\n * - An optional object containing details for an action button that can be displayed.\n *\n * @property {string} action.text\n * - The text to display on the action button.\n *\n * @property {Function} [contextMenuClick]\n * - An optional function to handle right-click (context menu) interactions on the component.\n */\n\nconst Empty = ({ icon, title, subtitle, action, contextMenuClick }: EmptyProps): JSX.Element => {\n let button: ReactNode = null;\n\n if (action) {\n button = (\n <Button variant=\"secondary\" onClick={action.onClick}>\n <span>{action.text}</span>\n <action.icon size={20} />\n </Button>\n );\n }\n\n return (\n <div className=\"h-full w-full p-8\" onContextMenu={contextMenuClick}>\n <div className=\"flex h-full flex-col items-center justify-center space-y-6 pb-20\">\n <div className=\"pointer-events-none mx-auto w-max\">{icon}</div>\n <div className=\"pointer-events-none space-y-1 text-center\">\n <p className=\"text-2xl font-medium text-gray-100\">{title}</p>\n <p className=\"text-lg text-gray-60\">{subtitle}</p>\n </div>\n {button}\n </div>\n </div>\n );\n};\n\nexport default Empty;\n","import { CaretUp, Warning } from '@phosphor-icons/react';\nimport { useEffect } from 'react';\n\ntype ButtonVariant = 'default' | 'warning' | 'cancel';\n\nexport interface CircleButtonProps {\n children?: JSX.Element | JSX.Element[];\n variant?: ButtonVariant;\n active?: boolean;\n onClick?: () => void;\n onClickToggleButton?: () => void;\n className?: string;\n dropdown?: React.ReactNode;\n indicator?: {\n icon?: JSX.Element;\n className?: string;\n };\n isOpen?: boolean;\n handleOpen?: () => void;\n handleClose?: () => void;\n}\n\nconst CircleButton = ({\n children,\n variant = 'default',\n active = false,\n onClick,\n onClickToggleButton,\n className = '',\n dropdown,\n indicator,\n isOpen = false,\n handleOpen = () => {},\n handleClose = () => {},\n}: CircleButtonProps): JSX.Element => {\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (isOpen) {\n const target = event.target as HTMLElement;\n const circleButton = document.querySelector(`[data-circle-button=\"${variant}\"]`);\n if (circleButton && !circleButton.contains(target)) {\n handleClose();\n }\n }\n };\n\n document.addEventListener('click', handleClickOutside);\n return () => {\n document.removeEventListener('click', handleClickOutside);\n };\n }, [isOpen, variant]);\n\n const handleToggle = (e: React.MouseEvent) => {\n e.stopPropagation();\n if (dropdown) {\n onClickToggleButton?.();\n isOpen ? handleClose() : handleOpen();\n }\n };\n\n const handleMainClick = () => {\n onClick?.();\n };\n\n const getButtonStyles = () => {\n switch (variant) {\n case 'cancel':\n return 'bg-red hover:bg-red/85';\n case 'warning':\n return active ? 'bg-white/85' : 'bg-white/25 hover:bg-white/35';\n default:\n return active ? 'bg-white/85' : 'bg-white/25 hover:bg-white/35';\n }\n };\n\n const renderIndicator = () => {\n if (!indicator) return null;\n\n if (variant === 'warning') {\n return (\n <div className=\"absolute -top-1 -right-1 h-5 w-5 bg-orange border border-black/35 rounded-full flex items-center justify-center\">\n <Warning size={12} color=\"black\" weight=\"bold\" />\n </div>\n );\n }\n\n return (\n <div\n className={`absolute -top-1 -right-1 h-5 w-5 flex items-center justify-center rounded-full ${indicator.className || ''}`}\n >\n {indicator.icon}\n </div>\n );\n };\n\n const renderDropdownButton = () => {\n if (!dropdown || variant === 'cancel' || variant === 'warning') return null;\n\n return (\n <button\n onClick={handleToggle}\n className=\"absolute -top-1 -right-1 h-5 w-5 border bg-white border-black/35 rounded-full flex items-center justify-center hover:bg-gray-50\"\n >\n <CaretUp size={10} color=\"black\" weight=\"fill\" />\n </button>\n );\n };\n\n return (\n <div className=\"relative w-11 h-11\" data-circle-button={variant}>\n <button\n onClick={handleMainClick}\n className={`\n h-11 w-11\n flex items-center justify-center\n rounded-full\n transition-all duration-200\n ${getButtonStyles()}\n ${className}\n `}\n >\n {children}\n </button>\n {renderDropdownButton()}\n {renderIndicator()}\n {isOpen && dropdown && variant !== 'cancel' && <div className=\"absolute bottom-full mb-2 left-0\">{dropdown}</div>}\n </div>\n );\n};\n\nexport default CircleButton;\n","import { ReactNode, useRef, useState } from 'react';\n\nexport interface TooltipProps {\n children: ReactNode;\n title: string;\n subtitle?: string;\n popsFrom: 'right' | 'left' | 'top' | 'bottom';\n className?: string;\n delayInMs?: number;\n arrow?: boolean;\n}\n\n/**\n * Tooltip component\n *\n * @property {ReactNode} children\n * - The content that triggers the tooltip when hovered over.\n *\n * @property {string} title\n * - The main text displayed inside the tooltip. This is required.\n *\n * @property {string} [subtitle]\n * - An optional subtitle displayed below the main title inside the tooltip.\n *\n * @property {'right' | 'left' | 'top' | 'bottom'} popsFrom\n * - Determines the direction from which the tooltip appears relative to the trigger element.\n * - \"right\": Tooltip appears to the right of the element.\n * - \"left\": Tooltip appears to the left of the element.\n * - \"top\": Tooltip appears above the element.\n * - \"bottom\": Tooltip appears below the element.\n *\n * @property {string} [className]\n * - Additional CSS classes to style the tooltip container. Use to override default styles.\n *\n * @property {number} [delayInMs]\n * - The delay (in milliseconds) before hiding the tooltip after the mouse leaves the trigger element.\n * - If not provided, the tooltip hides immediately.\n *\n * @property {boolean} [arrow=true]\n * - Whether to display the arrow pointing to the trigger element.\n * - Default is true.\n *\n * @returns {JSX.Element}\n * - A tooltip component that shows additional information when hovering over its children.\n */\n\nconst Tooltip = ({\n children,\n title,\n subtitle,\n popsFrom,\n className,\n delayInMs,\n arrow = true,\n}: TooltipProps): JSX.Element => {\n const [visible, setVisible] = useState(false);\n\n const timeoutRef = useRef<null | number>(null);\n\n function show() {\n setVisible(true);\n }\n\n function hide() {\n setVisible(false);\n }\n\n function handleMouseEnter() {\n if (timeoutRef.current !== null) {\n clearTimeout(timeoutRef.current);\n }\n show();\n }\n function handleMouseLeave() {\n if (delayInMs) {\n timeoutRef.current = setTimeout(() => {\n timeoutRef.current = null;\n hide();\n }, delayInMs) as unknown as number;\n } else {\n hide();\n }\n }\n\n let tooltipPosition = '';\n let trianglePosition = '';\n let triangle = '';\n\n switch (popsFrom) {\n case 'right':\n tooltipPosition = 'left-full top-1/2 -translate-y-1/2 ml-1.5';\n trianglePosition = 'flex-row-reverse';\n triangle = 'polygon(100% 0%, 100% 100%, 0% 50%)';\n break;\n case 'left':\n tooltipPosition = 'right-full top-1/2 -translate-y-1/2 mr-1.5';\n trianglePosition = 'flex-row';\n triangle = 'polygon(0% 0%, 0% 100%, 100% 50%)';\n break;\n case 'top':\n tooltipPosition = 'bottom-full left-1/2 -translate-x-1/2 mb-1.5 origin-bottom';\n trianglePosition = 'flex-col';\n triangle = 'polygon(0% 0%, 100% 0%, 50% 100%)';\n break;\n case 'bottom':\n tooltipPosition = 'top-full left-1/2 -translate-x-1/2 mt-1.5';\n trianglePosition = 'flex-col-reverse';\n triangle = 'polygon(50% 0%, 0% 100%, 100% 100%)';\n break;\n }\n\n return (\n <div\n className={`relative w-max ${className}`}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n style={{ lineHeight: 0 }}\n >\n <div\n className={`pointer-events-none absolute ${tooltipPosition} flex items-center ${trianglePosition} drop-shadow-tooltip transition-all duration-150 ${\n visible ? 'scale-100 opacity-100' : 'scale-50 opacity-0'\n }`}\n >\n <div className=\"w-max rounded-lg bg-gray-90 px-4 py-1.5 text-center dark:bg-gray-5\">\n <p className=\"text-base text-white\">{title}</p>\n {subtitle && <p className=\"-mt-1 text-sm text-gray-40\">{subtitle}</p>}\n </div>\n {arrow && (\n <div\n className={`bg-gray-90 dark:bg-gray-5 ${\n popsFrom === 'bottom' || popsFrom === 'top' ? 'h-1.5 w-4' : 'h-4 w-1.5'\n }`}\n style={{ clipPath: triangle, marginTop: popsFrom === 'top' ? '-1px' : undefined }}\n data-testid=\"tooltip-arrow\"\n />\n )}\n </div>\n {children}\n </div>\n );\n};\n\nexport default Tooltip;\n","import { Copy } from '@phosphor-icons/react';\nimport { useState } from 'react';\nimport Tooltip from '../../overlay/tooltip/Tooltip';\n\nexport interface CopyableProps {\n className?: string;\n classText?: string;\n text: string;\n copiedText?: string;\n copyToClipboardText?: string;\n}\n\n/**\n * Copyable component\n *\n * @property {string} [className]\n * - Custom classes for the outer container.\n *\n * @property {string} [classText]\n * - Custom classes for the selected text.\n *\n * @property {string} text\n * - The text content to be displayed and copied to the clipboard.\n *\n * @property {string} copiedText\n * - The text to display in the tooltip when the content has been copied.\n *\n * @property {string} copyToClipboardText\n * - The text to display in the tooltip when the content can be copied to the clipboard.\n */\n\nconst Copyable = ({\n className = '',\n classText = 'select-text text-gray-80',\n text,\n copiedText = 'Copied!',\n copyToClipboardText = 'Copy to clipboard',\n}: CopyableProps): JSX.Element => {\n const [justCopied, setJustCopied] = useState(false);\n\n async function onCopy() {\n await navigator.clipboard.writeText(text);\n setJustCopied(true);\n setTimeout(() => setJustCopied(false), 1000);\n }\n\n return (\n <div\n className={`${className} flex h-11 items-center justify-between rounded-md border border-gray-10 bg-gray-5 px-4`}\n >\n <p className={`${classText}`}>{text}</p>\n <Tooltip\n className=\"ml-6\"\n popsFrom=\"top\"\n title={justCopied ? copiedText : copyToClipboardText}\n delayInMs={justCopied ? 500 : undefined}\n >\n <button disabled={justCopied} onClick={onCopy}>\n <Copy className=\"shrink-0 text-gray-50 hover:text-gray-60\" size={24} />\n </button>\n </Tooltip>\n </div>\n );\n};\n\nexport default Copyable;\n","import { CheckCircle, Eye, EyeSlash, MagnifyingGlass, Warning, WarningOctagon, X } from '@phosphor-icons/react';\nimport { KeyboardEvent, useEffect, useRef, useState } from 'react';\n\nexport interface InputProps {\n className?: string;\n label?: string;\n variant?: 'default' | 'search' | 'password' | 'email';\n accent?: 'error' | 'warning' | 'success';\n disabled?: boolean;\n placeholder?: string;\n value?: string;\n maxLength?: number;\n onChange?: (v: string) => void;\n onClear?: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n message?: string;\n autofocus?: boolean;\n autoComplete?: 'on' | 'off';\n dataTest?: string;\n name?: string;\n required?: boolean;\n labelDataCy?: string;\n inputDataCy?: string;\n onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;\n inputClassName?: string;\n borderRadius?: string;\n fontClasses?: string;\n}\n\n/**\n * Input component\n *\n * @property {string} [className]\n * - Optional custom class name to be applied to the outermost container of the input.\n *\n * @property {string} [label]\n * - The label for the input field.\n *\n * @property {'default' | 'search' | 'password' | 'email'} [variant]\n * - The variant of the input field. Determines the input type and visual style.\n * - 'default': Regular input field.\n * - 'search': Search field with a magnifying glass icon.\n * - 'password': Password input with an option to toggle visibility.\n * - 'email': Email input with specific email validation.\n *\n * @property {'error' | 'warning' | 'success'} [accent]\n * - Optional accent color for the input border and message.\n * - 'error': Red border and error message.\n * - 'warning': Orange border and warning message.\n * - 'success': Green border and success message.\n *\n * @property {boolean} [disabled]\n * - If true, disables the input field, preventing user interaction.\n *\n * @property {string} [placeholder]\n * - The placeholder text displayed inside the input when it is empty.\n *\n * @property {string} [value]\n * - The current value of the input field.\n *\n * @property {number} [maxLength]\n * - Maximum number of characters allowed in the input field.\n *\n * @property {(v: string) => void} [onChange]\n * - Callback function that is called whenever the input value changes.\n *\n * @property {() => void} [onClear]\n * - Callback function that is called when the clear button is clicked in the search variant.\n *\n * @property {() => void} [onFocus]\n * - Callback function that is called when the input gains focus.\n *\n * @property {() => void} [onBlur]\n * - Callback function that is called when the input loses focus.\n *\n * @property {string} [message]\n * - Optional message displayed below the input. Used for feedback like error or success.\n *\n * @property {boolean} [autofocus]\n * - If true, the input will automatically gain focus when the component is rendered.\n *\n * @property {'on' | 'off'} [autoComplete]\n * - Controls the auto-completion behavior of the input. Defaults to 'on'.\n *\n * @property {string} [dataTest]\n * - Optional data attribute for testing purposes, used for targeting the input element in tests.\n *\n * @property {string} [name]\n * - The name attribute of the input field, used in form submissions.\n *\n * @property {boolean} [required]\n * - If true, the input is marked as required for form validation.\n *\n * @property {string} [labelDataCy]\n * - Optional data attribute for targeting the label element in tests.\n *\n * @property {string} [inputDataCy]\n * - Optional data attribute for targeting the input element itself in tests.\n *\n * @property {string} [inputClassName]\n * - Optional custom class name to be applied directly to the input element.\n * - These classes will be added after the default classes and can override them.\n *\n * @property {string} [borderRadius='rounded-md']\n * - Optional Tailwind class to control the border radius of the input.\n * - Defaults to 'rounded-md' if not specified.\n *\n * @property {string} [fontClasses='text-lg font-normal']\n * - Optional Tailwind class to control the font size and font weight of the input.\n * - Defaults to 'text-lg font-normal' if not specified.\n *\n * @property {(e: KeyboardEvent<HTMLInputElement>) => void} [onKeyDown]\n * - Callback function for handling keydown events in the input field.\n */\n\nconst Input = ({\n className = '',\n label,\n variant = 'default',\n accent,\n disabled,\n placeholder,\n value,\n maxLength,\n onChange,\n onClear,\n message,\n onFocus,\n onBlur,\n autofocus = false,\n autoComplete = 'on',\n dataTest,\n name,\n required = false,\n labelDataCy,\n inputDataCy,\n onKeyDown,\n inputClassName = '',\n borderRadius = 'rounded-md',\n fontClasses = 'text-lg font-normal',\n}: InputProps): JSX.Element => {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const focusInput = () => {\n if (inputRef && inputRef.current) {\n if (variant !== 'email') {\n inputRef.current.selectionStart = inputRef.current.value.length;\n inputRef.current.selectionEnd = inputRef.current.value.length;\n }\n inputRef.current.focus();\n }\n };\n\n useEffect(() => {\n if (message || autofocus) {\n focusInput();\n }\n }, [message, autofocus, disabled]);\n\n let focusColor: string;\n\n switch (accent) {\n case 'error':\n focusColor = 'border-red focus:border-red ring-red';\n break;\n case 'warning':\n focusColor = 'focus:border-orange ring-orange';\n break;\n case 'success':\n focusColor = 'focus:border-green ring-green';\n break;\n default:\n focusColor = 'focus:border-primary ring-primary';\n break;\n }\n\n const borderColor =\n variant === 'search' ? 'border-transparent' : 'border-gray-20 disabled:border-gray-10 hover:border-gray-30';\n\n const placeholderColor = variant === 'search' ? 'placeholder-gray-40' : 'placeholder-gray-30';\n\n const padding = variant === 'search' ? 'pr-4 pl-10' : 'px-4';\n\n const [showPassword, setShowPassword] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n\n const input = (\n <div className=\"relative\">\n <input\n ref={inputRef}\n disabled={disabled}\n className={`inxt-input h-10 w-full border bg-transparent ${fontClasses} text-gray-80 outline-none ring-opacity-10 focus:ring-3 disabled:text-gray-40 disabled:placeholder-gray-20 dark:ring-opacity-20 \n ${borderColor} ${focusColor} ${placeholderColor} ${padding} ${borderRadius} ${inputClassName}`}\n type={variant === 'password' && !showPassword ? 'password' : variant === 'email' ? 'email' : 'text'}\n placeholder={placeholder}\n onChange={(e) => onChange && onChange(e.target.value)}\n onFocus={() => {\n if (onFocus) onFocus();\n setIsFocused(true);\n }}\n onBlur={() => {\n if (onBlur) onBlur();\n setIsFocused(false);\n }}\n autoComplete={autoComplete}\n value={value}\n maxLength={maxLength}\n data-test={dataTest}\n data-cy={inputDataCy}\n name={name}\n required={required}\n onKeyDown={onKeyDown ?? undefined}\n />\n {variant === 'password' && isFocused && (\n <div\n role=\"button\"\n tabIndex={0}\n onMouseDown={(e) => {\n e.preventDefault();\n setShowPassword(!showPassword);\n }}\n className=\"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer bg-transparent py-2 pl-2 text-gray-80\"\n >\n {showPassword ? <Eye size={24} /> : <EyeSlash size={24} />}\n </div>\n )}\n {variant === 'search' && (\n <MagnifyingGlass\n className={`absolute left-4 top-1/2 -translate-y-1/2 ${disabled ? 'text-gray-20' : 'text-gray-40'}`}\n size={20}\n />\n )}\n {variant === 'search' && value && !disabled && (\n <div\n role=\"button\"\n tabIndex={0}\n onMouseDown={(e) => {\n e.preventDefault();\n if (onClear) onClear();\n }}\n className={`absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer py-2 pl-2 text-gray-40 \n ${isFocused ? 'bg-white' : 'bg-gray-5'}`}\n >\n <X size={20} />\n </div>\n )}\n </div>\n );\n\n let messageColor: string;\n let MessageIcon: typeof WarningOctagon | undefined;\n\n switch (accent) {\n case 'success':\n messageColor = 'text-green';\n MessageIcon = CheckCircle;\n break;\n case 'warning':\n messageColor = 'text-orange';\n MessageIcon = Warning;\n break;\n case 'error':\n messageColor = 'text-red';\n MessageIcon = WarningOctagon;\n break;\n default:\n messageColor = 'text-gray-80';\n }\n\n return (\n <div className={`${className}`}>\n {label ? (\n <label>\n <span data-cy={labelDataCy} className={`text-sm ${disabled ? 'text-gray-40' : 'text-gray-80'}`}>\n {label}\n </span>\n {input}\n </label>\n ) : (\n input\n )}\n {maxLength && (\n <p className=\"font-regular mt-1 text-right text-sm text-gray-50\">{`${value?.length ?? 0}/${maxLength}`}</p>\n )}\n {message && (\n <div className={`mt-0.5 flex items-center ${messageColor}`}>\n {MessageIcon && <MessageIcon size={16} weight=\"fill\" />}\n <p className=\"ml-1 text-sm\">{message}</p>\n </div>\n )}\n </div>\n );\n};\n\nexport default Input;\n","export interface RadioButtonProps {\n checked: boolean;\n id?: string;\n disabled?: boolean;\n onClick: (e?: unknown) => void;\n}\n\n/**\n * RadioButton component\n *\n * A custom radio button component that allows the user to select one option from a group of choices.\n *\n * @property {boolean} checked\n * - Determines whether the radio button is selected (checked) or not. If true, the radio button appears active.\n *\n * @property {string} [id]\n * - The unique identifier for the radio button element. Useful for associating labels or customizing the radio button.\n *\n * @property {boolean} [disabled]\n * - If true, disables the radio button, making it unclickable and visually indicating its inactive state.\n *\n * @property {(e?: unknown) => void} onClick\n * - A callback function triggered when the radio button is clicked.\n * Can be used to handle custom behavior when the button is selected.\n */\n\nconst RadioButton = ({ checked, id, disabled = false, onClick }: RadioButtonProps) => {\n const borderStyle = disabled ? 'border-gray-10' : 'border-gray-40';\n const checkedStyle =\n disabled && checked ? 'border-0 bg-gray-20' : checked && 'border-0 bg-primary active:bg-primary-dark';\n\n return (\n <div id={id} className=\"flex cursor-pointer\">\n <button\n disabled={disabled}\n onClick={onClick}\n className={`flex h-5 w-5 items-center justify-center rounded-full border ${checkedStyle} ${borderStyle}`}\n >\n {<div className={`h-2.5 w-2.5 rounded-full ${checked || disabled ? 'bg-white' : 'hover:bg-gray-10'}`}></div>}\n </button>\n <input type=\"radio\" className=\"h-0 w-0 appearance-none opacity-0\" checked readOnly />\n </div>\n );\n};\n\nexport default RadioButton;\n","import { ChangeEvent } from 'react';\nimport '../../../styles/RangeSlider.css';\n\nexport interface RangeSliderProps {\n value: number;\n min?: number;\n max: number;\n step?: number;\n percentageForProgressSliderBar?: number;\n className?: string;\n onChange: (value: number) => void;\n disabled?: boolean;\n ariaLabel?: string;\n}\n\n/**\n * RangeSlider component\n *\n * @param {RangeSliderProps} props - Properties of the RangeSlider component.\n *\n * @property {number} value\n * - The current value of the slider.\n *\n * @property {number} [min=0]\n * - The minimum value of the slider. Defaults to 0 if not specified.\n *\n * @property {number} max\n * - The maximum value of the slider.\n *\n * @property {number} [step]\n * - The step interval for the slider. Defines how much the value increments or decrements on each step.\n *\n * @property {number} [percentageForProgressSliderBar]\n * - Optional. This value could control the width or progress of the slider,\n * but it's not used in the component directly.\n *\n * @property {string} [className]\n * - Optional class name to apply custom styles to the slider container.\n *\n * @property {(value: number) => void} onChange\n * - Callback function triggered when the slider value changes. Receives the new value as an argument.\n *\n * @property {boolean} [disabled=false]\n * - Optional flag to disable the slider. Defaults to false if not specified.\n *\n * @property {string} [ariaLabel=\"Range slider\"]\n * - Optional ARIA label for accessibility purposes. Defaults to 'Range slider' if not specified.\n *\n * @returns {JSX.Element}\n * - The rendered RangeSlider component.\n *\n * The slider visually represents its value with a linear gradient background.\n * The background dynamically adjusts as the slider's value changes, reflecting the percentage of progress.\n * The slider supports custom min, max, and step values, and handles input changes via the `onChange` callback.\n *\n * The component also provides accessibility through the `aria-label` attribute.\n */\n\nconst RangeSlider = ({\n value,\n min = 0,\n max,\n step,\n className,\n disabled = false,\n ariaLabel = 'Range slider',\n onChange,\n}: RangeSliderProps) => {\n const percentage = ((value - min) / (max - min)) * 100;\n const sliderBackground = `linear-gradient(to right, #3264fe ${percentage}%, #d5d5d5 ${percentage}%)`;\n\n return (\n <div className={className}>\n <input\n id=\"my-slider\"\n type=\"range\"\n min={min}\n max={max}\n value={value}\n step={step}\n onInput={(e: ChangeEvent<HTMLInputElement>) => onChange(Number(e.target.value))}\n disabled={disabled}\n aria-label={ariaLabel}\n style={{ background: sliderBackground }}\n />\n </div>\n );\n};\n\nexport default RangeSlider;\n","import { useState } from 'react';\n\nexport interface SwitchComponentProps {\n size?: 'md' | 'lg' | 'xl';\n id?: string;\n dataTestId?: string;\n disabled?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n onClick?: (e?: unknown) => void;\n}\n\n/**\n * SwitchComponent\n *\n * A toggle switch component that allows users to toggle between two states: on/off or checked/unchecked.\n *\n * @property {string} size\n * - Defines the size of the switch. Options are 'md', 'lg', or 'xl'.\n *\n * @property {string} [id]\n * - The unique identifier for the switch element.\n *\n * @property {string} [dataTestId]\n * - A custom data attribute for use in testing or identifying the switch in the DOM.\n *\n * @property {boolean} [disabled]\n * - If true, disables the switch, making it unclickable and visually indicating its inactive state.\n *\n * @property {(checked: boolean) => void} [onCheckedChange]\n * - A callback function triggered whenever the checked state changes. Receives the new checked state as an argument.\n *\n * @property {(e?: unknown) => void} [onClick]\n * - A callback function triggered when the switch is clicked. Allows for custom click behavior.\n */\n\nconst SwitchComponent = ({\n disabled = false,\n id,\n dataTestId = 'switch',\n size = 'md',\n onClick,\n onCheckedChange,\n}: SwitchComponentProps) => {\n const [checked, setChecked] = useState(false);\n\n const handleCheckedChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newChecked = e.target.checked;\n setChecked(newChecked);\n if (onCheckedChange) {\n onCheckedChange(newChecked);\n }\n };\n\n const backgroundColor = disabled ? 'bg-gray-5' : checked ? 'bg-green' : 'bg-gray-10';\n\n const sizeClasses = {\n md: 'w-8 h-5',\n lg: 'w-12 h-7',\n xl: 'w-14 h-8',\n };\n\n const thumbSizeClasses = {\n md: 'w-4 h-4',\n lg: 'w-6 h-6',\n xl: 'w-7 h-7',\n };\n\n const checkedTranslation = {\n md: 'translate-x-[13px]',\n lg: 'translate-x-[21px]',\n xl: 'translate-x-[25px]',\n };\n\n return (\n <label\n htmlFor={id}\n className={`relative inline-flex items-center cursor-pointer ${sizeClasses[size]}`}\n data-testid={dataTestId}\n >\n <input\n type=\"checkbox\"\n id={id}\n disabled={disabled}\n checked={checked}\n onChange={handleCheckedChange}\n onClick={onClick}\n className=\"sr-only\"\n />\n <div\n className={`absolute inset-0 rounded-full transition-colors duration-200 ${backgroundColor} ${\n disabled ? 'data-[state=checked]:bg-green/50' : ''\n }`}\n />\n <span\n className={`block bg-white rounded-full transition-transform duration-200 transform ${\n checked ? checkedTranslation[size] : 'translate-x-[3px]'\n } ${thumbSizeClasses[size]} ${disabled ? 'pointer-events-none' : ''}`}\n />\n </label>\n );\n};\n\nexport default SwitchComponent;\n","export interface TextAreaComponentProps {\n disabled?: boolean;\n accentColor?: 'red';\n placeholder?: string;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n name?: string;\n}\n\n/**\n * TextArea component\n *\n * @param {TextAreaComponentProps} props - Properties of the TextArea component.\n *\n * @property {boolean} [disabled=false]\n * - Optional flag to disable the text area. Defaults to false if not specified.\n *\n * @property {'red'} [accentColor]\n * - Optional accent color for the text area.\n *\n * @property {string} [placeholder='']\n * - Optional placeholder text that is displayed when the text area is empty.\n *\n * @property {string} [value='']\n * - Optional value for the text area. The content inside the text area is controlled by this value.\n *\n * @property {(e: React.ChangeEvent<HTMLTextAreaElement>) => void} [onChange]\n * - Optional callback function triggered when the text area value changes. Receives the event object as an argument.\n *\n * @property {string} [name]\n * - Optional name attribute for the text area, typically used for form submissions.\n *\n * @returns {JSX.Element}\n * - The rendered TextArea component.\n */\n\nconst TextArea = ({\n disabled = false,\n accentColor,\n placeholder = '',\n value = '',\n onChange,\n name,\n}: TextAreaComponentProps): JSX.Element => {\n return (\n <textarea\n disabled={disabled}\n placeholder={placeholder}\n className={`\n w-full h-full py-4 px-3.5 bg-transparent border rounded-md outline-none text-lg font-regular resize-none\n placeholder:text-gray-30\n ${!disabled ? 'border-gray-20 text-gray-100' : 'border-gray-5 text-gray-40'}\n ${!accentColor && 'border-gray-20 focus:border-primary focus:ring focus:ring-primary/10'}\n ${accentColor === 'red' && 'border-red focus:ring focus:ring-red/10'}\n `}\n value={value}\n onChange={onChange}\n name={name}\n />\n );\n};\n\nexport default TextArea;\n","export interface HeaderProps {\n /**\n * Elements to be rendered on the left side of the header\n */\n leftContent?: JSX.Element;\n\n /**\n * Elements to be rendered on the right side of the header\n */\n rightContent?: JSX.Element;\n\n /**\n * Optional class name for additional styling\n */\n className?: string;\n}\n\n/**\n * Header component\n *\n * A flexible header component that can contain any content on its left and right sides.\n *\n * @param {HeaderProps} props - The properties for the Header component\n * @returns {JSX.Element} The rendered Header component\n */\nconst Header = ({ leftContent, rightContent, className = '' }: HeaderProps): JSX.Element => {\n return (\n <header\n className={`\n flex\n items-center\n justify-between\n ${className}\n `}\n >\n <div className=\"flex items-center space-x-4\">{leftContent}</div>\n\n <div className=\"flex items-center space-x-4\">{rightContent}</div>\n </header>\n );\n};\n\nexport default Header;\n","import { ReactNode } from 'react';\n\nexport interface GridProps {\n children?: ReactNode;\n className?: string;\n id?: string;\n dataCy?: string;\n}\n\n/**\n * Grid component\n *\n * A responsive grid container that automatically adjusts columns from 2 (mobile) up to 6 (extra large screens).\n *\n * @param {GridProps} props - The properties of the component.\n *\n * @property {ReactNode} [children]\n * - The child components or elements to be rendered inside the grid container.\n *\n * @property {string} [className]\n * - Optional custom CSS classes for additional styling or layout adjustments overriding default tailwind classes.\n *\n * @property {string} [id]\n * - Optional ID for the grid container element.\n *\n * @property {string} [dataCy]\n * - Custom data attribute used for e2e Cypress test targeting.\n *\n * @returns {JSX.Element}\n * - A JSX element containing the children formatted inside a grid.\n */\nconst Grid = ({ children, className = '', id, dataCy }: Readonly<GridProps>): JSX.Element => {\n return (\n <div\n id={id}\n data-cy={dataCy}\n className={`grid min-w-full auto-rows-min grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 ${className}`}\n >\n {children}\n </div>\n );\n};\n\nexport default Grid;\n","import { useState, ReactNode, useEffect, useRef } from 'react';\nimport { Menu, MenuItemType } from '../menu';\n\nexport type DropdownProps<T> = {\n children: ReactNode | ((obj: { open: boolean }) => JSX.Element);\n options?: { text: string; onClick: () => void }[];\n classButton?: string;\n menuItems?: ReactNode[];\n classMenuItems: string;\n openDirection: 'left' | 'right';\n dropdownActionsContext?: Array<MenuItemType<T>>;\n item?: T;\n};\n\n/**\n * Dropdown component\n *\n * @property {ReactNode | ((obj: { open: boolean }) => JSX.Element)} children\n * - The content of the dropdown button. It can be a React component or a function that receives an object\n * with the `open` property to render the dropdown's state.\n *\n * @property {Object[]} [options]\n * - The dropdown options, where each option contains a text and an `onClick` function\n * that is executed when the option is clicked.\n *\n * @property {string} [classButton]\n * - Additional classes for the dropdown button, allowing customization of its appearance.\n *\n * @property {ReactNode[]} [menuItems]\n * - Menu items to be added to the dropdown. These can be React components rendered inside the menu.\n *\n * @property {string} classMenuItems\n * - Additional CSS classes for the container of menu items, allowing for custom styling.\n *\n * @property {'left' | 'right'} openDirection\n * - The direction in which the dropdown menu opens. It can be 'left' or 'right'.\n *\n * @property { Array<MenuItemType<T>>} [dropdownActionsContext]\n * - Additional actions that can be passed to the dropdown menu.\n * Used for extending the menu with more options or functionalities.\n *\n * @property {T} [item]\n * - The current item that may be used within the options or actions of the menu,\n * allowing customization of the dropdown's logic.\n */\n\nconst extractPaddingValues = (className: string) => {\n const pxMatch = className.match(/px-(\\d+(\\.\\d+)?)/);\n const pyMatch = className.match(/py-(\\d+(\\.\\d+)?)/);\n\n const px = pxMatch ? pxMatch[1] : undefined;\n const py = pyMatch ? pyMatch[1] : undefined;\n\n return { px, py };\n};\n\nconst Dropdown = <T,>({\n children,\n options,\n classButton,\n menuItems,\n classMenuItems,\n openDirection,\n dropdownActionsContext,\n item = {} as T,\n}: DropdownProps<T>): JSX.Element => {\n const [isOpen, setIsOpen] = useState(false);\n const direction = openDirection === 'left' ? 'origin-top-left' : 'origin-top-right';\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (e: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('contextmenu', handleClickOutside);\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('contextmenu', handleClickOutside);\n };\n }, []);\n\n const group1: Array<MenuItemType<T>> = options\n ? options.map((option) => ({\n name: option.text,\n action: () => option.onClick(),\n }))\n : [];\n\n const group2: Array<MenuItemType<T>> = menuItems\n ? menuItems.map((menuItem) => ({\n node: menuItem,\n }))\n : [];\n\n const group3: Array<MenuItemType<T>> = dropdownActionsContext || [];\n\n const allItems = [...group1, ...group2, ...group3];\n\n const toggleMenu = () => setIsOpen((prev) => !prev);\n const closeMenu = () => setIsOpen(false);\n\n const { px, py } = extractPaddingValues(classMenuItems);\n\n return (\n <div className=\"relative outline-none min-w-breadcrumb\" ref={containerRef}>\n <button\n className={`cursor-pointer outline-none ${classButton}`}\n onClick={toggleMenu}\n aria-expanded={isOpen}\n aria-haspopup=\"menu\"\n >\n {typeof children === 'function' ? children({ open: isOpen }) : children}\n </button>\n\n <div\n className={`absolute ${openDirection === 'left' ? 'left-0' : 'right-0'} \n transform shadow-subtle-hard transition-all duration-100 ease-in-out ${\n isOpen ? `scale-100 opacity-100 ${direction}` : 'pointer-events-none scale-95 opacity-0'\n }`}\n data-testid=\"menu-dropdown\"\n >\n <div className={`absolute ${classMenuItems}`}>\n <Menu item={item} isOpen={isOpen} handleMenuClose={closeMenu} menu={allItems} paddingX={px} paddingY={py} />\n </div>\n </div>\n </div>\n );\n};\n\nexport default Dropdown;\n","import { DropTargetMonitor, useDrop } from 'react-dnd';\nimport { Dispatch } from 'redux';\nimport { FunctionComponent, SVGProps } from 'react';\n\nexport interface BreadcrumbItemData {\n uuid: string;\n label: string;\n icon: JSX.Element | null;\n active: boolean;\n isFirstPath?: boolean;\n dialog?: boolean;\n isBackup?: boolean;\n onClick?: () => void;\n}\n\nexport interface BreadcrumbsMenuProps {\n item: BreadcrumbItemData;\n items: BreadcrumbItemData[];\n onItemClicked: (item: BreadcrumbItemData) => void;\n}\n\n/**\n * BreadcrumbsItem component\n *\n * @property {BreadcrumbItemData} item\n * - Data representing a single breadcrumb item, including label, icon, and other properties.\n *\n * @property {number} totalBreadcrumbsLength\n * - The total number of breadcrumb items, used for styling the first item and determining when to apply certain styles.\n *\n * @property {boolean} [isHiddenInList]\n * - If true, the breadcrumb is hidden in the list and only shown in a dropdown menu.\n *\n * @property {BreadcrumbItemData[]} items\n * - Array of all breadcrumb items, used for rendering all the breadcrumbs and their separators.\n *\n * @property {string} [breadcrumbButtonDataCy]\n * - Custom `data-cy` attribute applied to the breadcrumb button element.\n *\n * @property {FunctionComponent<BreadcrumbsMenuProps>} [menu]\n * - A custom menu component that can be shown for the breadcrumb item when it's not active or dialog-based.\n *\n * @property {Object[]} namePath\n * - Array of objects representing the path and UUID of the breadcrumb item.\n *\n * @property {boolean} isSomeItemSelected\n * - If true, indicates that at least one breadcrumb item is selected, affecting styling or behavior.\n *\n * @property {any[]} selectedItems\n * - Array of selected breadcrumb items, used to manage selected states and actions.\n *\n * @property {Function} onItemDropped\n * - Callback function that is triggered when a breadcrumb item is dropped.\n *\n * @property {Function} canItemDrop\n * - Determines if a breadcrumb item can be dropped. Used for validation during drag-and-drop operations.\n *\n * @property {FunctionComponent<SVGProps<SVGSVGElement>>} [itemComponent]\n * - Optional custom component for rendering an icon or other visual elements within the breadcrumb item.\n *\n * @property {string[]} acceptedTypes\n * - List of accepted drag-and-drop types for the breadcrumb item.\n *\n * @property {Dispatch} dispatch\n * - The Redux dispatch function for dispatching actions related to the breadcrumb item.\n * @property {Functiodn} useDrop\n * - Hook for dnd.\n */\n\nexport interface BreadcrumbsItemProps<T extends Dispatch, U> {\n item: BreadcrumbItemData;\n totalBreadcrumbsLength: number;\n isHiddenInList?: boolean;\n items: BreadcrumbItemData[];\n breadcrumbButtonDataCy?: string;\n menu?: (props: BreadcrumbsMenuProps) => JSX.Element;\n namePath: {\n name: string;\n uuid: string;\n }[];\n isSomeItemSelected: boolean;\n selectedItems: U[];\n onItemDropped: (\n item: BreadcrumbItemData,\n namePath: {\n name: string;\n uuid: string;\n }[],\n isSomeItemSelected: boolean,\n selectedItems: U[],\n dispatch: T,\n ) => (draggedItem: U, monitor: DropTargetMonitor) => Promise<void>;\n canItemDrop: (item: BreadcrumbItemData) => (draggedItem: U, monitor: DropTargetMonitor<unknown, unknown>) => boolean;\n itemComponent?: FunctionComponent<SVGProps<SVGSVGElement>>;\n acceptedTypes: string[];\n dispatch: T;\n useDrop: typeof useDrop;\n}\n\nconst BreadcrumbsItem = <T extends Dispatch, U>(props: BreadcrumbsItemProps<T, U>): JSX.Element => {\n const [{ isOver, canDrop }, drop] = props.useDrop(\n () => ({\n accept: props.acceptedTypes,\n collect: (monitor) => ({\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n }),\n canDrop: props.canItemDrop(props.item),\n drop: props.onItemDropped(\n props.item,\n props.namePath,\n props.isSomeItemSelected,\n props.selectedItems,\n props.dispatch,\n ),\n }),\n [props.selectedItems],\n );\n\n const onItemClicked = (item: BreadcrumbItemData): void => {\n if (item.active) {\n item.onClick && item.onClick();\n }\n };\n const isDraggingOverClassNames = isOver && canDrop ? 'drag-over-effect' : '';\n\n return (\n <>\n {!props.item.active && !props.item.dialog && props.menu ? (\n <props.menu item={props.item} items={props.items} onItemClicked={onItemClicked} />\n ) : (\n <div\n ref={drop}\n className={`flex ${props.isHiddenInList ? 'w-full' : 'max-w-fit'} ${\n props.item.isFirstPath ? 'shrink-0 pr-1' : 'min-w-breadcrumb flex-1 px-1.5 py-1.5'\n } cursor-pointer flex-row items-center truncate font-medium ${isDraggingOverClassNames}\n ${\n !props.item.active || (props.item.isFirstPath && props.totalBreadcrumbsLength === 1)\n ? 'text-gray-80'\n : 'text-gray-50 hover:text-gray-80'\n }`}\n key={props.item.uuid}\n onClick={() => onItemClicked(props.item)}\n onKeyDown={() => {}}\n data-cy={props?.breadcrumbButtonDataCy}\n >\n {props.itemComponent && <props.itemComponent className=\"h-5 w-5\" />}\n {props.item.icon ? props.item.icon : null}\n {props.item.label ? (\n <span\n className={`max-w-sm flex-1 cursor-pointer truncate ${props.isHiddenInList && 'pl-3 text-base'}`}\n title={props.item.label}\n >\n {props.item.label}\n </span>\n ) : null}\n </div>\n )}\n </>\n );\n};\n\nexport default BreadcrumbsItem;\n","import { CaretRight, DotsThree } from '@phosphor-icons/react';\nimport { forwardRef, FunctionComponent, ReactNode, SVGProps } from 'react';\nimport { Dispatch } from 'redux';\nimport Dropdown from '../dropdown/Dropdown';\nimport BreadcrumbsItem, { BreadcrumbItemData, BreadcrumbsMenuProps } from './BreadcrumbsItem';\nimport { DropTargetMonitor, useDrop } from 'react-dnd';\n\nexport interface BreadcrumbsProps<T extends Dispatch, U> {\n items: BreadcrumbItemData[];\n rootBreadcrumbItemDataCy?: string;\n menu?: (props: BreadcrumbsMenuProps) => JSX.Element;\n namePath: {\n name: string;\n uuid: string;\n }[];\n isSomeItemSelected: boolean;\n selectedItems: U[];\n onItemDropped: (\n item: BreadcrumbItemData,\n namePath: {\n name: string;\n uuid: string;\n }[],\n isSomeItemSelected: boolean,\n selectedItems: U[],\n dispatch: T,\n ) => (draggedItem: U, monitor: DropTargetMonitor) => Promise<void>;\n canItemDrop: (item: BreadcrumbItemData) => (draggedItem: U, monitor: DropTargetMonitor) => boolean;\n itemComponent?: FunctionComponent<SVGProps<SVGSVGElement>>;\n acceptedTypes: string[];\n dispatch: T;\n useDrop: typeof useDrop;\n}\n\n/**\n * Breadcrumbs component\n *\n * @property {BreadcrumbItemData[]} items\n * - Array of breadcrumb items to be displayed, each containing a label, icon, and other related properties.\n *\n * @property {string} [rootBreadcrumbItemDataCy]\n * - Custom `data-cy` attribute applied to the root breadcrumb item.\n *\n * @property {Function} [menu]\n * - Optional custom menu component for rendering a dropdown menu for breadcrumb items that need additional actions\n * or options.\n *\n * @property {Object[]} namePath\n * - Array of objects representing the path and UUID of the breadcrumb item, used for handling navigation or selection.\n *\n * @property {boolean} isSomeItemSelected\n * - If true, indicates that some breadcrumb items are selected, affecting the display and behavior of the breadcrumbs.\n *\n * @property {any[]} selectedItems\n * - Array of selected breadcrumb items, used to manage the selection state and related actions.\n *\n * @property {Function} onItemDropped\n * - Callback function that is triggered when a breadcrumb item is dropped, used for handling drag-and-drop operations.\n *\n * @property {Function} canItemDrop\n * - Determines if a breadcrumb item can be dropped. Used for validating drop actions in the drag-and-drop interaction.\n *\n * @property {FunctionComponent<SVGProps<SVGSVGElement>>} [itemComponent]\n * - Optional custom component for rendering icons or other visual elements inside each breadcrumb item.\n *\n * @property {string[]} acceptedTypes\n * - Array of accepted drag-and-drop types for breadcrumb items,\n * specifying what types of items can be dragged and dropped.\n *\n * @property {Dispatch} dispatch\n * - The Redux dispatch function for dispatching actions related to the breadcrumb items.\n *\n * @property {Functiodn} useDrop\n * - Hook for dnd.\n */\n\nconst Breadcrumbs = <T extends Dispatch, U>(props: Readonly<BreadcrumbsProps<T, U>>): JSX.Element => {\n const MenuItem = forwardRef<HTMLDivElement, { children: ReactNode }>((props, ref) => {\n return (\n <div\n ref={ref}\n className=\"flex cursor-pointer items-center hover:bg-gray-5 hover:text-gray-80 dark:hover:bg-gray-10\"\n >\n {props.children}\n </div>\n );\n });\n\n const getItemsList = (): JSX.Element[] => {\n const items = props.items;\n const itemsList = [] as JSX.Element[];\n const hiddenItemsList = [] as JSX.Element[];\n const breadcrumbSeparator = (key: React.Key) => {\n return (\n <div key={key} className=\"text-dgray-50 flex items-center\">\n <CaretRight weight=\"bold\" className=\"h-4 w-4\" data-testid=\"caret-right\" />\n </div>\n );\n };\n\n for (let i = 0; i < items.length; i++) {\n const separatorKey = 'breadcrumbSeparator-' + items[i].uuid + i.toString();\n const itemKey = 'breadcrumbItem-' + items[i].uuid + i.toString();\n\n if (items.length > 3 && i !== 0 && i < items.length - 2) {\n if (i === 1) {\n itemsList.push(breadcrumbSeparator(separatorKey));\n }\n hiddenItemsList.push(\n <MenuItem>\n <BreadcrumbsItem\n key={itemKey}\n item={items[i]}\n isHiddenInList\n totalBreadcrumbsLength={items.length}\n items={items}\n namePath={props.namePath}\n isSomeItemSelected={props.isSomeItemSelected}\n selectedItems={props.selectedItems}\n onItemDropped={props.onItemDropped}\n canItemDrop={props.canItemDrop}\n itemComponent={props.itemComponent}\n acceptedTypes={props.acceptedTypes}\n dispatch={props.dispatch}\n useDrop={props.useDrop}\n />\n </MenuItem>,\n );\n } else {\n itemsList.push(\n <BreadcrumbsItem\n breadcrumbButtonDataCy={i === 0 ? props?.rootBreadcrumbItemDataCy : undefined}\n key={itemKey}\n item={items[i]}\n totalBreadcrumbsLength={items.length}\n items={items}\n menu={props.menu}\n namePath={props.namePath}\n isSomeItemSelected={props.isSomeItemSelected}\n selectedItems={props.selectedItems}\n onItemDropped={props.onItemDropped}\n canItemDrop={props.canItemDrop}\n acceptedTypes={props.acceptedTypes}\n dispatch={props.dispatch}\n useDrop={props.useDrop}\n />,\n );\n if (i < items.length - 1) {\n itemsList.push(breadcrumbSeparator(separatorKey));\n }\n }\n }\n\n if (hiddenItemsList.length > 0) {\n const menu = (\n <Dropdown\n key=\"breadcrumbDropdownItems\"\n openDirection=\"left\"\n classMenuItems=\"left-0 top-1 w-max max-h-80 overflow-y-auto\n rounded-md border border-gray-10 bg-surface dark:bg-gray-5 shadow-subtle-hard z-10\"\n menuItems={hiddenItemsList}\n >\n {({ open }: { open: boolean }) => {\n return (\n <div\n className={`flex h-8 w-8 items-center justify-center\n rounded-full text-gray-60 transition-all duration-75 ease-in-out hover:bg-gray-5 hover:text-gray-80 ${\n open ? 'bg-gray-5' : ''\n }`}\n >\n <DotsThree weight=\"bold\" className=\"h-5 w-5\" />\n </div>\n );\n }}\n </Dropdown>\n );\n itemsList.splice(2, 0, menu);\n }\n\n return itemsList;\n };\n\n return <div className=\"flex w-full items-center\">{getItemsList()}</div>;\n};\n\nexport default Breadcrumbs;\n","import { IconProps } from '@phosphor-icons/react';\n\ninterface SidenavItemProps {\n label: string;\n notifications?: number;\n Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;\n onClick?: () => void;\n iconDataCy?: string;\n isActive?: boolean;\n isCollapsed?: boolean;\n subsection?: boolean;\n}\n\nconst SidenavItem = ({\n label,\n Icon,\n onClick,\n notifications,\n iconDataCy,\n isActive = false,\n isCollapsed = false,\n subsection = false,\n}: SidenavItemProps): JSX.Element => {\n return (\n <button\n onClick={onClick}\n data-cy={iconDataCy}\n className={`flex w-full flex-col overflow-hidden focus-visible:bg-gray-10 rounded-lg ${\n isActive ? 'bg-primary/20' : 'hover:bg-gray-5'\n } ${subsection ? 'pl-5' : ''}`}\n title={isCollapsed ? label : undefined}\n >\n <div className=\"flex flex-row px-2.5 py-2 w-full items-center justify-between min-h-[36px]\">\n <div className={`flex flex-row gap-3 items-center ${isActive ? 'text-primary' : 'text-gray-80'}`}>\n <Icon size={20} weight={isActive ? 'fill' : 'regular'} className=\"flex-shrink-0\" />\n <p\n className={`font-medium whitespace-nowrap overflow-hidden transition-all duration-300 ${isCollapsed ? 'opacity-0 delay-200' : 'opacity-100 delay-0'}`}\n >\n {label}\n </p>\n </div>\n <div\n className={`flex rounded-full px-2 py-1 transition-all duration-300 ${isActive ? 'text-white bg-primary' : 'bg-gray-10 text-gray-60'} ${isCollapsed || !notifications ? 'opacity-0 invisible delay-300' : 'opacity-100 delay-0'}`}\n >\n {notifications && <p className=\"text-xs font-medium\">{notifications}</p>}\n </div>\n </div>\n </button>\n );\n};\n\nexport default SidenavItem;\n","import { Icon } from '@phosphor-icons/react';\nimport SidenavItem from './SidenavItem';\n\nexport interface SidenavOption {\n label: string;\n icon: Icon;\n iconDataCy: string;\n isVisible: boolean;\n isActive?: boolean;\n notifications?: number;\n onClick?: () => void;\n subsection?: boolean;\n}\n\ninterface SidenavOptionsProps {\n options: SidenavOption[];\n isCollapsed: boolean;\n showSubsections?: boolean;\n}\n\nconst SidenavOptions = ({ options, isCollapsed, showSubsections }: SidenavOptionsProps): JSX.Element => {\n return (\n <div className=\"flex flex-col w-full\">\n {options\n .filter((option) => option.isVisible)\n .map((option, index) => {\n if (option.subsection && !showSubsections) {\n return null;\n }\n\n if (isCollapsed && option.subsection) {\n return null;\n }\n\n return (\n <SidenavItem\n key={`${option.iconDataCy}-${index}`}\n label={option.label}\n Icon={option.icon}\n iconDataCy={option.iconDataCy}\n isActive={option.isActive}\n notifications={option.notifications}\n onClick={option.onClick}\n isCollapsed={isCollapsed}\n subsection={option.subsection}\n />\n );\n })}\n </div>\n );\n};\n\nexport default SidenavOptions;\n","import { useState, useRef, useEffect } from 'react';\nimport { ReactNode } from 'react';\n\nexport interface PopoverProps {\n childrenButton: ReactNode;\n panel: (closePopover: () => void) => ReactNode;\n className?: string;\n classButton?: string;\n align?: 'left' | 'right';\n}\n\n/**\n * Popover component\n *\n * @property {ReactNode} childrenButton\n * - The content to be displayed inside the trigger button.\n *\n * @property {(closePopover: () => void) => ReactNode} panel\n * - A function that returns the content to be displayed inside the popover panel.\n * It receives a `closePopover` function as a parameter, which can be used to programmatically close the popover.\n *\n * @property {string} [className]\n * - Additional custom classes for the outermost container of the popover.\n * Can be used for positioning or adding custom styles.\n *\n * @property {string} [classButton]\n * - Custom classes for the trigger button.\n *\n * @returns {JSX.Element}\n * - The rendered Popover component.\n */\n\nconst Popover = ({ childrenButton, panel, className, classButton, align = 'right' }: PopoverProps): JSX.Element => {\n const [isOpen, setIsOpen] = useState(false);\n const panelRef = useRef<HTMLDivElement | null>(null);\n const [showContent, setShowContent] = useState(isOpen);\n const [transitionOpacity, setTransitionOpacity] = useState<string>('opacity-0');\n const [transitionScale, setTransitionScale] = useState<string>('scale-95');\n\n const togglePopover = () => setIsOpen((prev) => !prev);\n\n const handleMouseDown = (event: MouseEvent) => {\n if (panelRef.current && !panelRef.current.contains(event.target as Node)) {\n closePopover();\n }\n };\n\n const closePopover = () => {\n setIsOpen(false);\n };\n\n useEffect(() => {\n if (isOpen) {\n const timeout = setTimeout(() => {\n setTransitionOpacity('opacity-100');\n setTransitionScale('scale-100');\n }, 10);\n setShowContent(true);\n return () => clearTimeout(timeout);\n } else {\n setTransitionOpacity('opacity-0');\n setTransitionScale('scale-95');\n const timeout = setTimeout(() => {\n setShowContent(false);\n }, 100);\n return () => clearTimeout(timeout);\n }\n }, [isOpen]);\n\n useEffect(() => {\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, []);\n\n return (\n <div style={{ lineHeight: 0 }} className={`relative ${className}`}>\n <button\n onClick={togglePopover}\n className={`cursor-pointer outline-none ${classButton}`}\n aria-expanded={isOpen}\n data-testid=\"popover-button\"\n >\n {childrenButton}\n </button>\n {showContent && (\n <div\n ref={panelRef}\n className={\n 'absolute z-50 mt-1 transform rounded-md border border-gray-10 ' +\n `${align === 'left' ? 'left-0 origin-top-left' : 'right-0 origin-top-right'} ` +\n `bg-surface py-1.5 shadow-subtle duration-100 ease-out dark:bg-gray-5 ${transitionOpacity} ${transitionScale}`\n }\n >\n {panel(closePopover)}\n </div>\n )}\n </div>\n );\n};\n\nexport default Popover;\n","import { DotsNineIcon, LockIcon } from '@phosphor-icons/react';\nimport { cloneElement, isValidElement } from 'react';\nimport { Popover } from '../../overlay/popover';\n\nexport interface SuiteLauncherProps {\n className?: string;\n suiteArray: {\n icon: JSX.Element;\n title: string;\n onClick: () => void;\n isMain?: boolean;\n availableSoon?: boolean;\n isLocked?: boolean;\n }[];\n soonText?: string;\n align?: 'left' | 'right';\n}\n\n/**\n * SuiteLauncher renders a dropdown menu with a list of suite applications.\n *\n * @param {suiteLauncherProps} props\n * - Object containing properties for the suiteLauncher component.\n *\n * @param {suiteLauncherProps['suiteArray']} props.suiteArray\n * - Array of objects containing the suite applications.\n *\n * @param {string} [props.className]\n * - Optional CSS class name for the suiteLauncher component.\n *\n * @param {string} [props.soonText]\n * - Optional text to display when a suite application is available soon. It should be a translated string. Defaults to \"Soon\".\n *\n * @returns {JSX.Element}\n * - The rendered suiteLauncher component.\n */\nexport default function SuiteLauncher({\n className = '',\n suiteArray,\n soonText,\n align = 'right',\n}: Readonly<SuiteLauncherProps>): JSX.Element {\n const SuiteButton = (\n <div className=\"flex h-10 w-10 items-center justify-center\">\n <DotsNineIcon size={26} className=\"h-7 w-7\" weight=\"bold\" />\n </div>\n );\n\n const panel = (\n <div className=\"w-64 flex flex-wrap p-4\" data-testid=\"suite-launcher-panel\">\n {suiteArray.map((suiteApp, idx) => (\n <div\n key={idx}\n className={`w-1/3 flex items-center justify-center rounded-md ${suiteApp.isMain ? 'bg-primary/10 dark:bg-primary/20' : ''}`}\n >\n <div\n role=\"none\"\n className={\n 'flex items-center p-4 text-gray-80 w-full rounded-md ' +\n `${suiteApp.availableSoon ? '' : 'cursor-pointer hover:bg-gray-1 dark:hover:bg-gray-10'}`\n }\n style={{ lineHeight: 1.25 }}\n onClick={suiteApp.availableSoon ? undefined : suiteApp.onClick}\n >\n <div className=\"flex flex-col items-center w-full rounded-md\">\n {suiteApp.isLocked ? (\n <LockIcon\n size={26}\n weight=\"regular\"\n className=\"opacity-50 filter grayscale\"\n data-testid=\"suite-launcher-lock-icon\"\n />\n ) : isValidElement(suiteApp.icon as JSX.Element) ? (\n cloneElement(suiteApp.icon as JSX.Element, {\n size: 26,\n className:\n `${suiteApp.icon.props?.className ?? ''} ${suiteApp.isMain ? 'text-primary' : 'text-gray-80'} ` +\n `${suiteApp.availableSoon || suiteApp.isLocked ? 'opacity-50 filter grayscale' : ''}`,\n weight: suiteApp.isMain ? 'fill' : 'regular',\n })\n ) : (\n suiteApp.icon\n )}\n\n <div className=\"mt-1 flex items-center\">\n <span\n className={`text-xs font-medium whitespace-nowrap ${suiteApp.isMain ? 'text-primary' : 'text-gray-80'}`}\n style={{ lineHeight: 1, opacity: suiteApp.availableSoon || suiteApp.isLocked ? 0.5 : 1 }}\n >\n {suiteApp.title}\n </span>\n\n {suiteApp.availableSoon && (\n <div className=\"flex rounded-sm px-1 ml-1 py-0.5 bg-purple-1 dark:bg-purple-10 items-center\">\n <span\n className=\"font-medium text-purple-10 dark:text-purple-1\"\n style={{ lineHeight: 1, fontSize: 'xx-small' }}\n >\n {soonText ?? 'Soon'}\n </span>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n ))}\n </div>\n );\n\n return (\n <Popover\n className={className}\n childrenButton={SuiteButton}\n panel={() => panel}\n align={align}\n data-testid=\"app-suite-dropdown\"\n />\n );\n}\n","import { SidebarSimpleIcon } from '@phosphor-icons/react';\nimport { SuiteLauncher } from '../suiteLauncher';\n\ninterface SidenavHeaderProps {\n logo: string;\n title: string;\n onClick: () => void;\n isCollapsed: boolean;\n className?: string;\n onToggleCollapse?: () => void;\n suiteLauncher?: {\n className?: string;\n suiteArray: {\n icon: JSX.Element;\n title: string;\n onClick: () => void;\n isMain?: boolean;\n availableSoon?: boolean;\n isLocked?: boolean;\n }[];\n soonText: string;\n };\n}\n\nconst SidenavHeader = ({\n logo,\n title,\n onClick,\n isCollapsed,\n className,\n onToggleCollapse,\n suiteLauncher,\n}: SidenavHeaderProps): JSX.Element => {\n return (\n <div className={`flex flex-row justify-between w-full py-5 px-2 ${className}`}>\n <div className=\"relative flex flex-row gap-2 items-center\">\n <button className=\"flex flex-row gap-2 items-center\" onClick={onClick}>\n <img\n src={logo}\n width={28}\n height={28}\n alt={title}\n className={`flex-shrink-0 min-w-[28px] min-h-[28px] ${isCollapsed ? 'group-hover:hidden' : ''}`}\n />\n {!isCollapsed && <p className=\"text-xl font-medium text-gray-100 whitespace-nowrap\">{title}</p>}\n </button>\n {isCollapsed && onToggleCollapse && (\n <button\n onClick={onToggleCollapse}\n className=\"hidden group-hover:flex items-center justify-center text-gray-80 absolute left-0\"\n >\n <SidebarSimpleIcon size={28} />\n </button>\n )}\n </div>\n <div\n className={`flex z-20 flex-row gap-2 items-center transition-opacity duration-100 ${isCollapsed ? 'opacity-0 invisible' : 'opacity-100'}`}\n >\n {suiteLauncher && (\n <SuiteLauncher\n suiteArray={suiteLauncher?.suiteArray}\n soonText={suiteLauncher?.soonText}\n className={`text-gray-80 ${suiteLauncher?.className}`}\n align=\"left\"\n />\n )}\n {onToggleCollapse && (\n <button\n onClick={onToggleCollapse}\n className=\"flex items-center justify-center text-gray-80 hover:text-gray-90\"\n >\n <SidebarSimpleIcon size={28} />\n </button>\n )}\n </div>\n </div>\n );\n};\n\nexport default SidenavHeader;\n","interface SidenavStorageProps {\n usage: string;\n limit: string;\n percentage: number;\n onUpgradeClick: () => void;\n upgradeLabel?: string;\n isLoading?: boolean;\n}\n\nconst SidenavStorage = ({\n usage,\n limit,\n percentage,\n onUpgradeClick,\n upgradeLabel,\n isLoading = true,\n}: SidenavStorageProps): JSX.Element => {\n return (\n <div className=\"flex flex-col w-full gap-2.5 px-2 pb-5\">\n <div className=\"flex flex-row w-full justify-between\">\n <div className=\"flex flex-row items-center gap-2\">\n {isLoading ? (\n <div className=\"flex flex-row items-center gap-2\">\n <div className=\"h-3 w-8 rounded-lg bg-gray-5 animate-pulse\" />\n <div className=\"h-3 w-2 rounded-lg bg-gray-5 animate-pulse\" />\n <div className=\"h-3 w-8 rounded-lg bg-gray-5 animate-pulse\" />\n </div>\n ) : (\n <>\n <p className=\"text-gray-60 text-sm font-semibold\">{usage}</p>\n <p className=\"text-gray-60 text-sm\">/</p>\n <p className=\"text-gray-60 text-sm\">{limit}</p>\n </>\n )}\n </div>\n {upgradeLabel && (\n <button className=\"text-primary text-sm hover:text-primary-dark font-semibold\" onClick={onUpgradeClick}>\n {upgradeLabel}\n </button>\n )}\n </div>\n <div className=\"flex w-full h-1.5 bg-gray-10 rounded-full\">\n <div\n className=\"bg-gray-60 rounded-full\"\n style={{\n width: `${percentage}%`,\n }}\n />\n </div>\n </div>\n );\n};\n\nexport default SidenavStorage;\n","import { ReactNode, useEffect, useRef, useState } from 'react';\nimport { WarningIcon } from '@phosphor-icons/react';\nimport SidenavOptions, { SidenavOption } from './SidenavOptions';\nimport SidenavHeader from './SidenavHeader';\nimport SidenavStorage from './SidenavStorage';\n\nexport interface SidenavHeaderProps {\n logo: string;\n title: string;\n onClick: () => void;\n className?: string;\n}\n\nexport interface SidenavStorageProps {\n usage: string;\n limit: string;\n percentage: number;\n onUpgradeClick: () => void;\n upgradeLabel?: string;\n isLoading?: boolean;\n}\n\nexport interface SidenavProps {\n header: SidenavHeaderProps;\n primaryAction?: ReactNode;\n suiteLauncher?: {\n className?: string;\n suiteArray: {\n icon: JSX.Element;\n title: string;\n onClick: () => void;\n isMain?: boolean;\n availableSoon?: boolean;\n isLocked?: boolean;\n }[];\n soonText: string;\n };\n collapsedPrimaryAction?: ReactNode;\n options: SidenavOption[];\n showSubsections?: boolean;\n isCollapsed?: boolean;\n storage?: SidenavStorageProps;\n notification?: {\n message: string;\n actionLabel: string;\n onAction: () => void;\n type?: 'warning';\n };\n onToggleCollapse?: () => void;\n}\n\n/**\n * Sidenav component\n *\n * A custom sidenav component that provides a sidebar with options for navigation and interaction.\n *\n * @property {SidenavHeader} header - Header configuration with logo, title, and onClick handler\n * @property {ReactNode} primaryAction - The primary action displayed at the top of the sidenav\n * @property {object} suiteLauncher - The suite launcher configuration\n * @property {ReactNode} collapsedPrimaryAction - The primary action displayed when the sidenav is collapsed\n * @property {SidenavOption[]} options - An array of options to be displayed in the sidenav. Each option can specify an 'as' prop to use a custom component (e.g., NavLink)\n * @property {boolean} showSubsections - Determines whether to display the subsections of the sidenav\n * @property {boolean} isCollapsed - Determines whether the sidenav is collapsed or not\n * @property {SidenavStorage} storage - The storage information displayed at the bottom of the sidenav\n * @property {object} notification - Optional structured notification rendered above the storage section (hidden when collapsed). Accepts message, actionLabel, onAction, and an optional type ('warning').\n * @property {() => void} onToggleCollapse - A callback function triggered when the collapse button is clicked\n */\nconst Sidenav = ({\n header,\n primaryAction,\n suiteLauncher,\n collapsedPrimaryAction,\n options,\n showSubsections,\n isCollapsed = false,\n storage,\n notification,\n onToggleCollapse,\n}: SidenavProps) => {\n const [showContent, setShowContent] = useState(!isCollapsed);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n if (timerRef.current) clearTimeout(timerRef.current);\n if (isCollapsed) {\n setShowContent(false);\n } else {\n timerRef.current = setTimeout(() => setShowContent(true), 300);\n }\n return () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n };\n }, [isCollapsed]);\n\n return (\n <div\n className={`relative flex flex-col p-2 h-full justify-between bg-gray-1 border-r border-gray-10 transition-all duration-300 group ${\n isCollapsed ? 'w-[60px]' : 'w-64'\n }`}\n >\n <div className=\"flex flex-col\">\n <SidenavHeader\n logo={header.logo}\n title={header.title}\n onClick={header.onClick}\n isCollapsed={isCollapsed}\n onToggleCollapse={onToggleCollapse}\n suiteLauncher={suiteLauncher}\n className={header.className}\n />\n\n <div className=\"flex flex-col gap-4 overflow-hidden\">\n <div className=\"relative\">\n {!isCollapsed && <div className=\"transition-opacity duration-300 opacity-100\">{primaryAction}</div>}\n {isCollapsed && <div className=\"transition-opacity duration-300 opacity-100\">{collapsedPrimaryAction}</div>}\n </div>\n <SidenavOptions options={options} isCollapsed={isCollapsed} showSubsections={showSubsections} />\n </div>\n </div>\n\n {(notification || storage) && showContent && (\n <div className=\"flex flex-col\">\n {notification && (\n <div className=\"px-2 pb-2\">\n <div className=\"flex gap-1.5 items-start p-3 rounded-lg bg-yellow/10 border border-yellow/20\">\n <WarningIcon className=\"size-5 shrink-0 text-yellow-dark\" weight=\"fill\" />\n <div className=\"flex flex-col gap-0.5 min-w-0\">\n <p className=\"text-xs leading-tight text-gray-100\">{notification.message}</p>\n <button\n type=\"button\"\n onClick={notification.onAction}\n className=\"self-start text-xs font-medium text-primary hover:underline\"\n >\n {notification.actionLabel}\n </button>\n </div>\n </div>\n </div>\n )}\n {storage && (\n <SidenavStorage\n usage={storage.usage}\n limit={storage.limit}\n percentage={storage.percentage}\n onUpgradeClick={storage.onUpgradeClick}\n upgradeLabel={storage.upgradeLabel}\n isLoading={storage.isLoading}\n />\n )}\n </div>\n )}\n </div>\n );\n};\n\nexport default Sidenav;\n","import { IconWeight, X } from '@phosphor-icons/react';\n\nexport interface BaseDialogProps {\n isOpen: boolean;\n title?: string;\n hideCloseButton?: boolean;\n subTitle?: string;\n dialogRounded?: boolean;\n children: JSX.Element | JSX.Element[];\n classes?: string;\n titleClasses?: string;\n panelClasses?: string;\n closeClass?: string;\n weightIcon?: IconWeight;\n bgColor?: string;\n onClose: () => void;\n dataTest?: string;\n}\n\n/**\n * BaseDialog component\n *\n * @property {boolean} isOpen\n * - Controls whether the dialog is open or closed. If true, the dialog is visible.\n *\n * @property {string} [title]\n * - The title of the dialog, displayed at the top of the dialog box.\n *\n * @property {boolean} [hideCloseButton]\n * - If true, hides the close button (X icon) in the top right corner of the dialog.\n *\n * @property {string} [subTitle]\n * - A subtitle for the dialog, displayed below the title.\n *\n * @property {boolean} [dialogRounded]\n * - If true, applies a more rounded corner style to the dialog.\n *\n * @property {JSX.Element | JSX.Element[]} children\n * - The content to be displayed inside the dialog. Can be a single JSX element or an array of elements.\n *\n * @property {string} [classes]\n * - Custom classes for the outermost container of the dialog. Allows additional styling like margins or padding.\n *\n * @property {string} [titleClasses]\n * - Custom classes for styling the title element. Can modify font size, weight, etc.\n *\n * @property {string} [panelClasses]\n * - Custom classes for the main dialog panel, where the content is displayed.\n *\n * @property {string} [closeClass]\n * - Custom classes for the close button, allowing for customization of the button's appearance.\n *\n * @property {IconWeight} [weightIcon]\n * - Controls the thickness of the close button icon (X). Options range from \"thin\" to \"bold\".\n *\n * @property {string} [bgColor]\n * - Custom background color for the dialog. Defaults to a light surface color if not provided.\n *\n * @property {() => void} onClose\n * - Callback function triggered when the close button or overlay is clicked, used to close the dialog.\n */\n\nconst BaseDialog = ({\n isOpen,\n title,\n subTitle,\n dialogRounded,\n children,\n onClose,\n classes,\n panelClasses,\n titleClasses,\n closeClass,\n weightIcon,\n bgColor,\n dataTest,\n hideCloseButton,\n}: BaseDialogProps): JSX.Element => {\n return (\n <div\n data-test={dataTest}\n className={`${isOpen ? 'flex' : 'hidden'} ${\n classes || ''\n } absolute bottom-0 left-0 right-0 top-0 z-50 bg-black/40`}\n >\n <div\n className={`${panelClasses || ''} absolute left-1/2 top-1/2 flex w-104 -translate-x-1/2\n -translate-y-1/2 flex-col overflow-hidden ${dialogRounded ? 'rounded-2xl' : 'rounded-lg pt-8'} text-gray-100 ${\n bgColor || 'bg-surface'\n }`}\n >\n <div className={`${subTitle ? 'justify-between bg-gray-1' : ''} p-5 flex flex-row items-start`}>\n {title ? (\n <div className=\"relative flex max-w-full flex-1 flex-col truncate\">\n <span className={`${titleClasses || ''} truncate text-xl`} title={title}>\n {title}\n </span>\n <span className=\"max-w-fit flex-1 truncate text-base font-normal text-gray-50\">{subTitle}</span>\n </div>\n ) : null}\n {hideCloseButton ? null : (\n <div\n className={`relative ml-auto cursor-pointer bg-surface\n transition duration-200 ease-in-out ${closeClass || 'text-primary hover:text-primary-dark'} `}\n >\n <X role=\"button\" onClick={onClose} size={28} weight={weightIcon} />\n </div>\n )}\n </div>\n {children}\n </div>\n </div>\n );\n};\n\nexport default BaseDialog;\n","import { useEffect } from 'react';\nimport { useState } from 'react';\nimport { Button } from '../../input/button';\n\nexport interface DialogProps {\n isOpen: boolean;\n onClose: () => void;\n onPrimaryAction: () => void;\n onSecondaryAction: () => void;\n title: string;\n subtitle: string;\n primaryAction: string | JSX.Element;\n secondaryAction: string | JSX.Element;\n primaryActionColor: 'primary' | 'danger';\n isLoading?: boolean;\n maxWidth?: 'sm' | 'md' | 'lg';\n}\n\n/**\n * Dialog component\n *\n * @property {boolean} isOpen\n * - Controls whether the dialog is open or closed. If true, the dialog becomes visible.\n *\n * @property {() => void} onClose\n * - Callback function triggered when the overlay or the close button is clicked. Used to close the dialog.\n *\n * @property {() => void} onPrimaryAction\n * - Callback function triggered when the primary action button is clicked.\n *\n * @property {() => void} onSecondaryAction\n * - Callback function triggered when the secondary action button is clicked.\n *\n * @property {string} title\n * - The title of the dialog, displayed at the top of the dialog box.\n *\n * @property {string} subtitle\n * - A subtitle for the dialog, displayed below the title.\n *\n * @property {string | JSX.Element} primaryAction\n * - The label or content for the primary action button.\n *\n * @property {string} secondaryAction\n * - The label or content for the secondary action button.\n *\n * @property {('primary' | 'danger')} primaryActionColor\n * - Defines the color of the primary action button. Can either be 'primary' or 'danger'.\n *\n * @property {boolean} [isLoading]\n * - Optional flag to indicate if the buttons should show a loading state. Defaults to false.\n *\n * @property {'sm' | 'md' | 'lg'} [maxWidth]\n * - Optional maximum width for the dialog. Can be 'sm', 'md', or 'lg'.\n *\n * @returns {JSX.Element}\n * - The rendered dialog component.\n */\n\nconst Dialog = ({\n isOpen,\n onClose,\n onPrimaryAction,\n onSecondaryAction,\n title,\n subtitle,\n primaryAction,\n secondaryAction,\n primaryActionColor,\n isLoading,\n maxWidth = 'sm',\n}: DialogProps): JSX.Element => {\n const [isVisible, setIsVisible] = useState(isOpen);\n const [transitionOpacity, setTransitionOpacity] = useState<string>('opacity-0');\n const [transitionScale, setTransitionScale] = useState<string>('scale-95');\n\n useEffect(() => {\n if (isOpen) {\n const timeout = setTimeout(() => {\n setTransitionOpacity('opacity-100');\n setTransitionScale('scale-100');\n }, 10);\n setIsVisible(true);\n return () => clearTimeout(timeout);\n } else {\n setTransitionOpacity('opacity-0');\n setTransitionScale('scale-95');\n const timeout = setTimeout(() => {\n setIsVisible(false);\n }, 150);\n return () => clearTimeout(timeout);\n }\n }, [isOpen]);\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n onClose();\n }\n };\n\n if (isOpen) {\n window.addEventListener('keydown', handleKeyDown);\n }\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [isOpen, onClose]);\n\n return (\n <>\n {isVisible && (\n <div className={`fixed inset-0 z-50 ${isOpen ? '' : 'pointer-events-none'}`}>\n <div\n className={\n `absolute inset-0 bg-gray-100/50 transition-opacity duration-150 ` +\n `dark:bg-black/75 ${transitionOpacity}`\n }\n onClick={onClose}\n data-testid=\"dialog-overlay\"\n ></div>\n\n <div\n className={\n `absolute left-1/2 top-1/2 w-full max-w-${maxWidth} -translate-x-1/2 -translate-y-1/2 transform ` +\n `rounded-2xl bg-surface p-5 transition-all duration-150 dark:bg-gray-1 ${transitionScale} ${transitionOpacity}`\n }\n >\n <div className=\"flex flex-col space-y-2\">\n <p className=\"text-2xl font-medium text-gray-100\">{title}</p>\n <p className=\"text-gray-60\">{subtitle}</p>\n </div>\n\n <div className=\"mt-5 flex justify-end space-x-2\">\n <Button variant=\"secondary\" onClick={onSecondaryAction} disabled={isLoading}>\n {secondaryAction}\n </Button>\n <Button\n onClick={onPrimaryAction}\n loading={isLoading}\n variant={primaryActionColor === 'primary' ? 'primary' : 'destructive'}\n >\n {primaryAction}\n </Button>\n </div>\n </div>\n </div>\n )}\n </>\n );\n};\n\nexport default Dialog;\n","import { ReactNode, useEffect, useRef, useState } from 'react';\n\nexport interface ModalProps {\n isOpen: boolean;\n onClose: () => void;\n children: ReactNode;\n maxWidth?: string;\n className?: string;\n width?: string;\n preventClosing?: boolean;\n stopMouseDownPropagation?: boolean;\n}\n\n/**\n * Modal component\n *\n * @param {ModalProps} props - Properties of the Modal component.\n *\n * @property {boolean} isOpen\n * - Controls the visibility of the modal. If `true`, the modal is shown; if `false`, the modal is hidden.\n *\n * @property {() => void} onClose\n * - Callback function that is called when the modal is closed.\n * This function is triggered by clicking outside the modal or\n * pressing the 'Escape' key (unless `preventClosing` is `true`).\n *\n * @property {ReactNode} children\n * - The content to be displayed inside the modal.\n *\n * @property {string} [maxWidth]\n * - Optional maximum width for the modal. Defaults to `'max-w-lg'` if not specified.\n *\n * @property {string} [className]\n * - Optional custom class names to apply to the modal content wrapper.\n *\n * @property {string} [width]\n * - Optional width for the modal. Defaults to `'w-full'` if not specified.\n *\n * @property {boolean} [preventClosing=false]\n * - Optional flag to prevent the modal from closing when clicking outside or pressing the 'Escape' key.\n *\n * @property {boolean} [stopMouseDownPropagation=false]\n * - Optional flag to stop event propagation on mousedown events.\n *\n * @returns {JSX.Element | null}\n * - The rendered Modal component, or `null` if `isOpen` is `false`.\n *\n * The component uses a series of hooks and effects to manage modal transitions and handle click and key press events.\n * It supports smooth opacity and scale transitions during opening and closing,\n * and prevents interaction with the modal's background during the transitions.\n *\n * The `preventClosing` prop ensures the modal stays open when interacting outside of the modal or pressing 'Escape'.\n *\n * The modal is displayed with a fixed position in the center of the screen, with a backdrop overlay.\n * The content of the modal is rendered inside a flex container with transition effects to animate its appearance.\n */\n\nconst Modal = ({\n isOpen,\n onClose,\n children,\n maxWidth,\n className,\n width,\n preventClosing = false,\n stopMouseDownPropagation = false,\n}: ModalProps): JSX.Element | null => {\n const modalRef = useRef<HTMLDivElement | null>(null);\n const [showContent, setShowContent] = useState(isOpen);\n const [transitionOpacity, setTransitionOpacity] = useState<string>('opacity-0');\n const [transitionScale, setTransitionScale] = useState<string>('scale-95');\n\n const closeLastOpenModal = () => {\n const openModals = document.querySelectorAll('[data-modal]');\n const lastModal = openModals[openModals.length - 1];\n if (modalRef.current === lastModal) {\n onClose();\n }\n };\n\n const handleMouseDown = (e: React.MouseEvent) => {\n if (stopMouseDownPropagation) {\n e.stopPropagation();\n }\n };\n\n useEffect(() => {\n if (isOpen) {\n const timeout = setTimeout(() => {\n setTransitionOpacity('opacity-100');\n setTransitionScale('scale-100');\n }, 10);\n setShowContent(true);\n return () => clearTimeout(timeout);\n } else {\n setTransitionOpacity('opacity-0');\n setTransitionScale('scale-95');\n const timeout = setTimeout(() => {\n setShowContent(false);\n }, 150);\n return () => clearTimeout(timeout);\n }\n }, [isOpen]);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node) && !preventClosing) {\n event.preventDefault();\n closeLastOpenModal();\n }\n };\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isOpen, onClose, preventClosing]);\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && !preventClosing) {\n event.preventDefault();\n closeLastOpenModal();\n }\n };\n\n if (isOpen) {\n window.addEventListener('keydown', handleKeyDown);\n }\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [isOpen, onClose, preventClosing]);\n\n return (\n <>\n {showContent && (\n <div className=\"m-0\" onMouseDown={handleMouseDown} role=\"dialog\" aria-modal=\"true\">\n <div\n className={`\n fixed\n min-h-full\n inset-0\n z-[9999]\n bg-highlight/40\n transition-opacity\n duration-150\n ease-out\n ${transitionOpacity}\n pointer-events-none \n `}\n />\n <div\n className={`\n fixed\n inset-0\n z-[9999]\n flex\n min-h-full\n items-center\n justify-center\n transition-opacity\n duration-150\n ease-out\n overflow-y-auto\n ${transitionOpacity}\n ${transitionScale}\n `}\n >\n <section\n data-testid={'ModalContent'}\n ref={modalRef}\n data-modal\n className={`\n ${width ?? 'w-full'}\n ${maxWidth ?? 'max-w-lg'}\n ${className ?? 'p-5'}\n text-gray-100\n rounded-2xl\n bg-surface\n shadow-subtle-hard\n transform\n transition-all\n duration-150\n ease-out\n ${transitionOpacity}\n ${transitionScale}\n `}\n >\n {children}\n </section>\n </div>\n </div>\n )}\n </>\n );\n};\n\nexport default Modal;\n","import { ReactNode, useEffect, useRef, useState } from 'react';\n\nexport interface TransparentModalProps {\n isOpen: boolean;\n onClose: () => void;\n children: ReactNode;\n className?: string;\n disableBackdrop?: boolean;\n}\n\nconst TransparentModal = ({ isOpen, onClose, children, className, disableBackdrop = false }: TransparentModalProps) => {\n const modalRef = useRef<HTMLDivElement>(null);\n const [showContent, setShowContent] = useState(isOpen);\n const [transitionOpacity, setTransitionOpacity] = useState('opacity-0');\n const [transitionScale, setTransitionScale] = useState('scale-95');\n\n useEffect(() => {\n if (isOpen) {\n setShowContent(true);\n const timeout = setTimeout(() => {\n setTransitionOpacity('opacity-100');\n setTransitionScale('scale-100');\n }, 10);\n return () => clearTimeout(timeout);\n } else {\n setTransitionOpacity('opacity-0');\n setTransitionScale('scale-95');\n const timeout = setTimeout(() => {\n setShowContent(false);\n }, 150);\n return () => clearTimeout(timeout);\n }\n }, [isOpen]);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node)) {\n onClose();\n }\n };\n\n if (isOpen && !disableBackdrop) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isOpen, onClose, disableBackdrop]);\n\n if (!showContent) return null;\n\n return (\n <div\n className={`\n fixed \n inset-0 \n z-50 \n flex \n items-center \n justify-center\n ${disableBackdrop ? 'pointer-events-none' : ''}\n `}\n >\n {/* Backdrop */}\n {!disableBackdrop && (\n <div\n className={`\n fixed \n inset-0 \n bg-black/50 \n backdrop-blur-sm \n transition-opacity \n duration-200\n ${transitionOpacity}\n `}\n />\n )}\n\n {/* Modal */}\n <div\n ref={modalRef}\n className={`\n relative\n flex\n bg-black/15\n border\n border-white/15\n rounded-[20px]\n backdrop-blur\n shadow-lg\n transition-all\n duration-200\n pointer-events-auto\n ${transitionOpacity}\n ${transitionScale}\n ${className}\n `}\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport default TransparentModal;\n","const MessageCheapSkeleton = () => (\n <div className={'flex flex-col text-left gap-2 w-full py-3 px-5 border-b border-gray-5'}>\n <div className=\"flex flex-row w-full gap-2\">\n {/* Avatar */}\n <div className=\"flex flex-col h-7 w-8 rounded-full animate-pulse bg-gray-10\" />\n <div className=\"flex flex-col gap-1 w-full\">\n {/* Name and date */}\n <div className={'flex flex-row w-full justify-between'}>\n <div className=\"flex rounded-md w-1/3 h-3 bg-gray-10 animate-pulse\" />\n <div className=\"flex rounded-md w-1/4 h-3 bg-gray-10 animate-pulse\" />\n </div>\n {/* Subject */}\n <div className=\"flex rounded-md w-1/2 h-3 bg-gray-10 animate-pulse\" />\n {/* Body */}\n <div className=\"flex rounded-md w-full h-3 bg-gray-10 animate-pulse\" />\n </div>\n </div>\n </div>\n);\n\nexport default MessageCheapSkeleton;\n","import { Avatar } from '@/components/avatar';\n\nexport interface MessageCheapProps {\n email: {\n id: string;\n from: {\n name: string;\n avatar: string;\n };\n subject: string;\n createdAt: string;\n body: string;\n read: boolean;\n };\n active?: boolean;\n selected?: boolean;\n onClick: (id: string, isRead?: boolean) => void;\n}\n\nconst MessageCheap = ({ email, active, selected, onClick }: MessageCheapProps) => {\n const isHighlighted = active || selected;\n\n return (\n <button\n onClick={() => onClick(email.id, email.read)}\n className={`flex flex-col border-b border-gray-10 text-left gap-2 w-full py-3 px-5 ${isHighlighted ? 'bg-primary/10' : ''}`}\n >\n <div className=\"flex flex-row w-full gap-2\">\n <Avatar fullName={email.from.name} src={email.from.avatar} size={'xxs'} />\n <div className=\"flex flex-col w-full\">\n <div className={`flex flex-row w-full justify-between ${isHighlighted ? 'text-primary' : ''}`}>\n <div className=\"flex flex-row gap-1 w-full max-w-[150px] items-center\">\n {!email.read && <div className=\"h-2 w-2 rounded-full bg-primary\" />}\n <p className=\"font-semibold truncate\">{email.from.name}</p>\n </div>\n <div>\n <p className={`text-sm font-medium ${isHighlighted ? 'text-primary' : 'text-gray-50'}`}>\n {email.createdAt}\n </p>\n </div>\n </div>\n <p className={`text-sm font-semibold ${isHighlighted ? 'text-primary' : ''}`}>{email.subject}</p>\n <p className={`text-sm ${isHighlighted ? 'text-primary/80' : 'text-gray-50'}`}>{email.body}</p>\n </div>\n </div>\n </button>\n );\n};\n\nexport default MessageCheap;\n","import { InfiniteScroll } from '@/components/infiniteScroll';\nimport MessageCheapSkeleton from '../cheaps/MessageCheapSkeleton';\nimport MessageCheap from '../cheaps/MessageCheap';\nimport { ReactNode } from 'react';\n\nexport interface TrayListProps {\n mails: {\n id: string;\n from: {\n name: string;\n avatar: string;\n };\n subject: string;\n createdAt: string;\n body: string;\n read: boolean;\n }[];\n selectedEmails?: string[];\n loading: boolean;\n checked?: boolean;\n activeEmail?: string;\n hasMoreItems?: boolean;\n emptyState?: ReactNode;\n onMailSelected?: (id: string, isRead?: boolean) => void;\n onLoadMore?: () => void;\n}\n\n/**\n *\n * @param {TrayListProps} TrayListProps - Props for the TrayList component\n * @prop {Array} TrayListProps.mails - An array of email objects\n *\n * @prop {string[]} TrayListProps.selectedEmails - An array of selected email IDs\n *\n * @prop {boolean} TrayListProps.loading - A boolean indicating loading state\n *\n * @prop {boolean} TrayListProps.checked - A boolean indicating whether all emails are checked\n *\n * @prop {string} TrayListProps.activeEmail - The ID of the currently active email\n *\n * @prop {boolean} TrayListProps.hasMoreItems - A boolean indicating whether there are more items to load\n *\n * @prop {ReactNode} TrayListProps.emptyState - A JSX element to display when there are no emails\n *\n * @prop {(id: string) => void} TrayListProps.onMailSelected - A function to handle email selection\n *\n * @prop {() => void} TrayListProps.onLoadMore - A function to load more emails\n *\n * @returns {JSX.Element} The rendered TrayList component\n */\n\nconst TrayList = ({\n mails,\n selectedEmails = [],\n loading,\n checked,\n activeEmail,\n hasMoreItems = false,\n emptyState,\n onMailSelected = () => {},\n onLoadMore = () => {},\n}: TrayListProps) => {\n const loader = (\n <div className=\"flex flex-col\">\n {new Array(3).fill(0).map((_, index) => (\n <MessageCheapSkeleton key={index} />\n ))}\n </div>\n );\n\n return (\n <div className=\"flex flex-col w-[400px] min-w-[200px] max-w-[400px] h-full\">\n <div id=\"tray-scroll-container\" className=\"overflow-y-auto w-full h-full min-h-0\">\n {loading ? (\n <>\n {new Array(8).fill(0).map((_, index) => (\n <div key={index} className=\"flex flex-col gap-2\">\n <MessageCheapSkeleton />\n </div>\n ))}\n </>\n ) : (\n <>\n {mails.length === 0 ? (\n <>{emptyState}</>\n ) : (\n <InfiniteScroll\n handleNextPage={onLoadMore}\n hasMoreItems={hasMoreItems}\n loader={loader}\n scrollableTarget=\"tray-scroll-container\"\n >\n {mails.map((email) => (\n <div key={email.id} className=\"flex items-center w-full flex-col\">\n <MessageCheap\n email={email}\n active={activeEmail === email.id}\n selected={checked || selectedEmails.includes(email.id)}\n onClick={onMailSelected}\n />\n </div>\n ))}\n </InfiniteScroll>\n )}\n </>\n )}\n </div>\n </div>\n );\n};\n\nexport default TrayList;\n","import { Avatar } from '@/components/avatar';\n\ninterface UserCheapProps {\n fullName: string;\n email: string;\n avatar?: string;\n}\n\n/**\n * A cheap user component to render a user's information.\n *\n * @param {UserCheapProps} props - The props object.\n * @param {string} props.fullName - The user's full name.\n * @param {string} props.email - The user's email address.\n * @param {string} [props.avatar] - The user's avatar URL. If not provided, the avatar will be generated from the user's name.\n */\nconst UserCheap = ({ fullName, email, avatar }: UserCheapProps) => (\n <div className=\"flex flex-row gap-2 border max-w-64 bg-surface w-full border-gray-10 shadow-subtle rounded-lg\">\n <div className=\"flex flex-row w-full gap-2 p-4\">\n <Avatar src={avatar} fullName={fullName} diameter={40} />\n <div className=\"flex flex-col min-w-0\">\n <p className=\"font-medium text-gray-100 truncate\">{fullName}</p>\n <p className=\"text-sm text-gray-50 truncate\">{email}</p>\n </div>\n </div>\n </div>\n);\n\nexport default UserCheap;\n"],"names":["DefaultAvatar","fullName","diameter","className","initials","nameToInitials","jsx","trimmedName","namesArray","first","second","PictureAvatar","src","style","SIZES","Avatar","size","diameterValue","Card","children","useHotkeys","keyMap","dependencies","handleKeyDown","event","keyCombination","useEffect","Menu","item","menu","isOpen","genericEnterKey","handleMenuClose","paddingX","paddingY","selectedIndex","setSelectedIndex","useState","enterPressed","setEnterPressed","handleMouseEnter","index","isUnClickableItem","menuItem","handleArrowDown","prevIndex","getNextEnabledIndex","startIndex","newIndex","newCurrentIndex","handleArrowUp","getPreviousEnabledIndex","handleEnterKey","isValidElement","onClick","option","i","e","jsxs","MENU_BUTTON_HEIGHT","ContextMenu","menuItemsRef","openedFromRightClick","posX","posY","isContextMenuCutOff","SvgCheck","props","React","SvgMinus","Checkbox","id","checked","indeterminate","required","checkboxDataCy","disabled","Minus","Check","TOP_MIN_HEIGHT","ListItem","listIndex","itemComposition","selected","columnsWidth","onClose","onSelectedChanged","onDoubleClick","onClickContextMenu","onThreeDotsButtonPressed","disableItemCompositionStyles","onMouseEnter","onMouseLeave","menuButtonRef","useRef","rootWrapperRef","setOpenedFromRightClick","setPosX","setPosY","dimensions","setDimensions","setIsContextMenuCutOff","handleOpenPosition","element","contextMenuHeight","bottom","windowHeight","isContextCutOff","handleContextMenuClick","childWidth","childHeight","wrapperRect","innerWidth","innerHeight","x","y","handleContextMenuDotsButton","handleClick","_col","DotsThree","ListHeader","selectedItems","onTopSelectionCheckboxClick","items","header","orderBy","onOrderableColumnClicked","displayMenuDiv","isVerticalScrollbarVisible","column","ArrowUp","ArrowDown","SkeletonLoaderItem","skeletonItem","columns","col","SkeletonLoader","skeleton","Fragment","InfiniteScroll","handleNextPage","hasMoreItems","loader","scrollableTarget","classNameLoader","loaderRef","scrollContainerRef","showLoader","setShowLoader","observer","entry","currentLoaderRef","childrenWithLoader","child","List","onEnterPressed","onSelectedItemsChanged","isLoading","forceLoading","skinSkeleton","emptyState","onOrderByChanged","onNextPage","headerBackgroundColor","keyBoardShortcutActions","disableKeyboardShortcuts","containerRef","isItemSelected","container","isEmptyState","idItemContextMenuOpen","setIdItemContextMenuOpen","skeletonData","handleClickOutside","unselectAllItems","changesToMake","unselectAllItemsAndSelectOne","executeClickOnSelectedItem","selectedItem","selectAllItems","s","field","onCloseContextMenu","columnWasAlreadySelected","handleKeyPress","action","handleRKeyPressed","handleBackspaceKeyPressed","onItemClick","itemClicked","onRightItemClick","handleThreeDotsButtonClick","prevId","value","Table","TableHeader","TableBody","TableRow","TableCell","isHeader","Component","Loader","classNameContainer","classNameText","type","text","isSpinner","Button","variant","onKeyDown","loading","dataTest","autofocus","buttonDataCy","buttonChildrenDataCy","styles","Empty","icon","title","subtitle","contextMenuClick","button","CircleButton","active","onClickToggleButton","dropdown","indicator","handleOpen","handleClose","target","circleButton","handleToggle","handleMainClick","getButtonStyles","renderIndicator","Warning","renderDropdownButton","CaretUp","Tooltip","popsFrom","delayInMs","arrow","visible","setVisible","timeoutRef","show","hide","handleMouseLeave","tooltipPosition","trianglePosition","triangle","Copyable","classText","copiedText","copyToClipboardText","justCopied","setJustCopied","onCopy","Copy","Input","label","accent","placeholder","maxLength","onChange","onClear","message","onFocus","onBlur","autoComplete","name","labelDataCy","inputDataCy","inputClassName","borderRadius","fontClasses","inputRef","focusInput","focusColor","borderColor","placeholderColor","padding","showPassword","setShowPassword","isFocused","setIsFocused","input","Eye","EyeSlash","MagnifyingGlass","X","messageColor","MessageIcon","CheckCircle","WarningOctagon","RadioButton","borderStyle","checkedStyle","RangeSlider","min","max","step","ariaLabel","percentage","sliderBackground","SwitchComponent","dataTestId","onCheckedChange","setChecked","handleCheckedChange","newChecked","backgroundColor","sizeClasses","thumbSizeClasses","checkedTranslation","TextArea","accentColor","Header","leftContent","rightContent","Grid","dataCy","extractPaddingValues","pxMatch","pyMatch","px","py","Dropdown","options","classButton","menuItems","classMenuItems","openDirection","dropdownActionsContext","setIsOpen","direction","group1","group2","group3","allItems","toggleMenu","prev","closeMenu","BreadcrumbsItem","isOver","canDrop","drop","monitor","onItemClicked","isDraggingOverClassNames","Breadcrumbs","MenuItem","forwardRef","ref","getItemsList","itemsList","hiddenItemsList","breadcrumbSeparator","key","CaretRight","separatorKey","itemKey","open","SidenavItem","Icon","notifications","iconDataCy","isActive","isCollapsed","subsection","SidenavOptions","showSubsections","Popover","childrenButton","panel","align","panelRef","showContent","setShowContent","transitionOpacity","setTransitionOpacity","transitionScale","setTransitionScale","togglePopover","handleMouseDown","closePopover","timeout","SuiteLauncher","suiteArray","soonText","SuiteButton","DotsNineIcon","suiteApp","idx","LockIcon","cloneElement","SidenavHeader","logo","onToggleCollapse","suiteLauncher","SidebarSimpleIcon","SidenavStorage","usage","limit","onUpgradeClick","upgradeLabel","Sidenav","primaryAction","collapsedPrimaryAction","storage","notification","timerRef","WarningIcon","BaseDialog","subTitle","dialogRounded","classes","panelClasses","titleClasses","closeClass","weightIcon","bgColor","hideCloseButton","Dialog","onPrimaryAction","onSecondaryAction","secondaryAction","primaryActionColor","maxWidth","isVisible","setIsVisible","Modal","width","preventClosing","stopMouseDownPropagation","modalRef","closeLastOpenModal","openModals","lastModal","TransparentModal","disableBackdrop","MessageCheapSkeleton","MessageCheap","email","isHighlighted","TrayList","mails","selectedEmails","activeEmail","onMailSelected","onLoadMore","_","UserCheap","avatar"],"mappings":"ucAAA,SAAwBA,GAAc,CACpC,SAAAC,EACA,SAAAC,EACA,UAAAC,EAAY,EACd,EAIiB,CACf,MAAMC,EAAWC,GAAeJ,CAAQ,EAExC,OACEK,EAAAA,IAAC,MAAA,CACC,MAAO,CAAE,MAAOJ,EAAU,OAAQA,EAAU,SAAUA,EAAW,GAAA,EACjE,UAAW,GAAGC,CAAS,gJAEvB,SAAAG,EAAAA,IAAC,KAAG,SAAAF,CAAA,CAAS,CAAA,CAAA,CAGnB,CAEA,SAASC,GAAeJ,EAAkB,CACxC,GAAI,CAACA,EACH,MAAO,GAGT,MAAMM,EAAcN,GAAU,KAAA,EAE9B,GAAI,CAACM,EACH,MAAO,GAET,MAAMC,EAAaD,EAAY,MAAM,GAAG,EACxC,GAAIC,EAAW,SAAW,EAAG,MAAO,GAAGA,EAAW,CAAC,EAAE,OAAO,CAAC,CAAC,GACzD,CACH,MAAMC,EAAQD,EAAW,CAAC,EAAE,OAAO,CAAC,EAC9BE,EAASF,EAAW,CAAC,EAAE,OAAO,CAAC,EACrC,OAAOC,EAAQC,CACjB,CACF,CCtCA,SAAwBC,GAAc,CACpC,IAAAC,EACA,SAAAV,EACA,UAAAC,EAAY,GACZ,MAAAU,EAAQ,CAAA,CACV,EAKiB,CACf,OACEP,EAAAA,IAAC,MAAA,CACC,MAAO,CAAE,MAAOJ,EAAU,OAAQA,EAAU,GAAGW,CAAA,EAC/C,UAAW,GAAGV,CAAS,kDACvB,IAAAS,E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,GAAA,CACC,MAAAC,EACA,OAAQK,IAAgBL,EAAM,GAC9B,SAAUnX,GAAWuX,EAAe,SAASJ,EAAM,EAAE,EACrD,QAASM,CAAA,CAAA,CACX,EANQN,EAAM,EAOhB,CACD,CAAA,CAAA,CACH,CAEJ,EAEJ,EACF,CAEJ,EC7FMS,GAAY,CAAC,CAAE,SAAAnc,EAAU,MAAA0b,EAAO,OAAAU,CAAA,IACpC/b,EAAAA,IAAC,MAAA,CAAI,UAAU,gGACb,SAAAoD,OAAC,MAAA,CAAI,UAAU,iCACb,SAAA,CAAApD,EAAAA,IAACS,GAAA,CAAO,IAAKsb,EAAQ,SAAApc,EAAoB,SAAU,GAAI,EACvDyD,EAAAA,KAAC,MAAA,CAAI,UAAU,wBACb,SAAA,CAAApD,EAAAA,IAAC,IAAA,CAAE,UAAU,qCAAsC,SAAAL,EAAS,EAC5DK,EAAAA,IAAC,IAAA,CAAE,UAAU,gCAAiC,SAAAqb,CAAA,CAAM,CAAA,CAAA,CACtD,CAAA,CAAA,CACF,CAAA,CACF"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/components/data-display/avatar/components/DefaultAvatar.tsx","../src/components/data-display/avatar/components/PictureAvatar.tsx","../src/components/data-display/avatar/Avatar.tsx","../src/components/data-display/card/Card.tsx","../src/hooks/useHotKeys.ts","../src/components/navigation/menu/Menu.tsx","../src/components/overlay/contextMenu/ContextMenu.tsx","../src/assets/icons/check.svg?react","../src/assets/icons/minus.svg?react","../src/components/input/checkbox/Checkbox.tsx","../src/components/data-display/list/ListItem.tsx","../src/components/data-display/list/ListHeader.tsx","../src/components/feedback/skeletonLoader/SkeletonLoader.tsx","../src/components/layout/infiniteScroll/InfiniteScroll.tsx","../src/components/data-display/list/List.tsx","../src/components/data-display/table/Table.tsx","../src/components/feedback/loader/Loader.tsx","../src/components/input/button/Button.tsx","../src/components/feedback/empty/Empty.tsx","../src/components/feedback/skeleton/SkeletonItem.tsx","../src/components/feedback/skeleton/Skeleton.tsx","../src/components/feedback/notifications/usageBanner/UsageWarningBanner.tsx","../src/components/input/buttonCircle/CircleButton.tsx","../src/components/overlay/tooltip/Tooltip.tsx","../src/components/input/copyable/Copyable.tsx","../src/components/input/input/Input.tsx","../src/components/input/radioButton/RadioButton.tsx","../src/components/input/slider/RangeSlider.tsx","../src/components/input/switch/Switch.tsx","../src/components/input/textArea/TextArea.tsx","../src/components/layout/header/Header.tsx","../src/components/layout/grid/Grid.tsx","../src/components/navigation/dropdown/Dropdown.tsx","../src/components/navigation/breadcrumbs/BreadcrumbsItem.tsx","../src/components/navigation/breadcrumbs/Breadcrumbs.tsx","../src/components/navigation/sidenav/SidenavItem.tsx","../src/components/navigation/sidenav/SidenavOptions.tsx","../src/components/overlay/popover/Popover.tsx","../src/components/navigation/suiteLauncher/SuiteLauncher.tsx","../src/components/navigation/sidenav/SidenavHeader.tsx","../src/components/navigation/sidenav/SidenavStorage.tsx","../src/components/navigation/sidenav/Sidenav.tsx","../src/components/overlay/baseDialog/BaseDialog.tsx","../src/components/overlay/dialog/Dialog.tsx","../src/components/overlay/modal/Modal.tsx","../src/components/overlay/modalTransparent/TransparentModal.tsx","../src/components/mail/cheaps/MessageCheapSkeleton.tsx","../src/components/mail/cheaps/MessageCheap.tsx","../src/components/mail/tray/TrayList.tsx","../src/components/mail/cheaps/user/UserCheap.tsx"],"sourcesContent":["export default function DefaultAvatar({\n fullName,\n diameter,\n className = '',\n}: Readonly<{\n fullName: string;\n diameter: number;\n className?: string;\n}>): JSX.Element {\n const initials = nameToInitials(fullName);\n\n return (\n <div\n style={{ width: diameter, height: diameter, fontSize: diameter / 2.1 }}\n className={`${className} flex shrink-0 select-none items-center justify-center rounded-full bg-primary/20 font-medium text-primary dark:bg-primary/75 dark:text-white`}\n >\n <p>{initials}</p>\n </div>\n );\n}\n\nfunction nameToInitials(fullName: string) {\n if (!fullName) {\n return '';\n }\n\n const trimmedName = fullName?.trim();\n\n if (!trimmedName) {\n return '';\n }\n const namesArray = trimmedName.split(' ');\n if (namesArray.length === 1) return `${namesArray[0].charAt(0)}`;\n else {\n const first = namesArray[0].charAt(0);\n const second = namesArray[1].charAt(0);\n return first + second;\n }\n}\n","export default function PictureAvatar({\n src,\n diameter,\n className = '',\n style = {},\n}: Readonly<{\n src: string;\n diameter: number;\n className?: string;\n style?: Record<string, string | number>;\n}>): JSX.Element {\n return (\n <img\n style={{ width: diameter, height: diameter, ...style }}\n className={`${className} shrink-0 select-none rounded-full object-cover`}\n src={src}\n draggable={false}\n />\n );\n}\n","import DefaultAvatar from './components/DefaultAvatar';\nimport PictureAvatar from './components/PictureAvatar';\n\ntype SIZE_KEYS = 'xxs' | 'xs' | 'sm' | 'base' | 'lg' | 'xl';\n\nconst SIZES: Record<SIZE_KEYS, number> = {\n xxs: 28,\n xs: 36,\n sm: 40,\n base: 48,\n lg: 80,\n xl: 128,\n};\n\n/**\n * Renders an avatar component which can be either a picture or a default avatar with initials.\n *\n * @param {Object} props - The properties for the Avatar component.\n * @param {string} props.fullName - The full name of the user, used to generate initials if no image is provided.\n * @param {number} [props.diameter=80] - The diameter of the avatar in pixels. Ignored if `size` is provided.\n * @param {SIZE_KEYS} [props.size] - Predefined size for the avatar. If provided, overrides the `diameter`.\n * The associated value in `SIZES` will be used as the diameter. Possible values are:\n * - `'xxs'`: 28px\n * - `'xs'`: 36px\n * - `'sm'`: 40px\n * - `'base'`: 48px\n * - `'lg'`: 80px\n * - `'xl'`: 128px\n * @param {string|null} [props.src] - The URL of the image to display as the avatar. If not provided, initials are shown\n * @param {string} [props.className=''] - Additional CSS classes to apply to the avatar component.\n * @param {Object} [props.style={}] - Additional inline styles to apply to the avatar component.\n * @returns {JSX.Element} The rendered avatar component.\n */\n\nconst Avatar = ({\n src,\n diameter = 80,\n size,\n className = '',\n fullName,\n style = {},\n}: {\n fullName: string;\n diameter?: number;\n size?: SIZE_KEYS;\n src?: string | null;\n className?: string;\n style?: Record<string, string | number>;\n}): JSX.Element => {\n const diameterValue = size ? SIZES[size] : diameter;\n\n return src ? (\n <PictureAvatar src={src} diameter={diameterValue} className={className} style={style} />\n ) : (\n <DefaultAvatar diameter={diameterValue} className={className} fullName={fullName} />\n );\n};\n\nexport default Avatar;\n","import { ReactNode } from 'react';\n\n/**\n * Card component\n *\n * @property {string} [className]\n * - Optional additional CSS classes to customize the appearance of the card.\n * By default, the card has rounded corners, border, padding, and shadow.\n *\n * @property {ReactNode} children\n * - The content to be rendered inside the card. This can be any valid React node.\n */\n\nconst Card = ({ className = '', children }: { className?: string; children: ReactNode }): JSX.Element => {\n return (\n <div\n className={`rounded-xl border border-gray-10 bg-surface p-5 shadow-[0_12px_20px_0_rgba(0,0,0,0.02)] dark:bg-gray-1 ${className}`}\n >\n {children}\n </div>\n );\n};\n\nexport default Card;\n","import { useEffect } from 'react';\n\ntype KeyMap = { [key: string]: () => void };\n\nconst useHotkeys = (keyMap: KeyMap, dependencies: unknown[] = []) => {\n const handleKeyDown = (event: KeyboardEvent) => {\n const isInputElement = ['input', 'textarea'].includes(document.activeElement?.tagName.toLowerCase() ?? '');\n\n if (isInputElement && event.key.toLowerCase() !== 'escape') {\n return;\n }\n\n const keyCombination = `${event.ctrlKey ? 'ctrl+' : ''}${event.metaKey ? 'meta+' : ''}${event.key.toLowerCase()}`;\n if (keyMap[keyCombination]) {\n event.preventDefault();\n keyMap[keyCombination]();\n }\n };\n\n useEffect(() => {\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, dependencies);\n};\n\nexport default useHotkeys;\n","import { isValidElement, ReactNode, useEffect, useState } from 'react';\nimport useHotkeys from '../../../hooks/useHotKeys';\n\nexport type MenuItemType<T> =\n | { separator: true }\n | {\n name?: string;\n separator?: false;\n disabled?: (target: T) => boolean;\n isTitle?: (target: T) => boolean;\n icon?: React.ForwardRefExoticComponent<{ size?: number | string }>;\n keyboardShortcutOptions?: {\n keyboardShortcutIcon?: React.ForwardRefExoticComponent<{ size?: number | string }>;\n keyboardShortcutText?: string;\n };\n\n action?: (target: T) => void | Promise<void>;\n onClick?: () => void;\n node?: ReactNode;\n };\n\nexport type MenuItemsType<T> = Array<MenuItemType<T>>;\n\nexport interface MenuProps<T> {\n item?: T;\n isOpen: boolean;\n menu?: MenuItemsType<T>;\n handleMenuClose: () => void;\n genericEnterKey?: () => void;\n paddingX?: string;\n paddingY?: string;\n}\n\n/**\n * Menu component\n *\n * @template T\n * @param {MenuProps<T>} props - Properties of the Menu component.\n *\n * @property {T} [item]\n * - Optional item that may be used in menu actions (e.g., data passed for actions).\n *\n * @property {boolean} [isOpen]\n * - To know is Menu is visible.\n *\n * @property {MenuItemsType<T>} [menu]\n * - Optional array of menu items. Each item can define a separator, title, icon, action, etc.\n *\n * @property {() => void} handleMenuClose\n * - Function to close the menu.\n *\n * @property {() => void} [genericEnterKey]\n * - Optional callback for when the Enter key is pressed without selecting a menu item.\n *\n * @property {string} [paddingX='px-4']\n * - Optional padding for the X axis (horizontal) of each menu item. Defaults to `px-4`.\n *\n * @property {string} [paddingY='py-1.5']\n * - Optional padding for the Y axis (vertical) of each menu item. Defaults to `py-1.5`.\n *\n * @returns {JSX.Element}\n * - The rendered Menu component.\n *\n * The component handles key events such as Arrow Down, Arrow Up, and Enter for navigation and action execution.\n * It also supports mouse interactions for hovering and selecting menu items.\n *\n * Each menu item can have an action, an optional keyboard shortcut, and an icon.\n * If the item is disabled or marked as a title, it won't be clickable.\n *\n * It features a dynamic index for item selection, with keyboard and mouse-based navigation.\n */\n\nconst Menu = <T,>({\n item,\n menu,\n isOpen,\n genericEnterKey,\n handleMenuClose,\n paddingX = 'px-4',\n paddingY = 'py-1.5',\n}: MenuProps<T>): JSX.Element => {\n const [selectedIndex, setSelectedIndex] = useState<number | null>(null);\n const [enterPressed, setEnterPressed] = useState<boolean>(false);\n const handleMouseEnter = (index: number) => {\n setSelectedIndex(index);\n };\n\n const isUnClickableItem = (menuItem: MenuItemType<T>) =>\n menuItem?.separator || (item && menuItem?.disabled?.(item)) || (item && menuItem?.isTitle?.(item));\n\n const handleArrowDown = () => {\n menu &&\n isOpen &&\n setSelectedIndex((prevIndex) => {\n const getNextEnabledIndex = (startIndex: number): number => {\n let newIndex = startIndex;\n let menuItem = menu[newIndex];\n while (isUnClickableItem(menuItem)) {\n newIndex = (newIndex + 1) % menu.length;\n menuItem = menu[newIndex];\n if (startIndex === newIndex) break;\n }\n return newIndex;\n };\n\n const newCurrentIndex = prevIndex === null ? 0 : (prevIndex + 1) % menu.length;\n const newIndex = getNextEnabledIndex(newCurrentIndex);\n const menuItem = menu[newIndex];\n return isUnClickableItem(menuItem) ? null : newIndex;\n });\n };\n\n const handleArrowUp = () => {\n menu &&\n isOpen &&\n setSelectedIndex((prevIndex) => {\n const getPreviousEnabledIndex = (startIndex: number): number => {\n let newIndex = startIndex;\n let menuItem = menu[newIndex];\n while (isUnClickableItem(menuItem)) {\n newIndex = (newIndex - 1 + menu.length) % menu.length;\n menuItem = menu[newIndex];\n if (startIndex === newIndex) break;\n }\n return newIndex;\n };\n\n const newCurrentIndex = prevIndex === null ? menu.length - 1 : (prevIndex - 1 + menu.length) % menu.length;\n const newIndex = getPreviousEnabledIndex(newCurrentIndex);\n const menuItem = menu[newIndex];\n return isUnClickableItem(menuItem) ? null : newIndex;\n });\n };\n\n const handleEnterKey = () => {\n menu &&\n isOpen &&\n setSelectedIndex((prevIndex) => {\n if (prevIndex !== null) {\n const menuItem = menu ? menu[prevIndex] : undefined;\n if (item && menuItem && 'action' in menuItem && menuItem.action) menuItem.action(item);\n if (item && menuItem && 'node' in menuItem && menuItem.node && isValidElement(menuItem.node)) {\n const onClick = menuItem.node.props.onClick;\n onClick && onClick();\n }\n } else if (genericEnterKey) genericEnterKey();\n setEnterPressed(true);\n return null;\n });\n };\n\n useEffect(() => {\n if (enterPressed) {\n handleMenuClose();\n setEnterPressed(false);\n }\n }, [enterPressed]);\n\n useHotkeys(\n {\n arrowdown: handleArrowDown,\n arrowup: handleArrowUp,\n enter: handleEnterKey,\n },\n [isOpen],\n );\n\n return (\n <div className={`z-20 mt-0 flex flex-col rounded-lg bg-surface ${paddingY} outline-none dark:bg-gray-5`}>\n {menu?.map((option, i) => (\n <div key={i}>\n {option && option.separator ? (\n <div className=\"my-0.5 flex w-full flex-row px-4\">\n <div className=\"h-px w-full bg-gray-10\" />\n </div>\n ) : (\n option && (\n <div\n className={`${isUnClickableItem(option) ? 'pointer-events-none' : ''}`}\n onClick={(e) => {\n if (!isUnClickableItem(option)) {\n e.stopPropagation();\n item && option.action?.(item);\n option.onClick && option.onClick();\n handleMenuClose();\n }\n }}\n onMouseEnter={() => handleMouseEnter(i)}\n >\n <div\n className={`flex cursor-pointer flex-row whitespace-nowrap ${paddingX} ${paddingY} text-base\n ${item && option.disabled?.(item) && 'font-medium text-gray-50'}\n ${item && option.isTitle?.(item) && !option.disabled?.(item) && 'font-medium text-gray-100'}\n ${selectedIndex === i && item && !option.disabled?.(item) && 'bg-gray-5 text-gray-100 dark:bg-gray-10'}\n ${item && !option.disabled?.(item) && !option.isTitle?.(item) && selectedIndex !== i && 'text-gray-80'}\n `}\n >\n {option.node ? (\n option.node\n ) : (\n <div className=\"flex flex-row items-center space-x-2\">\n {option.icon && <option.icon size={20} />}\n <span>{option.name}</span>\n </div>\n )}\n {option.keyboardShortcutOptions && (\n <span className=\"ml-5 flex grow items-center justify-end text-sm text-gray-40\">\n {option.keyboardShortcutOptions?.keyboardShortcutIcon && (\n <option.keyboardShortcutOptions.keyboardShortcutIcon size={14} />\n )}\n {option.keyboardShortcutOptions?.keyboardShortcutText ?? ''}\n </span>\n )}\n </div>\n </div>\n )\n )}\n </div>\n ))}\n </div>\n );\n};\n\nexport default Menu;\n","import Menu, { MenuItemsType } from '../../navigation/menu/Menu';\n\nconst MENU_BUTTON_HEIGHT = 40;\n\nexport interface ContextMenuProps<T> {\n item: T;\n menuItemsRef: React.MutableRefObject<HTMLDivElement | null>;\n menu?: MenuItemsType<T>;\n openedFromRightClick: boolean;\n isOpen: boolean;\n posX: number;\n posY: number;\n isContextMenuCutOff: boolean;\n genericEnterKey: () => void;\n handleMenuClose: () => void;\n}\n\n/**\n * Properties for `ContextMenuProps<T>`\n *\n * @template T - Generic type representing the item to which the context menu applies.\n *\n * @property {T} item\n * - The current item associated with the context menu.\n * This object is passed to each menu option's `action` and `disabled` functions.\n *\n * @property {React.MutableRefObject<HTMLDivElement | null>} menuItemsRef\n * - A mutable ref to the `div` containing the context menu. Used for handling the menu's positioning and visibility.\n *\n * @property {MenuType<T>} [menu]\n * - An array of menu options, where each option includes properties like `name`, `icon`, `action`, etc.\n * The `MenuType<T>` type allows some options to be separators (`separator: boolean`).\n *\n * @property {boolean} openedFromRightClick\n * - Indicates whether the context menu was opened via a right-click (`true`).\n * Determines whether the menu's position is set based on the click location or a predefined position.\n *\n * @property {boolean} [isOpen]\n * - To know is Menu is visible.\n *\n * @property {number} posX\n * - X-coordinate for the menu's position, used if `openedFromRightClick` is `true`.\n *\n * @property {number} posY\n * - Y-coordinate for the menu's position, used if `openedFromRightClick` is `true`.\n *\n * @property {boolean} isContextMenuCutOff\n * - Specifies whether the menu should align to the bottom of the screen to prevent it\n * from being cut off on smaller screens. Switches menu positioning between top or bottom.\n *\n * @property {() => void} genericEnterKey\n * - A callback that executes if the Enter key is pressed without a selected menu option.\n * Can be used to define a default action.\n *\n * @property {() => void} handleMenuClose\n * - Function to close the context menu. Called after an action is executed or when pressing Enter in the menu.\n */\n\nconst ContextMenu = <T,>({\n item,\n menuItemsRef,\n menu,\n openedFromRightClick,\n posX,\n posY,\n isContextMenuCutOff,\n isOpen,\n genericEnterKey,\n handleMenuClose,\n}: ContextMenuProps<T>): JSX.Element => {\n return (\n <div\n className=\"z-20 mt-0 flex flex-col rounded-lg bg-surface py-1.5 shadow-subtle-hard outline-none dark:bg-gray-5\"\n style={\n openedFromRightClick\n ? { position: 'absolute', left: posX, top: posY, zIndex: 99 }\n : {\n position: 'absolute',\n right: 20,\n [isContextMenuCutOff ? 'bottom' : 'top']: MENU_BUTTON_HEIGHT,\n zIndex: 9999,\n }\n }\n ref={menuItemsRef}\n >\n <Menu\n item={item}\n isOpen={isOpen}\n genericEnterKey={genericEnterKey}\n handleMenuClose={handleMenuClose}\n menu={menu}\n />\n </div>\n );\n};\n\nexport default ContextMenu;\n","import * as React from \"react\";\nconst SvgCheck = (props) => /* @__PURE__ */ React.createElement(\"svg\", { fill: \"none\", height: 20, viewBox: \"0 0 20 20\", width: 20, xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"m8.85955 15c.38202 0 .67978-.1461.88202-.4551l5.23593-8.00557c.1461-.22472.2079-.43259.2079-.62922 0-.52809-.3933-.91011-.9326-.91011-.3708 0-.6011.13483-.8258.48876l-4.59554 7.24724-2.33146-2.8933c-.20787-.24719-.43259-.35955-.74719-.35955-.54495 0-.9382.38764-.9382.91575 0 .2359.07303.4438.27528.6741l2.89887 3.5113c.24158.2865.51124.4157.87079.4157z\", fill: \"currentColor\" }));\nexport default SvgCheck;\n","import * as React from \"react\";\nconst SvgMinus = (props) => /* @__PURE__ */ React.createElement(\"svg\", { fill: \"none\", height: 20, viewBox: \"0 0 20 20\", width: 20, xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"rect\", { fill: \"currentColor\", height: 2, rx: 1, width: 12, x: 4, y: 9 }));\nexport default SvgMinus;\n","/// <reference types=\"vite-plugin-svgr/client\" />\nimport Check from '../../../assets/icons/check.svg?react';\nimport Minus from '../../../assets/icons/minus.svg?react';\n\nexport interface CheckboxProps {\n id?: string;\n checked?: boolean;\n indeterminate?: boolean;\n onClick?: React.DOMAttributes<HTMLLabelElement>['onClick'];\n required?: boolean;\n className?: string;\n checkboxDataCy?: string;\n disabled?: boolean;\n}\n\n/**\n * Checkbox component\n *\n * @property {string} [id]\n * - Optional ID for the checkbox input element, useful for accessibility and styling.\n *\n * @property {boolean} [checked]\n * - Controls whether the checkbox is checked. Defaults to true.\n * - If true, the checkbox appears checked.\n * - If false, the checkbox appears unchecked.\n *\n * @property {boolean} [indeterminate]\n * - If true, the checkbox appears in an indeterminate state (a visual state between checked and unchecked).\n * - This state is typically used for a parent checkbox representing a partial selection of child checkboxes.\n *\n * @property {React.DOMAttributes<HTMLLabelElement>['onClick']} [onClick]\n * - Function called when the checkbox label is clicked. It is triggered only if the checkbox is not disabled.\n * - Accepts an event object from the click event.\n *\n * @property {boolean} [required]\n * - If true, marks the checkbox as required in form validation.\n * - Defaults to false.\n *\n * @property {string} [className]\n * - Custom CSS classes for additional styling of the checkbox container element.\n *\n * @property {string} [checkboxDataCy]\n * - Custom data attribute for the checkbox element.\n *\n * @property {boolean} [disabled]\n * - Disables the checkbox, preventing user interaction and applying a disabled style.\n * - If true, the checkbox cannot be checked or unchecked.\n * - Defaults to false.\n */\n\nconst Checkbox = ({\n id,\n checked = true,\n indeterminate = false,\n onClick,\n required,\n className,\n checkboxDataCy,\n disabled = false,\n}: CheckboxProps): JSX.Element => {\n return (\n <label\n className={`relative h-5 w-5 rounded focus-within:outline-primary ${className}`}\n onClick={disabled ? undefined : onClick}\n onKeyDown={() => {}}\n >\n <div\n onClick={(e) => e.preventDefault()}\n data-cy={checkboxDataCy}\n onKeyDown={() => {}}\n className={`relative flex h-5 w-5 cursor-pointer flex-col items-center justify-center rounded border text-white ${\n !disabled\n ? indeterminate || checked\n ? 'border-primary bg-primary'\n : 'border-gray-30 hover:border-gray-40'\n : indeterminate || checked\n ? 'bg-gray-20 cursor-auto'\n : 'border-gray-10 cursor-auto'\n }`}\n >\n {indeterminate ? <Minus className=\"absolute -inset-px\" /> : checked && <Check className=\"absolute -inset-px\" />}\n </div>\n <input\n id={id}\n checked={checked}\n type=\"checkbox\"\n required={required ?? false}\n readOnly\n className=\"base-checkbox h-0 w-0 appearance-none opacity-0\"\n disabled={disabled}\n />\n </label>\n );\n};\n\nexport default Checkbox;\n","import { LegacyRef, useEffect, useRef, useState } from 'react';\nimport { DotsThree } from '@phosphor-icons/react';\nimport ContextMenu from '../../overlay/contextMenu/ContextMenu';\nimport useHotkeys from '../../../hooks/useHotKeys';\nimport Checkbox from '../../input/checkbox/Checkbox';\nimport { MenuItemsType } from '../../navigation/menu/Menu';\n\ninterface ListItemProps<T> {\n item: T;\n listIndex: number;\n itemComposition: Array<(props: T) => JSX.Element>;\n selected: boolean;\n isOpen: boolean;\n columnsWidth: Array<string>;\n onClose: () => void;\n onSelectedChanged: (value: boolean) => void;\n onDoubleClick?: () => void;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n onClickContextMenu?: (e: React.MouseEvent<HTMLDivElement>) => void;\n onThreeDotsButtonPressed?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n menu?: MenuItemsType<T>;\n disableItemCompositionStyles?: boolean;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n genericEnterKey: () => void;\n}\nconst TOP_MIN_HEIGHT = 500;\n\nconst ListItem = <T extends { id: number }>({\n item,\n listIndex,\n itemComposition,\n selected,\n isOpen,\n columnsWidth,\n onClose,\n onSelectedChanged,\n onDoubleClick,\n onClick,\n onClickContextMenu,\n onThreeDotsButtonPressed,\n disableItemCompositionStyles,\n menu,\n onMouseEnter,\n onMouseLeave,\n genericEnterKey,\n}: ListItemProps<T>): JSX.Element => {\n const menuButtonRef = useRef<HTMLButtonElement | undefined>();\n const rootWrapperRef = useRef<HTMLDivElement | null>(null);\n const menuItemsRef = useRef<HTMLDivElement | null>(null);\n\n const [openedFromRightClick, setOpenedFromRightClick] = useState(false);\n const [posX, setPosX] = useState(0);\n const [posY, setPosY] = useState(0);\n const [dimensions, setDimensions] = useState({ width: 0, height: 0 });\n const [isContextMenuCutOff, setIsContextMenuCutOff] = useState(false);\n\n useEffect(() => {\n if (\n menuItemsRef.current &&\n (menuItemsRef.current.offsetHeight !== dimensions.height ||\n menuItemsRef.current?.offsetWidth !== dimensions.width)\n )\n setDimensions({\n width: menuItemsRef.current.offsetWidth,\n height: menuItemsRef.current.offsetHeight,\n });\n }, [dimensions.height, dimensions.width]);\n\n useEffect(() => {\n if (!openedFromRightClick) handleOpenPosition();\n\n if (!isOpen) {\n setOpenedFromRightClick(false);\n setPosX(0);\n setPosY(0);\n }\n }, [isOpen]);\n\n function handleOpenPosition() {\n const element = menuButtonRef.current;\n const contextMenuHeight = menuItemsRef?.current?.offsetHeight || 300;\n if (!element) return;\n if (!contextMenuHeight) return;\n\n const { bottom } = element.getBoundingClientRect();\n const windowHeight = window.innerHeight;\n\n const isContextCutOff = bottom + contextMenuHeight > windowHeight;\n setIsContextMenuCutOff(isContextCutOff);\n }\n\n const handleContextMenuClick = (event: React.MouseEvent<HTMLDivElement>) => {\n event.preventDefault();\n\n onClickContextMenu?.(event);\n const childWidth = menuItemsRef?.current?.offsetWidth || 240;\n const childHeight = menuItemsRef?.current?.offsetHeight || 300;\n const wrapperRect = rootWrapperRef?.current?.getBoundingClientRect();\n const { innerWidth, innerHeight } = window;\n let x = event.clientX - (wrapperRect?.left || 0);\n let y = event.clientY - (wrapperRect?.top || 0);\n\n if (event.clientX + childWidth > innerWidth) {\n x = x - childWidth;\n }\n\n if (event.clientY + childHeight > innerHeight && event.clientY > TOP_MIN_HEIGHT) {\n y = y - childHeight;\n }\n\n setPosX(x);\n setPosY(y);\n setOpenedFromRightClick(true);\n };\n\n const handleContextMenuDotsButton = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n\n onThreeDotsButtonPressed?.(event);\n setOpenedFromRightClick(false);\n };\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n onClick?.(event);\n openedFromRightClick && handleMenuClose();\n };\n\n const handleMenuClose = () => {\n onClose();\n };\n\n const handleEnterKey = () => {\n if (!isOpen) {\n genericEnterKey();\n }\n };\n\n useHotkeys(\n {\n r: handleMenuClose,\n backspace: handleMenuClose,\n enter: handleEnterKey,\n },\n [],\n );\n\n return (\n <div\n onDoubleClick={onDoubleClick}\n onClick={handleClick}\n onContextMenu={handleContextMenuClick}\n ref={rootWrapperRef}\n className={`group relative flex h-14 flex-row items-center pl-14 pr-5 ${\n selected ? 'bg-primary/10 text-gray-100 dark:bg-primary/20' : 'focus-within:bg-gray-1 hover:bg-gray-1'\n } ${isOpen ? 'z-40' : ''}`}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {isOpen && selected && (\n <ContextMenu\n item={item}\n menu={menu}\n menuItemsRef={menuItemsRef}\n openedFromRightClick={openedFromRightClick}\n isOpen={isOpen}\n posX={posX}\n posY={posY}\n isContextMenuCutOff={isContextMenuCutOff}\n genericEnterKey={genericEnterKey}\n handleMenuClose={handleMenuClose}\n />\n )}\n\n <div\n className={`absolute left-5 top-0 flex h-full w-0 flex-row items-center justify-start p-0 opacity-0 focus-within:opacity-100 group-hover:opacity-100 ${\n selected && 'opacity-100'\n }`}\n >\n <Checkbox\n onClick={(e) => {\n e.stopPropagation();\n onSelectedChanged(!selected);\n }}\n checked={selected}\n checkboxDataCy={`driveListItemCheckbox${listIndex}`}\n />\n </div>\n {disableItemCompositionStyles ? (\n <div\n key={0}\n className={`grow-1 relative flex h-full w-full flex-row items-center border-b ${\n selected ? 'border-primary/5' : 'border-gray-5'\n }`}\n >\n {itemComposition[0](item)}\n </div>\n ) : (\n new Array(itemComposition.length).fill(0).map((_col, i) => (\n <div\n key={i}\n className={`relative flex h-full shrink-0 flex-row items-center border-b ${\n selected ? 'border-primary/5' : 'border-gray-5'\n } ${columnsWidth[i]}`}\n >\n {itemComposition[i](item)}\n </div>\n ))\n )}\n <div\n className={`flex h-14 w-12 shrink-0 flex-col items-center justify-center border-b ${\n selected ? 'border-primary/5' : 'border-gray-5'\n }`}\n >\n <button\n ref={menuButtonRef as LegacyRef<HTMLButtonElement>}\n className={`flex h-10 w-10 flex-col items-center justify-center rounded-md opacity-0 outline-none focus-visible:opacity-100 group-hover:opacity-100 ${\n selected\n ? 'text-gray-80 hover:bg-primary/10 focus-visible:bg-primary/10'\n : 'text-gray-60 hover:bg-gray-10 focus-visible:bg-gray-10'\n }`}\n onClick={(e) => {\n handleContextMenuDotsButton(e);\n }}\n >\n <DotsThree size={24} weight=\"bold\" />\n </button>\n </div>\n </div>\n );\n};\n\nexport default ListItem;\n","import { ArrowDown, ArrowUp } from '@phosphor-icons/react';\nimport Checkbox from '../../input/checkbox/Checkbox';\nimport { MenuItemsType } from '../../navigation/menu/Menu';\n\nexport type HeaderProps<T, F> = {\n label: string;\n width: string;\n} & (\n | { name: F; orderable: true; defaultDirection: 'ASC' | 'DESC'; buttonDataCy?: string; textDataCy?: string }\n | { name: keyof T; orderable: false }\n);\n\ninterface ListHeaderProps<T, F> {\n selectedItems: T[];\n items: T[];\n header: HeaderProps<T, F>[];\n isVerticalScrollbarVisible: boolean | null;\n orderBy?: { field: F; direction: 'ASC' | 'DESC' };\n menu?: MenuItemsType<T>;\n displayMenuDiv?: boolean;\n checkboxDataCy?: string;\n onTopSelectionCheckboxClick: () => void;\n onOrderableColumnClicked: (column: HeaderProps<T, F>) => void;\n onClose?: () => void;\n}\n\nconst ListHeader = <T, F extends keyof T>({\n selectedItems,\n onTopSelectionCheckboxClick,\n items,\n header,\n orderBy,\n onOrderableColumnClicked,\n menu,\n displayMenuDiv,\n isVerticalScrollbarVisible,\n checkboxDataCy,\n onClose,\n}: ListHeaderProps<T, F>) => {\n return (\n <div onClick={onClose} onContextMenu={onClose} className=\"flex min-w-max h-12 shrink-0 flex-row px-5\">\n {/* COLUMN */}\n <div className=\"flex h-full min-w-full flex-row items-center border-b border-gray-10\">\n {/* SELECTION CHECKBOX */}\n <div className=\"flex h-full flex-row items-center justify-between pr-4\">\n <Checkbox\n checked={selectedItems.length > 0}\n indeterminate={items.length > selectedItems.length && selectedItems.length > 0}\n onClick={onTopSelectionCheckboxClick}\n checkboxDataCy={checkboxDataCy}\n />\n </div>\n\n {header.map((column) => (\n <button\n onClick={\n column.orderable\n ? () => {\n onOrderableColumnClicked(column);\n }\n : undefined\n }\n key={column.name.toString()}\n data-cy={'buttonDataCy' in column && column?.buttonDataCy}\n className={`flex h-full shrink-0 flex-row items-center space-x-1.5 text-base font-medium text-gray-60 ${\n column.width\n } ${column.orderable ? 'cursor-pointer hover:text-gray-80' : ''}`}\n >\n <span data-cy={'textDataCy' in column && column?.textDataCy}>{column.label}</span>\n {column.name === orderBy?.field &&\n column.orderable &&\n (orderBy?.direction === 'ASC' ? (\n <ArrowUp size={14} weight=\"bold\" />\n ) : (\n <ArrowDown size={14} weight=\"bold\" />\n ))}\n </button>\n ))}\n {isVerticalScrollbarVisible && <div className=\"mr-15px\" />}\n {(menu || displayMenuDiv) && <div className=\"flex h-full w-12 shrink-0\" />}\n </div>\n </div>\n );\n};\n\nexport default ListHeader;\n","export interface SkeletonLoaderItemProps {\n skeletonItem: Array<React.ReactElement> | undefined;\n columns: Array<string>;\n}\n\nexport interface SkeletonLoaderProps {\n skeleton: Array<SkeletonLoaderItemProps>;\n}\n\nexport const SkeletonLoaderItem = ({ skeletonItem, columns }: SkeletonLoaderItemProps): React.ReactElement => {\n return (\n <div\n data-testid=\"skeleton-loader-item\"\n className={'group relative flex h-14 animate-pulse flex-row items-center px-5'}\n >\n <div className=\"w-9 shrink-0\" />\n {new Array(columns.length).fill(0).map((col, i) => (\n <div\n key={`${col}-${i}`}\n className={`relative flex h-full shrink-0 flex-row items-center overflow-hidden whitespace-nowrap border-b border-gray-5 ${columns[i]}`}\n >\n {skeletonItem?.[i]}\n </div>\n ))}\n <div className=\"flex h-14 w-12 shrink-0 flex-col items-center justify-center border-b border-gray-5\" />\n </div>\n );\n};\n\n/**\n * SkeletonLoader component to display loading placeholders in list layouts.\n *\n * @param skeleton - Array of skeleton items, {skeletonItem, columns}\n * - The params of each skeletonItem:\n * - skeletonItem: - Array of elements representing the loading placeholders.\n * - columns: - An array of CSS class names for each column, defining their layout and style.\n *\n */\nconst SkeletonLoader = ({ skeleton }: SkeletonLoaderProps): React.ReactElement => {\n return (\n <>\n {new Array(skeleton.length).fill(0).map((_col, i) => (\n <SkeletonLoaderItem\n key={`skinSkeletonRow${i}`}\n skeletonItem={skeleton[i].skeletonItem}\n columns={skeleton[i].columns}\n />\n ))}\n </>\n );\n};\n\nexport default SkeletonLoader;\n","import React from 'react';\nimport { useRef, useEffect, ReactNode, useState } from 'react';\n\nexport interface InfiniteScrollProps {\n children: ReactNode;\n handleNextPage: () => void;\n hasMoreItems: boolean | undefined;\n loader: React.ReactNode;\n scrollableTarget?: string;\n classNameLoader?: string;\n}\n\n/**\n * InfiniteScroll component\n *\n * @param {InfiniteScrollProps} props - The properties of the component.\n *\n * @property {ReactNode} children\n * - The child components or elements to be rendered inside the scrollable container.\n *\n * @property {() => void} handleNextPage\n * - A callback function that is triggered when the user reaches the bottom of the container\n * and more items need to be loaded.\n *\n * @property {boolean | undefined} hasMoreItems\n * - A flag indicating whether there are more items to load. If `false`, the loader will not be shown,\n * and no more items will be fetched.\n *\n * @property {React.ReactNode} loader\n * - The content to be shown as a loader while waiting for more items to load.\n *\n * @property {string} [scrollableTarget]\n * - An optional ID of the scrollable container that will be observed for scroll events.\n * If not provided, the default behavior is to observe the entire window.\n *\n * @property {string} [classNameLoader]\n * - An optional custom class name for the loader element, used to style the loader component.\n *\n * @returns {JSX.Element}\n * - A JSX element containing the children with the loader attached to the last item, if there are more items to load.\n *\n * The component uses the `IntersectionObserver` API to detect when the loader element (at the bottom of the list)\n * comes into view. When this happens, it triggers the `handleNextPage` callback to load the next set of items.\n * It also shows the loader element only when there are more items to load (`hasMoreItems` is `true`).\n */\n\nconst InfiniteScroll = ({\n children,\n handleNextPage,\n hasMoreItems,\n loader,\n scrollableTarget,\n classNameLoader,\n}: InfiniteScrollProps) => {\n const loaderRef = useRef<HTMLDivElement>(null);\n const scrollContainerRef = useRef<HTMLElement | null>(null);\n const [showLoader, setShowLoader] = useState<boolean>(false);\n\n useEffect(() => {\n if (scrollableTarget) {\n scrollContainerRef.current = document.getElementById(scrollableTarget);\n }\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n if (hasMoreItems) {\n handleNextPage();\n setShowLoader(true);\n } else {\n setShowLoader(false);\n }\n }\n },\n {\n root: scrollContainerRef.current || null,\n rootMargin: '100px',\n threshold: 0,\n },\n );\n\n const currentLoaderRef = loaderRef.current;\n if (currentLoaderRef) {\n observer.observe(currentLoaderRef);\n }\n\n return () => {\n currentLoaderRef && observer.unobserve(currentLoaderRef);\n };\n }, [hasMoreItems, handleNextPage, scrollableTarget]);\n\n const childrenWithLoader = React.Children.map(children, (child, index) => {\n if (index === React.Children.count(children) - 1 && hasMoreItems) {\n return (\n <>\n {child}\n <div ref={loaderRef} className={classNameLoader}>\n {showLoader && loader}\n </div>\n </>\n );\n }\n return child;\n });\n\n return <div>{childrenWithLoader}</div>;\n};\n\nexport default InfiniteScroll;\n","import React, { ReactNode, useEffect, useRef, useState } from 'react';\nimport ListItem from './ListItem';\nimport ListHeader, { HeaderProps } from './ListHeader';\nimport useHotkeys from '../../../hooks/useHotKeys';\nimport { SkeletonLoader } from '../../feedback/skeletonLoader';\nimport { InfiniteScroll } from '../../layout/infiniteScroll';\nimport { MenuItemsType } from '../../navigation/menu/Menu';\n\nexport interface ListProps<T, F> {\n header: HeaderProps<T, F>[];\n checkboxDataCy?: string;\n items: T[];\n itemComposition: Array<(props: T) => JSX.Element>;\n selectedItems: T[];\n onClick?: (props: T) => void;\n onDoubleClick?: (props: T) => void;\n onEnterPressed?: (props: T) => void;\n onSelectedItemsChanged: (changes: { props: T; value: boolean }[]) => void;\n isLoading?: boolean;\n forceLoading?: boolean;\n skinSkeleton?: Array<JSX.Element>;\n emptyState?: ReactNode;\n onNextPage?: () => void;\n onOrderByChanged?: (value: { field: F; direction: 'ASC' | 'DESC' }) => void;\n orderBy?: { field: F; direction: 'ASC' | 'DESC' };\n hasMoreItems?: boolean;\n menu?: MenuItemsType<T>;\n displayMenuDiv?: boolean;\n className?: string;\n keyboardShortcuts?: Array<'selectAll' | 'unselectAll' | 'multiselect' | Array<'delete' & (() => void)>>;\n disableKeyboardShortcuts?: boolean;\n disableItemCompositionStyles?: boolean;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n headerBackgroundColor?: string;\n keyBoardShortcutActions?: {\n onShiftFKeysPressed?: () => void;\n onRKeyPressed?: () => void;\n onBackspaceKeyPressed?: () => void;\n };\n}\n\n/**\n * List component\n *\n * @property {HeaderProps<T, F>[]} header\n * - Array of headers for the list. Each header defines the properties of the columns displayed.\n *\n * @property {string} [checkboxDataCy]\n * - Optional `data-cy` attribute used for testing checkboxes in the list.\n *\n * @property {T[]} items\n * - Array of items to be displayed in the list. Each item corresponds to the data for each row.\n *\n * @property {(props: T) => JSX.Element}[] itemComposition\n * - Array of functions that return JSX elements for rendering each item in the list.\n *\n * @property {T[]} selectedItems\n * - Array of selected items.\n *\n * @property {(props: T) => void} [onClick]\n * - Optional callback triggered when an item is clicked.\n *\n * @property {(props: T) => void} [onDoubleClick]\n * - Optional callback triggered when an item is double-clicked.\n *\n * @property {(props: T) => void} [onEnterPressed]\n * - Optional callback triggered when the Enter key is pressed on an item.\n *\n * @property {(changes: { props: T; value: boolean }[]) => void} onSelectedItemsChanged\n * - Callback triggered when the selection state of the items changes.\n *\n * @property {boolean} [isLoading]\n * - Optional flag indicating if the list is loading. If true, a loading state will be shown.\n *\n * @property {boolean} [forceLoading]\n * - Optional flag to force the loading state, even if no items are loading.\n *\n * @property {JSX.Element[]} [skinSkeleton]\n * - Optional array of skeleton elements to be displayed while the list is loading.\n *\n * @property {ReactNode} [emptyState]\n * - Optional content to display when there are no items in the list and no loading state.\n *\n * @property {() => void} [onNextPage]\n * - Optional callback triggered when the user scrolls to load the next page of items.\n *\n * @property {({ field: F; direction: 'ASC' | 'DESC' }) => void} [onOrderByChanged]\n * - Optional callback triggered when the user changes the sorting order of the list.\n *\n * @property {{ field: F; direction: 'ASC' | 'DESC' }} [orderBy]\n * - Optional object specifying the current sorting state of the list.\n *\n * @property {boolean} [hasMoreItems]\n * - Optional flag indicating if there are more items to load.\n *\n * @property {MenuItemsType<T>} [menu]\n * - Optional menu items to be displayed for each item in the list.\n *\n * @property {boolean} [displayMenuDiv]\n * - Optional flag to control whether the menu is displayed as a separate div.\n *\n * @property {string} [className]\n * - Optional CSS class name to apply additional styles to the list container.\n *\n * @property {Array<'selectAll' | 'unselectAll' | 'multiselect' | Array<'delete' & (() => void)>>} [keyboardShortcuts]\n * - Optional array of keyboard shortcut actions to be handled.\n *\n * @property {boolean} [disableKeyboardShortcuts]\n * - Optional flag to disable keyboard shortcuts for the list.\n *\n * @property {boolean} [disableItemCompositionStyles]\n * - Optional flag to disable custom styles for item composition.\n *\n * @property {() => void} [onMouseEnter]\n * - Optional callback triggered when the mouse enters the list.\n *\n * @property {() => void} [onMouseLeave]\n * - Optional callback triggered when the mouse leaves the list.\n *\n * @property {string} [headerBackgroundColor]\n * - Optional background color for the header.\n *\n * @property {\n * { onShiftFKeysPressed?: () => void; onRKeyPressed?: () => void; onBackspaceKeyPressed?: () => void }\n * } [keyBoardShortcutActions]\n * - Optional object with custom actions for specific keyboard shortcuts like Shift+F, R, and Backspace.\n *\n * @returns {JSX.Element}\n * - The rendered list component.\n */\n\nconst List = <T extends { id: number }, F extends keyof T>({\n header,\n checkboxDataCy,\n items,\n itemComposition,\n selectedItems,\n onClick,\n onDoubleClick,\n onEnterPressed,\n onSelectedItemsChanged,\n isLoading,\n forceLoading,\n skinSkeleton,\n emptyState,\n orderBy,\n onOrderByChanged,\n onNextPage,\n hasMoreItems,\n menu,\n displayMenuDiv,\n className,\n disableItemCompositionStyles,\n onMouseEnter,\n onMouseLeave,\n headerBackgroundColor = 'bg-surface',\n keyBoardShortcutActions,\n disableKeyboardShortcuts,\n}: ListProps<T, F>): JSX.Element => {\n const containerRef = useRef<HTMLDivElement>(null);\n const isItemSelected = (item: T) => {\n return selectedItems.some((i) => item.id === i.id);\n };\n const container = document.getElementById('scrollableList');\n const isVerticalScrollbarVisible = container && container.scrollHeight > container.clientHeight;\n const isEmptyState = !hasMoreItems && items.length === 0 && !isLoading;\n const [idItemContextMenuOpen, setIdItemContextMenuOpen] = useState<number | null>(null);\n\n const skeletonData = new Array(25).fill(0).map(() => ({\n skeletonItem: skinSkeleton,\n columns: header.map((column) => column.width),\n }));\n\n const loader = <SkeletonLoader skeleton={skeletonData} />;\n\n useEffect(() => {\n const handleClickOutside = (e: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n setIdItemContextMenuOpen(null);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('contextmenu', handleClickOutside);\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('contextmenu', handleClickOutside);\n };\n }, []);\n\n const handleNextPage = () => {\n onNextPage?.();\n };\n\n const unselectAllItems = () => {\n const changesToMake = selectedItems.map((item) => ({ props: item, value: false }));\n onSelectedItemsChanged(changesToMake);\n };\n\n const unselectAllItemsAndSelectOne = (props: T) => {\n const changesToMake = [...selectedItems.map((item) => ({ props: item, value: false })), { props, value: true }];\n onSelectedItemsChanged(changesToMake);\n };\n\n const executeClickOnSelectedItem = () => {\n const oneItemSelected = selectedItems.length === 1;\n if (oneItemSelected) {\n const selectedItem = selectedItems[0];\n onEnterPressed?.(selectedItem);\n }\n };\n\n const selectAllItems = () => {\n const notSelectedItems = items.filter((item) => !selectedItems.some((s) => s.id === item.id));\n const changesToMake = notSelectedItems.map((item) => ({ props: item, value: true }));\n onSelectedItemsChanged(changesToMake);\n };\n\n const onTopSelectionCheckboxClick = () => {\n const areAllItemsSelected = selectedItems.length === items.length;\n\n if (areAllItemsSelected) {\n unselectAllItems();\n } else {\n selectAllItems();\n }\n };\n\n const onOrderableColumnClicked = (field: HeaderProps<T, F>) => {\n onCloseContextMenu();\n if (!field.orderable || !onOrderByChanged) return;\n\n const columnWasAlreadySelected = orderBy?.field === field.name;\n if (columnWasAlreadySelected) {\n onOrderByChanged({ field: field.name, direction: orderBy.direction === 'ASC' ? 'DESC' : 'ASC' });\n } else {\n onOrderByChanged({ field: field.name, direction: field.defaultDirection ?? 'ASC' });\n }\n };\n\n const handleKeyPress = (action: () => void) => {\n if (!disableKeyboardShortcuts) action();\n };\n\n const handleRKeyPressed = () => {\n keyBoardShortcutActions?.onRKeyPressed?.();\n };\n\n const handleBackspaceKeyPressed = () => {\n keyBoardShortcutActions?.onBackspaceKeyPressed?.();\n };\n\n useHotkeys(\n {\n 'ctrl+a': () => handleKeyPress(selectAllItems),\n 'meta+a': () => handleKeyPress(selectAllItems),\n esc: () => handleKeyPress(unselectAllItems),\n r: () => handleKeyPress(handleRKeyPressed),\n backspace: () => handleKeyPress(handleBackspaceKeyPressed),\n delete: () => handleKeyPress(handleBackspaceKeyPressed),\n },\n [items, selectedItems, disableKeyboardShortcuts],\n );\n\n const onItemClick = (itemClicked: T, e: React.MouseEvent<HTMLDivElement>) => {\n if (e.metaKey || e.ctrlKey) {\n onSelectedItemsChanged([{ props: itemClicked, value: !isItemSelected(itemClicked) }]);\n } else if (!isItemSelected(itemClicked)) {\n onClick?.(itemClicked);\n }\n setIdItemContextMenuOpen(null);\n };\n\n const onRightItemClick = (props: T, e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n if (!isItemSelected(props)) {\n unselectAllItemsAndSelectOne(props);\n }\n setIdItemContextMenuOpen(props.id);\n };\n\n const onCloseContextMenu = () => {\n setIdItemContextMenuOpen(null);\n };\n\n const handleThreeDotsButtonClick = (e: React.MouseEvent<HTMLButtonElement>, item: T) => {\n e.stopPropagation();\n\n setIdItemContextMenuOpen((prevId) => (prevId ? null : item.id));\n if (!isItemSelected(item)) {\n unselectAllItemsAndSelectOne(item);\n }\n };\n\n return (\n <div\n id=\"generic-list-component\"\n className={`relative isolate flex h-full flex-col overflow-x-auto overflow-y-hidden ${className}`}\n ref={containerRef}\n >\n {/* BODY */}\n <div id=\"scrollableList\" className=\"flex h-full flex-col min-w-max overflow-x-hidden overflow-y-auto\">\n <div className={`sticky top-0 z-50 ${headerBackgroundColor}`}>\n {!isEmptyState ? (\n <ListHeader\n selectedItems={selectedItems}\n onTopSelectionCheckboxClick={onTopSelectionCheckboxClick}\n items={items}\n header={header}\n orderBy={orderBy}\n onOrderableColumnClicked={onOrderableColumnClicked}\n menu={menu}\n displayMenuDiv={displayMenuDiv}\n isVerticalScrollbarVisible={isVerticalScrollbarVisible}\n checkboxDataCy={checkboxDataCy}\n onClose={onCloseContextMenu}\n />\n ) : null}\n </div>\n {isEmptyState ? (\n emptyState\n ) : items.length > 0 && !forceLoading ? (\n <InfiniteScroll\n handleNextPage={handleNextPage}\n hasMoreItems={!!hasMoreItems}\n loader={loader}\n scrollableTarget=\"scrollableList\"\n >\n {items.map((item, index) => (\n <ListItem<T>\n key={item.id}\n item={item}\n listIndex={index}\n isOpen={idItemContextMenuOpen === item.id}\n onClose={onCloseContextMenu}\n itemComposition={itemComposition}\n selected={isItemSelected(item)}\n onDoubleClick={onDoubleClick && (() => onDoubleClick(item))}\n onClick={(e) => onItemClick(item, e)}\n onClickContextMenu={(e) => onRightItemClick(item, e)}\n onThreeDotsButtonPressed={(e) => handleThreeDotsButtonClick(e, item)}\n columnsWidth={header.map((column) => column.width)}\n menu={menu}\n onSelectedChanged={(value) => onSelectedItemsChanged([{ props: item, value }])}\n disableItemCompositionStyles={disableItemCompositionStyles}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n genericEnterKey={executeClickOnSelectedItem}\n />\n ))}\n </InfiniteScroll>\n ) : (\n <div>{loader}</div>\n )}\n\n {/* Click outside of the list to unselect all items */}\n {items.length > 0 && (\n <div\n data-testid=\"outside-click-element\"\n className=\"h-full w-full py-6\"\n onClick={unselectAllItems}\n onContextMenu={(e) => {\n e.preventDefault();\n unselectAllItems();\n }}\n />\n )}\n </div>\n </div>\n );\n};\n\nexport default List;\n","import React from 'react';\n\nexport interface TableProps extends React.HTMLAttributes<HTMLTableElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElement> {\n children: React.ReactNode;\n className?: string;\n isHeader?: boolean;\n}\n\n/**\n * Table component\n *\n * A container for tabular data. Wraps the `<table>` element with a div for additional styling or layout purposes.\n * @param {TableProps} props - The props for the table component.\n */\nexport const Table: React.FC<TableProps> = ({ children, className, ...props }) => (\n <div className={className}>\n <table className=\"w-full\" {...props}>\n {children}\n </table>\n </div>\n);\n\n/**\n * TableHeader component\n *\n * Represents the header section of the table. Wraps the `<thead>` element.\n * @param {TableHeaderProps} props - The props for the table header component.\n */\nexport const TableHeader: React.FC<TableHeaderProps> = ({ children, className, ...props }) => (\n <thead className={className} {...props}>\n {children}\n </thead>\n);\n\n/**\n * TableBody component\n *\n * Represents the body section of the table. Wraps the `<tbody>` element.\n * @param {TableBodyProps} props - The props for the table body component.\n */\nexport const TableBody: React.FC<TableBodyProps> = ({ children, className, ...props }) => (\n <tbody className={className} {...props}>\n {children}\n </tbody>\n);\n\n/**\n * TableRow component\n *\n * Represents a single row in the table. Wraps the `<tr>` element.\n * @param {TableRowProps} props - The props for the table row component.\n */\nexport const TableRow: React.FC<TableRowProps> = ({ children, className, onClick, ...props }) => (\n <tr onClick={onClick} className={className} {...props}>\n {children}\n </tr>\n);\n\n/**\n * TableCell component\n *\n * Represents a single cell in the table, either header (`<th>`) or data (`<td>`).\n * @param {TableCellProps} props - The props for the table cell component.\n * @param {boolean} [props.isHeader=false] - Determines if the cell is a header (`<th>`).\n */\nexport const TableCell: React.FC<TableCellProps> = ({ children, className, isHeader = false, onClick, ...props }) => {\n const Component = isHeader ? 'th' : 'td';\n return (\n <Component onClick={onClick} className={className} {...props}>\n {children}\n </Component>\n );\n};\n","import React from 'react';\nimport '../../../styles/Loader.css';\n\nexport interface LoaderProps {\n classNameContainer?: string;\n classNameLoader?: string;\n classNameText?: string;\n type?: 'spinner' | 'pulse';\n text?: string;\n size?: number;\n}\n\n/**\n * Loader component.\n *\n * @property {string} [classNameContainer]\n * - Optional class name for the container wrapping the loader.\n * Useful for applying custom styles to the outermost container.\n *\n * @property {string} [classNameLoader]\n * - Optional class name for the loader element itself (spinner or pulse).\n * Allows custom styling of the loading animation.\n *\n * @property {string} [classNameText]\n * - Optional class name for the text displayed below the loader.\n * Allows style or adjust the appearance of the text.\n *\n * @property {'spinner' | 'pulse'} [type='spinner']\n * - Determines the type of loader to render.\n * Can be `'spinner'` for a rotating animation or `'pulse'` for a pulsing effect.\n * Defaults to `'spinner'`.\n *\n * @property {string} [text]\n * - Optional text to display below the loader.\n *\n * @property {number} [size=32]\n * - Size of the spinner loader in pixels.\n * Applies to the width and height of the SVG element for the `'spinner'` type.\n * Defaults to `32`.\n */\n\nconst Loader: React.FC<LoaderProps> = ({\n classNameContainer,\n classNameLoader,\n classNameText,\n type = 'spinner',\n text,\n size = 32,\n}) => {\n const isSpinner = type === 'spinner';\n\n return (\n <div className={classNameContainer}>\n {isSpinner ? (\n <>\n <svg\n className={`animate-spin ${classNameLoader}`}\n width={size}\n height={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n role=\"img\"\n >\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\"></circle>\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824\n 3 7.938l3-2.647z\"\n ></path>\n </svg>\n {text && <p className={classNameText}>{text}</p>}\n </>\n ) : (\n <div className={`loader-container ${classNameLoader}`}>\n <div className=\"loader06\"></div>\n {text && <p className={`loader-text ${classNameText}`}>{text}</p>}\n </div>\n )}\n </div>\n );\n};\n\nexport default Loader;\n","import { ReactNode } from 'react';\nimport Loader from '../../feedback/loader/Loader';\n\nexport interface ButtonProps {\n id?: string;\n variant?: 'primary' | 'secondary' | 'ghost' | 'destructive' | 'tertiary';\n type?: 'button' | 'submit';\n children?: ReactNode;\n className?: string;\n disabled?: boolean;\n onClick?: (e?: unknown) => void;\n onKeyDown?: (e?: unknown) => void;\n size?: 'medium' | 'default';\n loading?: boolean;\n dataTest?: string;\n autofocus?: boolean;\n buttonDataCy?: string;\n buttonChildrenDataCy?: string;\n}\n\n/**\n * Button component\n *\n * @property {string} [id]\n * - Optional ID for the button element, useful for accessibility and styling.\n *\n * @property {'primary' | 'secondary' | 'ghost' | 'destructive'} [variant]\n * - Defines the button's style variant. Options are:\n * - 'primary': Standard button style with primary color.\n * - 'secondary': Button with border and subtle background color.\n * - 'ghost': Button with transparent background, suitable for icons or light use.\n * - 'destructive': Button for destructive actions.\n *\n * @property {'button' | 'submit'} [type]\n * - Specifies the type of the button. Defaults to 'button'.\n * - 'button': Standard button behavior.\n * - 'submit': Button submits a form when used inside a form element.\n *\n * @property {ReactNode} [children]\n * - The content inside the button, such as text or icons.\n * - Can be a single element or an array of elements.\n *\n * @property {string} [className]\n * - Custom CSS classes for additional styling of the button.\n *\n * @property {boolean} [disabled]\n * - Disables the button, preventing user interaction and applying a disabled style.\n * - Defaults to false.\n *\n * @property {(e?: unknown) => void} [onClick]\n * - Function called when the button is clicked. Accepts an optional event object.\n *\n * @property {(e?: unknown) => void} [onKeyDown]\n * - Function called when a key is pressed while the button is focused. Accepts an optional event object.\n *\n * @property {'medium' | 'default'} [size]\n * - Specifies the button size. Options are:\n * - 'default': Standard size.\n * - 'medium': Slightly smaller size for compact use.\n *\n * @property {boolean} [loading]\n * - If true, shows a loading spinner inside the button.\n *\n * @property {string} [dataTest]\n * - Custom data attribute used for test automation or tracking purposes.\n *\n * @property {boolean} [autofocus]\n * - If true, the button will be focused automatically when the page loads.\n *\n * @property {string} [buttonDataCy]\n * - Custom data attribute for the button element.\n *\n * @property {string} [buttonChildrenDataCy]\n * - Custom data attribute for the children of the button.\n */\n\nconst Button = ({\n variant = 'primary',\n type = 'button',\n id,\n children,\n className = '',\n disabled = false,\n onClick = () => undefined,\n onKeyDown = () => undefined,\n size = 'default',\n loading,\n dataTest,\n autofocus,\n buttonDataCy,\n buttonChildrenDataCy,\n}: Readonly<ButtonProps>): JSX.Element => {\n let styles = '';\n\n if (variant === 'primary' && !disabled) {\n styles = `${loading ? 'bg-primary-dark' : 'bg-primary'} active:bg-primary-dark text-white shadow-sm`;\n } else if (variant === 'primary' && disabled) {\n styles = 'bg-gray-30 text-white shadow-sm';\n } else if (variant === 'destructive' && !disabled) {\n styles = `${loading ? 'bg-red-dark' : 'bg-red'} active:bg-red-dark text-white shadow-sm`;\n } else if (variant === 'destructive' && disabled) {\n styles = 'bg-gray-30 text-white shadow-sm';\n } else if (variant === 'secondary' && !disabled) {\n styles =\n 'bg-surface dark:bg-gray-5 border border-gray-10' +\n ' hover:border-gray-20 active:bg-gray-1 dark:active:bg-gray-10 text-gray-80 shadow-sm';\n } else if (variant === 'secondary' && disabled) {\n styles = 'bg-surface dark:bg-gray-5 text-gray-30 border border-gray-5 shadow-sm';\n } else if (variant === 'ghost' && !disabled) {\n styles = 'hover:bg-gray-5 active:bg-gray-10 focus-visible:bg-gray-10';\n } else if (variant === 'ghost' && disabled) {\n styles = 'text-gray-30';\n } else if (variant === 'tertiary' && !disabled) {\n styles = `${loading ? 'bg-white/45' : 'bg-white/15'} active:bg-white/25 text-white shadow-sm border border-white/20 active:border-white hover:border-white/40 active:border-white \n transition-all duration-200`;\n } else if (variant === 'tertiary' && disabled) {\n styles = 'bg-white/45 text-white shadow-sm border border-white/20';\n }\n\n return (\n <button\n data-cy={buttonDataCy}\n id={id}\n onClick={onClick}\n onKeyDown={onKeyDown}\n disabled={disabled || loading}\n type={type}\n data-test={dataTest}\n autoFocus={autofocus}\n className={`${\n size === 'default' ? 'h-10 px-5' : 'h-8 px-3.5'\n } relative flex shrink-0 select-none flex-row items-center justify-center space-x-2 \n whitespace-nowrap rounded-lg text-base font-medium outline-none ring-2 ring-primary/0 \n ring-offset-2 ring-offset-transparent transition-all duration-100 ease-in-out \n focus-visible:ring-primary/50 ${styles} ${className}`}\n >\n {loading && <Loader size={18} />}\n <div className=\"flex items-center justify-center space-x-2\" data-cy={buttonChildrenDataCy}>\n {children}\n </div>\n </button>\n );\n};\n\nexport default Button;\n","import { Upload } from '@phosphor-icons/react';\nimport { ReactNode } from 'react';\nimport { Button } from '../../input/button';\n\nexport interface EmptyProps {\n icon: JSX.Element;\n title: string;\n subtitle: string;\n action?: {\n text: string;\n icon: typeof Upload;\n style: 'plain' | 'elevated';\n onClick: () => void;\n };\n contextMenuClick?: (event: React.MouseEvent<HTMLDivElement>) => void;\n}\n\n/**\n * Empty component\n *\n * This component is used to display a message or placeholder content when there is no data or items available.\n * It allows for a customizable icon, title, subtitle, and an optional action button.\n *\n * @property {JSX.Element} icon\n * - The icon to be displayed at the top of the component. This can be any valid React element.\n *\n * @property {string} title\n * - The main title or heading to be displayed in the component.\n *\n * @property {string} subtitle\n * - A secondary subtitle or description.\n *\n * @property {object} [action]\n * - An optional object containing details for an action button that can be displayed.\n *\n * @property {string} action.text\n * - The text to display on the action button.\n *\n * @property {Function} [contextMenuClick]\n * - An optional function to handle right-click (context menu) interactions on the component.\n */\n\nconst Empty = ({ icon, title, subtitle, action, contextMenuClick }: EmptyProps): JSX.Element => {\n let button: ReactNode = null;\n\n if (action) {\n button = (\n <Button variant=\"secondary\" onClick={action.onClick}>\n <span>{action.text}</span>\n <action.icon size={20} />\n </Button>\n );\n }\n\n return (\n <div className=\"h-full w-full p-8\" onContextMenu={contextMenuClick}>\n <div className=\"flex h-full flex-col items-center justify-center space-y-6 pb-20\">\n <div className=\"pointer-events-none mx-auto w-max\">{icon}</div>\n <div className=\"pointer-events-none space-y-1 text-center\">\n <p className=\"text-2xl font-medium text-gray-100\">{title}</p>\n <p className=\"text-lg text-gray-60\">{subtitle}</p>\n </div>\n {button}\n </div>\n </div>\n );\n};\n\nexport default Empty;\n","export interface SkeletonItemProps {\n className?: string;\n}\n\nconst SkeletonItem = ({ className }: SkeletonItemProps): React.ReactElement => (\n <div className={`rounded-lg bg-gray-5 animate-pulse${className ? ` ${className}` : ''}`} />\n);\n\nexport default SkeletonItem;\n","import SkeletonItem from './SkeletonItem';\n\n/**\n * Loading placeholder for the \"usage / limit\" amount (e.g. \"8GB / 100GB\").\n */\nconst Skeleton = (): React.ReactElement => (\n <div className=\"flex flex-row items-center gap-2\">\n <SkeletonItem className=\"h-3 w-8\" />\n <SkeletonItem className=\"h-3 w-2\" />\n <SkeletonItem className=\"h-3 w-8\" />\n </div>\n);\n\nexport default Skeleton;\n","import { CloudWarningIcon, XIcon } from '@phosphor-icons/react';\nimport React, { ReactNode } from 'react';\nimport { Button } from '../../../input/button';\nimport Skeleton from '../../skeleton/Skeleton';\n\nexport interface UsageWarningBannerProps {\n title: string;\n description: ReactNode;\n usage: string;\n limit: string;\n percentage: number;\n upgradeLabel: string;\n closeButtonLabel: string;\n onUpgradeClick: () => void;\n onCloseButtonClick: () => void;\n barClassName?: string;\n isLoading?: boolean;\n}\n\nconst UsageWarningBanner: React.FC<UsageWarningBannerProps> = ({\n title,\n description,\n usage,\n limit,\n percentage,\n upgradeLabel,\n closeButtonLabel,\n onUpgradeClick,\n onCloseButtonClick,\n barClassName = 'bg-yellow-60',\n isLoading = false,\n}) => (\n <div className=\"flex flex-col w-full px-4 py-3 rounded-xl bg-alert border-alert-dark border h-min\">\n <div className=\"flex flex-col w-full gap-1\">\n <div className=\"flex flex-row justify-between items-center\">\n <span className=\"flex flex-row items-center gap-2\">\n <CloudWarningIcon weight=\"fill\" className=\"size-5 text-yellow-60\" />\n <p className=\"text-sm font-semibold text-gray-80\">{title}</p>\n </span>\n <button\n type=\"button\"\n aria-label={closeButtonLabel}\n onClick={onCloseButtonClick}\n className=\"flex items-center justify-center\"\n >\n <XIcon className=\"size-5 text-gray-53 cursor-pointer\" />\n </button>\n </div>\n <div className=\"text-xs font-medium text-gray-52\">{description}</div>\n </div>\n <div className=\"flex flex-row items-center gap-6 h-10\">\n <div className=\"flex flex-1 flex-col gap-1\">\n <div className=\"flex w-full h-1.5 bg-gray-10 rounded-full\">\n <div className={`${barClassName} h-full rounded-full`} style={{ width: `${percentage}%` }} />\n </div>\n {isLoading ? (\n <Skeleton />\n ) : (\n <span className=\"flex flex-row gap-1\">\n <p className=\"text-gray-60 text-xs\">{usage}</p>\n <p className=\"text-gray-60 text-xs\">/</p>\n <p className=\"text-gray-60 text-xs\">{limit}</p>\n </span>\n )}\n </div>\n <Button variant=\"secondary\" size=\"medium\" onClick={onUpgradeClick}>\n {upgradeLabel}\n </Button>\n </div>\n </div>\n);\n\nexport default UsageWarningBanner;\n","import { CaretUp, Warning } from '@phosphor-icons/react';\nimport { useEffect } from 'react';\n\ntype ButtonVariant = 'default' | 'warning' | 'cancel';\n\nexport interface CircleButtonProps {\n children?: JSX.Element | JSX.Element[];\n variant?: ButtonVariant;\n active?: boolean;\n onClick?: () => void;\n onClickToggleButton?: () => void;\n className?: string;\n dropdown?: React.ReactNode;\n indicator?: {\n icon?: JSX.Element;\n className?: string;\n };\n isOpen?: boolean;\n handleOpen?: () => void;\n handleClose?: () => void;\n}\n\nconst CircleButton = ({\n children,\n variant = 'default',\n active = false,\n onClick,\n onClickToggleButton,\n className = '',\n dropdown,\n indicator,\n isOpen = false,\n handleOpen = () => {},\n handleClose = () => {},\n}: CircleButtonProps): JSX.Element => {\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (isOpen) {\n const target = event.target as HTMLElement;\n const circleButton = document.querySelector(`[data-circle-button=\"${variant}\"]`);\n if (circleButton && !circleButton.contains(target)) {\n handleClose();\n }\n }\n };\n\n document.addEventListener('click', handleClickOutside);\n return () => {\n document.removeEventListener('click', handleClickOutside);\n };\n }, [isOpen, variant]);\n\n const handleToggle = (e: React.MouseEvent) => {\n e.stopPropagation();\n if (dropdown) {\n onClickToggleButton?.();\n isOpen ? handleClose() : handleOpen();\n }\n };\n\n const handleMainClick = () => {\n onClick?.();\n };\n\n const getButtonStyles = () => {\n switch (variant) {\n case 'cancel':\n return 'bg-red hover:bg-red/85';\n case 'warning':\n return active ? 'bg-white/85' : 'bg-white/25 hover:bg-white/35';\n default:\n return active ? 'bg-white/85' : 'bg-white/25 hover:bg-white/35';\n }\n };\n\n const renderIndicator = () => {\n if (!indicator) return null;\n\n if (variant === 'warning') {\n return (\n <div className=\"absolute -top-1 -right-1 h-5 w-5 bg-orange border border-black/35 rounded-full flex items-center justify-center\">\n <Warning size={12} color=\"black\" weight=\"bold\" />\n </div>\n );\n }\n\n return (\n <div\n className={`absolute -top-1 -right-1 h-5 w-5 flex items-center justify-center rounded-full ${indicator.className || ''}`}\n >\n {indicator.icon}\n </div>\n );\n };\n\n const renderDropdownButton = () => {\n if (!dropdown || variant === 'cancel' || variant === 'warning') return null;\n\n return (\n <button\n onClick={handleToggle}\n className=\"absolute -top-1 -right-1 h-5 w-5 border bg-white border-black/35 rounded-full flex items-center justify-center hover:bg-gray-50\"\n >\n <CaretUp size={10} color=\"black\" weight=\"fill\" />\n </button>\n );\n };\n\n return (\n <div className=\"relative w-11 h-11\" data-circle-button={variant}>\n <button\n onClick={handleMainClick}\n className={`\n h-11 w-11\n flex items-center justify-center\n rounded-full\n transition-all duration-200\n ${getButtonStyles()}\n ${className}\n `}\n >\n {children}\n </button>\n {renderDropdownButton()}\n {renderIndicator()}\n {isOpen && dropdown && variant !== 'cancel' && <div className=\"absolute bottom-full mb-2 left-0\">{dropdown}</div>}\n </div>\n );\n};\n\nexport default CircleButton;\n","import { ReactNode, useRef, useState } from 'react';\n\nexport interface TooltipProps {\n children: ReactNode;\n title: string;\n subtitle?: string;\n popsFrom: 'right' | 'left' | 'top' | 'bottom';\n className?: string;\n delayInMs?: number;\n arrow?: boolean;\n}\n\n/**\n * Tooltip component\n *\n * @property {ReactNode} children\n * - The content that triggers the tooltip when hovered over.\n *\n * @property {string} title\n * - The main text displayed inside the tooltip. This is required.\n *\n * @property {string} [subtitle]\n * - An optional subtitle displayed below the main title inside the tooltip.\n *\n * @property {'right' | 'left' | 'top' | 'bottom'} popsFrom\n * - Determines the direction from which the tooltip appears relative to the trigger element.\n * - \"right\": Tooltip appears to the right of the element.\n * - \"left\": Tooltip appears to the left of the element.\n * - \"top\": Tooltip appears above the element.\n * - \"bottom\": Tooltip appears below the element.\n *\n * @property {string} [className]\n * - Additional CSS classes to style the tooltip container. Use to override default styles.\n *\n * @property {number} [delayInMs]\n * - The delay (in milliseconds) before hiding the tooltip after the mouse leaves the trigger element.\n * - If not provided, the tooltip hides immediately.\n *\n * @property {boolean} [arrow=true]\n * - Whether to display the arrow pointing to the trigger element.\n * - Default is true.\n *\n * @returns {JSX.Element}\n * - A tooltip component that shows additional information when hovering over its children.\n */\n\nconst Tooltip = ({\n children,\n title,\n subtitle,\n popsFrom,\n className,\n delayInMs,\n arrow = true,\n}: TooltipProps): JSX.Element => {\n const [visible, setVisible] = useState(false);\n\n const timeoutRef = useRef<null | number>(null);\n\n function show() {\n setVisible(true);\n }\n\n function hide() {\n setVisible(false);\n }\n\n function handleMouseEnter() {\n if (timeoutRef.current !== null) {\n clearTimeout(timeoutRef.current);\n }\n show();\n }\n function handleMouseLeave() {\n if (delayInMs) {\n timeoutRef.current = setTimeout(() => {\n timeoutRef.current = null;\n hide();\n }, delayInMs) as unknown as number;\n } else {\n hide();\n }\n }\n\n let tooltipPosition = '';\n let trianglePosition = '';\n let triangle = '';\n\n switch (popsFrom) {\n case 'right':\n tooltipPosition = 'left-full top-1/2 -translate-y-1/2 ml-1.5';\n trianglePosition = 'flex-row-reverse';\n triangle = 'polygon(100% 0%, 100% 100%, 0% 50%)';\n break;\n case 'left':\n tooltipPosition = 'right-full top-1/2 -translate-y-1/2 mr-1.5';\n trianglePosition = 'flex-row';\n triangle = 'polygon(0% 0%, 0% 100%, 100% 50%)';\n break;\n case 'top':\n tooltipPosition = 'bottom-full left-1/2 -translate-x-1/2 mb-1.5 origin-bottom';\n trianglePosition = 'flex-col';\n triangle = 'polygon(0% 0%, 100% 0%, 50% 100%)';\n break;\n case 'bottom':\n tooltipPosition = 'top-full left-1/2 -translate-x-1/2 mt-1.5';\n trianglePosition = 'flex-col-reverse';\n triangle = 'polygon(50% 0%, 0% 100%, 100% 100%)';\n break;\n }\n\n return (\n <div\n className={`relative w-max ${className}`}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n style={{ lineHeight: 0 }}\n >\n <div\n className={`pointer-events-none absolute ${tooltipPosition} flex items-center ${trianglePosition} drop-shadow-tooltip transition-all duration-150 ${\n visible ? 'scale-100 opacity-100' : 'scale-50 opacity-0'\n }`}\n >\n <div className=\"w-max rounded-lg bg-gray-90 px-4 py-1.5 text-center dark:bg-gray-5\">\n <p className=\"text-base text-white\">{title}</p>\n {subtitle && <p className=\"-mt-1 text-sm text-gray-40\">{subtitle}</p>}\n </div>\n {arrow && (\n <div\n className={`bg-gray-90 dark:bg-gray-5 ${\n popsFrom === 'bottom' || popsFrom === 'top' ? 'h-1.5 w-4' : 'h-4 w-1.5'\n }`}\n style={{ clipPath: triangle, marginTop: popsFrom === 'top' ? '-1px' : undefined }}\n data-testid=\"tooltip-arrow\"\n />\n )}\n </div>\n {children}\n </div>\n );\n};\n\nexport default Tooltip;\n","import { Copy } from '@phosphor-icons/react';\nimport { useState } from 'react';\nimport Tooltip from '../../overlay/tooltip/Tooltip';\n\nexport interface CopyableProps {\n className?: string;\n classText?: string;\n text: string;\n copiedText?: string;\n copyToClipboardText?: string;\n}\n\n/**\n * Copyable component\n *\n * @property {string} [className]\n * - Custom classes for the outer container.\n *\n * @property {string} [classText]\n * - Custom classes for the selected text.\n *\n * @property {string} text\n * - The text content to be displayed and copied to the clipboard.\n *\n * @property {string} copiedText\n * - The text to display in the tooltip when the content has been copied.\n *\n * @property {string} copyToClipboardText\n * - The text to display in the tooltip when the content can be copied to the clipboard.\n */\n\nconst Copyable = ({\n className = '',\n classText = 'select-text text-gray-80',\n text,\n copiedText = 'Copied!',\n copyToClipboardText = 'Copy to clipboard',\n}: CopyableProps): JSX.Element => {\n const [justCopied, setJustCopied] = useState(false);\n\n async function onCopy() {\n await navigator.clipboard.writeText(text);\n setJustCopied(true);\n setTimeout(() => setJustCopied(false), 1000);\n }\n\n return (\n <div\n className={`${className} flex h-11 items-center justify-between rounded-md border border-gray-10 bg-gray-5 px-4`}\n >\n <p className={`${classText}`}>{text}</p>\n <Tooltip\n className=\"ml-6\"\n popsFrom=\"top\"\n title={justCopied ? copiedText : copyToClipboardText}\n delayInMs={justCopied ? 500 : undefined}\n >\n <button disabled={justCopied} onClick={onCopy}>\n <Copy className=\"shrink-0 text-gray-50 hover:text-gray-60\" size={24} />\n </button>\n </Tooltip>\n </div>\n );\n};\n\nexport default Copyable;\n","import { CheckCircle, Eye, EyeSlash, MagnifyingGlass, Warning, WarningOctagon, X } from '@phosphor-icons/react';\nimport { KeyboardEvent, useEffect, useRef, useState } from 'react';\n\nexport interface InputProps {\n className?: string;\n label?: string;\n variant?: 'default' | 'search' | 'password' | 'email';\n accent?: 'error' | 'warning' | 'success';\n disabled?: boolean;\n placeholder?: string;\n value?: string;\n maxLength?: number;\n onChange?: (v: string) => void;\n onClear?: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n message?: string;\n autofocus?: boolean;\n autoComplete?: 'on' | 'off';\n dataTest?: string;\n name?: string;\n required?: boolean;\n labelDataCy?: string;\n inputDataCy?: string;\n onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;\n inputClassName?: string;\n borderRadius?: string;\n fontClasses?: string;\n}\n\n/**\n * Input component\n *\n * @property {string} [className]\n * - Optional custom class name to be applied to the outermost container of the input.\n *\n * @property {string} [label]\n * - The label for the input field.\n *\n * @property {'default' | 'search' | 'password' | 'email'} [variant]\n * - The variant of the input field. Determines the input type and visual style.\n * - 'default': Regular input field.\n * - 'search': Search field with a magnifying glass icon.\n * - 'password': Password input with an option to toggle visibility.\n * - 'email': Email input with specific email validation.\n *\n * @property {'error' | 'warning' | 'success'} [accent]\n * - Optional accent color for the input border and message.\n * - 'error': Red border and error message.\n * - 'warning': Orange border and warning message.\n * - 'success': Green border and success message.\n *\n * @property {boolean} [disabled]\n * - If true, disables the input field, preventing user interaction.\n *\n * @property {string} [placeholder]\n * - The placeholder text displayed inside the input when it is empty.\n *\n * @property {string} [value]\n * - The current value of the input field.\n *\n * @property {number} [maxLength]\n * - Maximum number of characters allowed in the input field.\n *\n * @property {(v: string) => void} [onChange]\n * - Callback function that is called whenever the input value changes.\n *\n * @property {() => void} [onClear]\n * - Callback function that is called when the clear button is clicked in the search variant.\n *\n * @property {() => void} [onFocus]\n * - Callback function that is called when the input gains focus.\n *\n * @property {() => void} [onBlur]\n * - Callback function that is called when the input loses focus.\n *\n * @property {string} [message]\n * - Optional message displayed below the input. Used for feedback like error or success.\n *\n * @property {boolean} [autofocus]\n * - If true, the input will automatically gain focus when the component is rendered.\n *\n * @property {'on' | 'off'} [autoComplete]\n * - Controls the auto-completion behavior of the input. Defaults to 'on'.\n *\n * @property {string} [dataTest]\n * - Optional data attribute for testing purposes, used for targeting the input element in tests.\n *\n * @property {string} [name]\n * - The name attribute of the input field, used in form submissions.\n *\n * @property {boolean} [required]\n * - If true, the input is marked as required for form validation.\n *\n * @property {string} [labelDataCy]\n * - Optional data attribute for targeting the label element in tests.\n *\n * @property {string} [inputDataCy]\n * - Optional data attribute for targeting the input element itself in tests.\n *\n * @property {string} [inputClassName]\n * - Optional custom class name to be applied directly to the input element.\n * - These classes will be added after the default classes and can override them.\n *\n * @property {string} [borderRadius='rounded-md']\n * - Optional Tailwind class to control the border radius of the input.\n * - Defaults to 'rounded-md' if not specified.\n *\n * @property {string} [fontClasses='text-lg font-normal']\n * - Optional Tailwind class to control the font size and font weight of the input.\n * - Defaults to 'text-lg font-normal' if not specified.\n *\n * @property {(e: KeyboardEvent<HTMLInputElement>) => void} [onKeyDown]\n * - Callback function for handling keydown events in the input field.\n */\n\nconst Input = ({\n className = '',\n label,\n variant = 'default',\n accent,\n disabled,\n placeholder,\n value,\n maxLength,\n onChange,\n onClear,\n message,\n onFocus,\n onBlur,\n autofocus = false,\n autoComplete = 'on',\n dataTest,\n name,\n required = false,\n labelDataCy,\n inputDataCy,\n onKeyDown,\n inputClassName = '',\n borderRadius = 'rounded-md',\n fontClasses = 'text-lg font-normal',\n}: InputProps): JSX.Element => {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const focusInput = () => {\n if (inputRef && inputRef.current) {\n if (variant !== 'email') {\n inputRef.current.selectionStart = inputRef.current.value.length;\n inputRef.current.selectionEnd = inputRef.current.value.length;\n }\n inputRef.current.focus();\n }\n };\n\n useEffect(() => {\n if (message || autofocus) {\n focusInput();\n }\n }, [message, autofocus, disabled]);\n\n let focusColor: string;\n\n switch (accent) {\n case 'error':\n focusColor = 'border-red focus:border-red ring-red';\n break;\n case 'warning':\n focusColor = 'focus:border-orange ring-orange';\n break;\n case 'success':\n focusColor = 'focus:border-green ring-green';\n break;\n default:\n focusColor = 'focus:border-primary ring-primary';\n break;\n }\n\n const borderColor =\n variant === 'search' ? 'border-transparent' : 'border-gray-20 disabled:border-gray-10 hover:border-gray-30';\n\n const placeholderColor = variant === 'search' ? 'placeholder-gray-40' : 'placeholder-gray-30';\n\n const padding = variant === 'search' ? 'pr-4 pl-10' : 'px-4';\n\n const [showPassword, setShowPassword] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n\n const input = (\n <div className=\"relative\">\n <input\n ref={inputRef}\n disabled={disabled}\n className={`inxt-input h-10 w-full border bg-transparent ${fontClasses} text-gray-80 outline-none ring-opacity-10 focus:ring-3 disabled:text-gray-40 disabled:placeholder-gray-20 dark:ring-opacity-20 \n ${borderColor} ${focusColor} ${placeholderColor} ${padding} ${borderRadius} ${inputClassName}`}\n type={variant === 'password' && !showPassword ? 'password' : variant === 'email' ? 'email' : 'text'}\n placeholder={placeholder}\n onChange={(e) => onChange && onChange(e.target.value)}\n onFocus={() => {\n if (onFocus) onFocus();\n setIsFocused(true);\n }}\n onBlur={() => {\n if (onBlur) onBlur();\n setIsFocused(false);\n }}\n autoComplete={autoComplete}\n value={value}\n maxLength={maxLength}\n data-test={dataTest}\n data-cy={inputDataCy}\n name={name}\n required={required}\n onKeyDown={onKeyDown ?? undefined}\n />\n {variant === 'password' && isFocused && (\n <div\n role=\"button\"\n tabIndex={0}\n onMouseDown={(e) => {\n e.preventDefault();\n setShowPassword(!showPassword);\n }}\n className=\"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer bg-transparent py-2 pl-2 text-gray-80\"\n >\n {showPassword ? <Eye size={24} /> : <EyeSlash size={24} />}\n </div>\n )}\n {variant === 'search' && (\n <MagnifyingGlass\n className={`absolute left-4 top-1/2 -translate-y-1/2 ${disabled ? 'text-gray-20' : 'text-gray-40'}`}\n size={20}\n />\n )}\n {variant === 'search' && value && !disabled && (\n <div\n role=\"button\"\n tabIndex={0}\n onMouseDown={(e) => {\n e.preventDefault();\n if (onClear) onClear();\n }}\n className={`absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer py-2 pl-2 text-gray-40 \n ${isFocused ? 'bg-white' : 'bg-gray-5'}`}\n >\n <X size={20} />\n </div>\n )}\n </div>\n );\n\n let messageColor: string;\n let MessageIcon: typeof WarningOctagon | undefined;\n\n switch (accent) {\n case 'success':\n messageColor = 'text-green';\n MessageIcon = CheckCircle;\n break;\n case 'warning':\n messageColor = 'text-orange';\n MessageIcon = Warning;\n break;\n case 'error':\n messageColor = 'text-red';\n MessageIcon = WarningOctagon;\n break;\n default:\n messageColor = 'text-gray-80';\n }\n\n return (\n <div className={`${className}`}>\n {label ? (\n <label>\n <span data-cy={labelDataCy} className={`text-sm ${disabled ? 'text-gray-40' : 'text-gray-80'}`}>\n {label}\n </span>\n {input}\n </label>\n ) : (\n input\n )}\n {maxLength && (\n <p className=\"font-regular mt-1 text-right text-sm text-gray-50\">{`${value?.length ?? 0}/${maxLength}`}</p>\n )}\n {message && (\n <div className={`mt-0.5 flex items-center ${messageColor}`}>\n {MessageIcon && <MessageIcon size={16} weight=\"fill\" />}\n <p className=\"ml-1 text-sm\">{message}</p>\n </div>\n )}\n </div>\n );\n};\n\nexport default Input;\n","export interface RadioButtonProps {\n checked: boolean;\n id?: string;\n disabled?: boolean;\n onClick: (e?: unknown) => void;\n}\n\n/**\n * RadioButton component\n *\n * A custom radio button component that allows the user to select one option from a group of choices.\n *\n * @property {boolean} checked\n * - Determines whether the radio button is selected (checked) or not. If true, the radio button appears active.\n *\n * @property {string} [id]\n * - The unique identifier for the radio button element. Useful for associating labels or customizing the radio button.\n *\n * @property {boolean} [disabled]\n * - If true, disables the radio button, making it unclickable and visually indicating its inactive state.\n *\n * @property {(e?: unknown) => void} onClick\n * - A callback function triggered when the radio button is clicked.\n * Can be used to handle custom behavior when the button is selected.\n */\n\nconst RadioButton = ({ checked, id, disabled = false, onClick }: RadioButtonProps) => {\n const borderStyle = disabled ? 'border-gray-10' : 'border-gray-40';\n const checkedStyle =\n disabled && checked ? 'border-0 bg-gray-20' : checked && 'border-0 bg-primary active:bg-primary-dark';\n\n return (\n <div id={id} className=\"flex cursor-pointer\">\n <button\n disabled={disabled}\n onClick={onClick}\n className={`flex h-5 w-5 items-center justify-center rounded-full border ${checkedStyle} ${borderStyle}`}\n >\n {<div className={`h-2.5 w-2.5 rounded-full ${checked || disabled ? 'bg-white' : 'hover:bg-gray-10'}`}></div>}\n </button>\n <input type=\"radio\" className=\"h-0 w-0 appearance-none opacity-0\" checked readOnly />\n </div>\n );\n};\n\nexport default RadioButton;\n","import { ChangeEvent } from 'react';\nimport '../../../styles/RangeSlider.css';\n\nexport interface RangeSliderProps {\n value: number;\n min?: number;\n max: number;\n step?: number;\n percentageForProgressSliderBar?: number;\n className?: string;\n onChange: (value: number) => void;\n disabled?: boolean;\n ariaLabel?: string;\n}\n\n/**\n * RangeSlider component\n *\n * @param {RangeSliderProps} props - Properties of the RangeSlider component.\n *\n * @property {number} value\n * - The current value of the slider.\n *\n * @property {number} [min=0]\n * - The minimum value of the slider. Defaults to 0 if not specified.\n *\n * @property {number} max\n * - The maximum value of the slider.\n *\n * @property {number} [step]\n * - The step interval for the slider. Defines how much the value increments or decrements on each step.\n *\n * @property {number} [percentageForProgressSliderBar]\n * - Optional. This value could control the width or progress of the slider,\n * but it's not used in the component directly.\n *\n * @property {string} [className]\n * - Optional class name to apply custom styles to the slider container.\n *\n * @property {(value: number) => void} onChange\n * - Callback function triggered when the slider value changes. Receives the new value as an argument.\n *\n * @property {boolean} [disabled=false]\n * - Optional flag to disable the slider. Defaults to false if not specified.\n *\n * @property {string} [ariaLabel=\"Range slider\"]\n * - Optional ARIA label for accessibility purposes. Defaults to 'Range slider' if not specified.\n *\n * @returns {JSX.Element}\n * - The rendered RangeSlider component.\n *\n * The slider visually represents its value with a linear gradient background.\n * The background dynamically adjusts as the slider's value changes, reflecting the percentage of progress.\n * The slider supports custom min, max, and step values, and handles input changes via the `onChange` callback.\n *\n * The component also provides accessibility through the `aria-label` attribute.\n */\n\nconst RangeSlider = ({\n value,\n min = 0,\n max,\n step,\n className,\n disabled = false,\n ariaLabel = 'Range slider',\n onChange,\n}: RangeSliderProps) => {\n const percentage = ((value - min) / (max - min)) * 100;\n const sliderBackground = `linear-gradient(to right, #3264fe ${percentage}%, #d5d5d5 ${percentage}%)`;\n\n return (\n <div className={className}>\n <input\n id=\"my-slider\"\n type=\"range\"\n min={min}\n max={max}\n value={value}\n step={step}\n onInput={(e: ChangeEvent<HTMLInputElement>) => onChange(Number(e.target.value))}\n disabled={disabled}\n aria-label={ariaLabel}\n style={{ background: sliderBackground }}\n />\n </div>\n );\n};\n\nexport default RangeSlider;\n","import { useState } from 'react';\n\nexport interface SwitchComponentProps {\n size?: 'md' | 'lg' | 'xl';\n id?: string;\n dataTestId?: string;\n disabled?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n onClick?: (e?: unknown) => void;\n}\n\n/**\n * SwitchComponent\n *\n * A toggle switch component that allows users to toggle between two states: on/off or checked/unchecked.\n *\n * @property {string} size\n * - Defines the size of the switch. Options are 'md', 'lg', or 'xl'.\n *\n * @property {string} [id]\n * - The unique identifier for the switch element.\n *\n * @property {string} [dataTestId]\n * - A custom data attribute for use in testing or identifying the switch in the DOM.\n *\n * @property {boolean} [disabled]\n * - If true, disables the switch, making it unclickable and visually indicating its inactive state.\n *\n * @property {(checked: boolean) => void} [onCheckedChange]\n * - A callback function triggered whenever the checked state changes. Receives the new checked state as an argument.\n *\n * @property {(e?: unknown) => void} [onClick]\n * - A callback function triggered when the switch is clicked. Allows for custom click behavior.\n */\n\nconst SwitchComponent = ({\n disabled = false,\n id,\n dataTestId = 'switch',\n size = 'md',\n onClick,\n onCheckedChange,\n}: SwitchComponentProps) => {\n const [checked, setChecked] = useState(false);\n\n const handleCheckedChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newChecked = e.target.checked;\n setChecked(newChecked);\n if (onCheckedChange) {\n onCheckedChange(newChecked);\n }\n };\n\n const backgroundColor = disabled ? 'bg-gray-5' : checked ? 'bg-green' : 'bg-gray-10';\n\n const sizeClasses = {\n md: 'w-8 h-5',\n lg: 'w-12 h-7',\n xl: 'w-14 h-8',\n };\n\n const thumbSizeClasses = {\n md: 'w-4 h-4',\n lg: 'w-6 h-6',\n xl: 'w-7 h-7',\n };\n\n const checkedTranslation = {\n md: 'translate-x-[13px]',\n lg: 'translate-x-[21px]',\n xl: 'translate-x-[25px]',\n };\n\n return (\n <label\n htmlFor={id}\n className={`relative inline-flex items-center cursor-pointer ${sizeClasses[size]}`}\n data-testid={dataTestId}\n >\n <input\n type=\"checkbox\"\n id={id}\n disabled={disabled}\n checked={checked}\n onChange={handleCheckedChange}\n onClick={onClick}\n className=\"sr-only\"\n />\n <div\n className={`absolute inset-0 rounded-full transition-colors duration-200 ${backgroundColor} ${\n disabled ? 'data-[state=checked]:bg-green/50' : ''\n }`}\n />\n <span\n className={`block bg-white rounded-full transition-transform duration-200 transform ${\n checked ? checkedTranslation[size] : 'translate-x-[3px]'\n } ${thumbSizeClasses[size]} ${disabled ? 'pointer-events-none' : ''}`}\n />\n </label>\n );\n};\n\nexport default SwitchComponent;\n","export interface TextAreaComponentProps {\n disabled?: boolean;\n accentColor?: 'red';\n placeholder?: string;\n value?: string;\n onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n name?: string;\n}\n\n/**\n * TextArea component\n *\n * @param {TextAreaComponentProps} props - Properties of the TextArea component.\n *\n * @property {boolean} [disabled=false]\n * - Optional flag to disable the text area. Defaults to false if not specified.\n *\n * @property {'red'} [accentColor]\n * - Optional accent color for the text area.\n *\n * @property {string} [placeholder='']\n * - Optional placeholder text that is displayed when the text area is empty.\n *\n * @property {string} [value='']\n * - Optional value for the text area. The content inside the text area is controlled by this value.\n *\n * @property {(e: React.ChangeEvent<HTMLTextAreaElement>) => void} [onChange]\n * - Optional callback function triggered when the text area value changes. Receives the event object as an argument.\n *\n * @property {string} [name]\n * - Optional name attribute for the text area, typically used for form submissions.\n *\n * @returns {JSX.Element}\n * - The rendered TextArea component.\n */\n\nconst TextArea = ({\n disabled = false,\n accentColor,\n placeholder = '',\n value = '',\n onChange,\n name,\n}: TextAreaComponentProps): JSX.Element => {\n return (\n <textarea\n disabled={disabled}\n placeholder={placeholder}\n className={`\n w-full h-full py-4 px-3.5 bg-transparent border rounded-md outline-none text-lg font-regular resize-none\n placeholder:text-gray-30\n ${!disabled ? 'border-gray-20 text-gray-100' : 'border-gray-5 text-gray-40'}\n ${!accentColor && 'border-gray-20 focus:border-primary focus:ring focus:ring-primary/10'}\n ${accentColor === 'red' && 'border-red focus:ring focus:ring-red/10'}\n `}\n value={value}\n onChange={onChange}\n name={name}\n />\n );\n};\n\nexport default TextArea;\n","export interface HeaderProps {\n /**\n * Elements to be rendered on the left side of the header\n */\n leftContent?: JSX.Element;\n\n /**\n * Elements to be rendered on the right side of the header\n */\n rightContent?: JSX.Element;\n\n /**\n * Optional class name for additional styling\n */\n className?: string;\n}\n\n/**\n * Header component\n *\n * A flexible header component that can contain any content on its left and right sides.\n *\n * @param {HeaderProps} props - The properties for the Header component\n * @returns {JSX.Element} The rendered Header component\n */\nconst Header = ({ leftContent, rightContent, className = '' }: HeaderProps): JSX.Element => {\n return (\n <header\n className={`\n flex\n items-center\n justify-between\n ${className}\n `}\n >\n <div className=\"flex items-center space-x-4\">{leftContent}</div>\n\n <div className=\"flex items-center space-x-4\">{rightContent}</div>\n </header>\n );\n};\n\nexport default Header;\n","import { ReactNode } from 'react';\n\nexport interface GridProps {\n children?: ReactNode;\n className?: string;\n id?: string;\n dataCy?: string;\n}\n\n/**\n * Grid component\n *\n * A responsive grid container that automatically adjusts columns from 2 (mobile) up to 6 (extra large screens).\n *\n * @param {GridProps} props - The properties of the component.\n *\n * @property {ReactNode} [children]\n * - The child components or elements to be rendered inside the grid container.\n *\n * @property {string} [className]\n * - Optional custom CSS classes for additional styling or layout adjustments overriding default tailwind classes.\n *\n * @property {string} [id]\n * - Optional ID for the grid container element.\n *\n * @property {string} [dataCy]\n * - Custom data attribute used for e2e Cypress test targeting.\n *\n * @returns {JSX.Element}\n * - A JSX element containing the children formatted inside a grid.\n */\nconst Grid = ({ children, className = '', id, dataCy }: Readonly<GridProps>): JSX.Element => {\n return (\n <div\n id={id}\n data-cy={dataCy}\n className={`grid min-w-full auto-rows-min grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 ${className}`}\n >\n {children}\n </div>\n );\n};\n\nexport default Grid;\n","import { useState, ReactNode, useEffect, useRef } from 'react';\nimport { Menu, MenuItemType } from '../menu';\n\nexport type DropdownProps<T> = {\n children: ReactNode | ((obj: { open: boolean }) => JSX.Element);\n options?: { text: string; onClick: () => void }[];\n classButton?: string;\n menuItems?: ReactNode[];\n classMenuItems: string;\n openDirection: 'left' | 'right';\n dropdownActionsContext?: Array<MenuItemType<T>>;\n item?: T;\n};\n\n/**\n * Dropdown component\n *\n * @property {ReactNode | ((obj: { open: boolean }) => JSX.Element)} children\n * - The content of the dropdown button. It can be a React component or a function that receives an object\n * with the `open` property to render the dropdown's state.\n *\n * @property {Object[]} [options]\n * - The dropdown options, where each option contains a text and an `onClick` function\n * that is executed when the option is clicked.\n *\n * @property {string} [classButton]\n * - Additional classes for the dropdown button, allowing customization of its appearance.\n *\n * @property {ReactNode[]} [menuItems]\n * - Menu items to be added to the dropdown. These can be React components rendered inside the menu.\n *\n * @property {string} classMenuItems\n * - Additional CSS classes for the container of menu items, allowing for custom styling.\n *\n * @property {'left' | 'right'} openDirection\n * - The direction in which the dropdown menu opens. It can be 'left' or 'right'.\n *\n * @property { Array<MenuItemType<T>>} [dropdownActionsContext]\n * - Additional actions that can be passed to the dropdown menu.\n * Used for extending the menu with more options or functionalities.\n *\n * @property {T} [item]\n * - The current item that may be used within the options or actions of the menu,\n * allowing customization of the dropdown's logic.\n */\n\nconst extractPaddingValues = (className: string) => {\n const pxMatch = className.match(/px-(\\d+(\\.\\d+)?)/);\n const pyMatch = className.match(/py-(\\d+(\\.\\d+)?)/);\n\n const px = pxMatch ? pxMatch[1] : undefined;\n const py = pyMatch ? pyMatch[1] : undefined;\n\n return { px, py };\n};\n\nconst Dropdown = <T,>({\n children,\n options,\n classButton,\n menuItems,\n classMenuItems,\n openDirection,\n dropdownActionsContext,\n item = {} as T,\n}: DropdownProps<T>): JSX.Element => {\n const [isOpen, setIsOpen] = useState(false);\n const direction = openDirection === 'left' ? 'origin-top-left' : 'origin-top-right';\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (e: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('contextmenu', handleClickOutside);\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('contextmenu', handleClickOutside);\n };\n }, []);\n\n const group1: Array<MenuItemType<T>> = options\n ? options.map((option) => ({\n name: option.text,\n action: () => option.onClick(),\n }))\n : [];\n\n const group2: Array<MenuItemType<T>> = menuItems\n ? menuItems.map((menuItem) => ({\n node: menuItem,\n }))\n : [];\n\n const group3: Array<MenuItemType<T>> = dropdownActionsContext || [];\n\n const allItems = [...group1, ...group2, ...group3];\n\n const toggleMenu = () => setIsOpen((prev) => !prev);\n const closeMenu = () => setIsOpen(false);\n\n const { px, py } = extractPaddingValues(classMenuItems);\n\n return (\n <div className=\"relative outline-none min-w-breadcrumb\" ref={containerRef}>\n <button\n className={`cursor-pointer outline-none ${classButton}`}\n onClick={toggleMenu}\n aria-expanded={isOpen}\n aria-haspopup=\"menu\"\n >\n {typeof children === 'function' ? children({ open: isOpen }) : children}\n </button>\n\n <div\n className={`absolute ${openDirection === 'left' ? 'left-0' : 'right-0'} \n transform shadow-subtle-hard transition-all duration-100 ease-in-out ${\n isOpen ? `scale-100 opacity-100 ${direction}` : 'pointer-events-none scale-95 opacity-0'\n }`}\n data-testid=\"menu-dropdown\"\n >\n <div className={`absolute ${classMenuItems}`}>\n <Menu item={item} isOpen={isOpen} handleMenuClose={closeMenu} menu={allItems} paddingX={px} paddingY={py} />\n </div>\n </div>\n </div>\n );\n};\n\nexport default Dropdown;\n","import { DropTargetMonitor, useDrop } from 'react-dnd';\nimport { Dispatch } from 'redux';\nimport { FunctionComponent, SVGProps } from 'react';\n\nexport interface BreadcrumbItemData {\n uuid: string;\n label: string;\n icon: JSX.Element | null;\n active: boolean;\n isFirstPath?: boolean;\n dialog?: boolean;\n isBackup?: boolean;\n onClick?: () => void;\n}\n\nexport interface BreadcrumbsMenuProps {\n item: BreadcrumbItemData;\n items: BreadcrumbItemData[];\n onItemClicked: (item: BreadcrumbItemData) => void;\n}\n\n/**\n * BreadcrumbsItem component\n *\n * @property {BreadcrumbItemData} item\n * - Data representing a single breadcrumb item, including label, icon, and other properties.\n *\n * @property {number} totalBreadcrumbsLength\n * - The total number of breadcrumb items, used for styling the first item and determining when to apply certain styles.\n *\n * @property {boolean} [isHiddenInList]\n * - If true, the breadcrumb is hidden in the list and only shown in a dropdown menu.\n *\n * @property {BreadcrumbItemData[]} items\n * - Array of all breadcrumb items, used for rendering all the breadcrumbs and their separators.\n *\n * @property {string} [breadcrumbButtonDataCy]\n * - Custom `data-cy` attribute applied to the breadcrumb button element.\n *\n * @property {FunctionComponent<BreadcrumbsMenuProps>} [menu]\n * - A custom menu component that can be shown for the breadcrumb item when it's not active or dialog-based.\n *\n * @property {Object[]} namePath\n * - Array of objects representing the path and UUID of the breadcrumb item.\n *\n * @property {boolean} isSomeItemSelected\n * - If true, indicates that at least one breadcrumb item is selected, affecting styling or behavior.\n *\n * @property {any[]} selectedItems\n * - Array of selected breadcrumb items, used to manage selected states and actions.\n *\n * @property {Function} onItemDropped\n * - Callback function that is triggered when a breadcrumb item is dropped.\n *\n * @property {Function} canItemDrop\n * - Determines if a breadcrumb item can be dropped. Used for validation during drag-and-drop operations.\n *\n * @property {FunctionComponent<SVGProps<SVGSVGElement>>} [itemComponent]\n * - Optional custom component for rendering an icon or other visual elements within the breadcrumb item.\n *\n * @property {string[]} acceptedTypes\n * - List of accepted drag-and-drop types for the breadcrumb item.\n *\n * @property {Dispatch} dispatch\n * - The Redux dispatch function for dispatching actions related to the breadcrumb item.\n * @property {Functiodn} useDrop\n * - Hook for dnd.\n */\n\nexport interface BreadcrumbsItemProps<T extends Dispatch, U> {\n item: BreadcrumbItemData;\n totalBreadcrumbsLength: number;\n isHiddenInList?: boolean;\n items: BreadcrumbItemData[];\n breadcrumbButtonDataCy?: string;\n menu?: (props: BreadcrumbsMenuProps) => JSX.Element;\n namePath: {\n name: string;\n uuid: string;\n }[];\n isSomeItemSelected: boolean;\n selectedItems: U[];\n onItemDropped: (\n item: BreadcrumbItemData,\n namePath: {\n name: string;\n uuid: string;\n }[],\n isSomeItemSelected: boolean,\n selectedItems: U[],\n dispatch: T,\n ) => (draggedItem: U, monitor: DropTargetMonitor) => Promise<void>;\n canItemDrop: (item: BreadcrumbItemData) => (draggedItem: U, monitor: DropTargetMonitor<unknown, unknown>) => boolean;\n itemComponent?: FunctionComponent<SVGProps<SVGSVGElement>>;\n acceptedTypes: string[];\n dispatch: T;\n useDrop: typeof useDrop;\n}\n\nconst BreadcrumbsItem = <T extends Dispatch, U>(props: BreadcrumbsItemProps<T, U>): JSX.Element => {\n const [{ isOver, canDrop }, drop] = props.useDrop(\n () => ({\n accept: props.acceptedTypes,\n collect: (monitor) => ({\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop(),\n }),\n canDrop: props.canItemDrop(props.item),\n drop: props.onItemDropped(\n props.item,\n props.namePath,\n props.isSomeItemSelected,\n props.selectedItems,\n props.dispatch,\n ),\n }),\n [props.selectedItems],\n );\n\n const onItemClicked = (item: BreadcrumbItemData): void => {\n if (item.active) {\n item.onClick && item.onClick();\n }\n };\n const isDraggingOverClassNames = isOver && canDrop ? 'drag-over-effect' : '';\n\n return (\n <>\n {!props.item.active && !props.item.dialog && props.menu ? (\n <props.menu item={props.item} items={props.items} onItemClicked={onItemClicked} />\n ) : (\n <div\n ref={drop}\n className={`flex ${props.isHiddenInList ? 'w-full' : 'max-w-fit'} ${\n props.item.isFirstPath ? 'shrink-0 pr-1' : 'min-w-breadcrumb flex-1 px-1.5 py-1.5'\n } cursor-pointer flex-row items-center truncate font-medium ${isDraggingOverClassNames}\n ${\n !props.item.active || (props.item.isFirstPath && props.totalBreadcrumbsLength === 1)\n ? 'text-gray-80'\n : 'text-gray-50 hover:text-gray-80'\n }`}\n key={props.item.uuid}\n onClick={() => onItemClicked(props.item)}\n onKeyDown={() => {}}\n data-cy={props?.breadcrumbButtonDataCy}\n >\n {props.itemComponent && <props.itemComponent className=\"h-5 w-5\" />}\n {props.item.icon ? props.item.icon : null}\n {props.item.label ? (\n <span\n className={`max-w-sm flex-1 cursor-pointer truncate ${props.isHiddenInList && 'pl-3 text-base'}`}\n title={props.item.label}\n >\n {props.item.label}\n </span>\n ) : null}\n </div>\n )}\n </>\n );\n};\n\nexport default BreadcrumbsItem;\n","import { CaretRight, DotsThree } from '@phosphor-icons/react';\nimport { forwardRef, FunctionComponent, ReactNode, SVGProps } from 'react';\nimport { Dispatch } from 'redux';\nimport Dropdown from '../dropdown/Dropdown';\nimport BreadcrumbsItem, { BreadcrumbItemData, BreadcrumbsMenuProps } from './BreadcrumbsItem';\nimport { DropTargetMonitor, useDrop } from 'react-dnd';\n\nexport interface BreadcrumbsProps<T extends Dispatch, U> {\n items: BreadcrumbItemData[];\n rootBreadcrumbItemDataCy?: string;\n menu?: (props: BreadcrumbsMenuProps) => JSX.Element;\n namePath: {\n name: string;\n uuid: string;\n }[];\n isSomeItemSelected: boolean;\n selectedItems: U[];\n onItemDropped: (\n item: BreadcrumbItemData,\n namePath: {\n name: string;\n uuid: string;\n }[],\n isSomeItemSelected: boolean,\n selectedItems: U[],\n dispatch: T,\n ) => (draggedItem: U, monitor: DropTargetMonitor) => Promise<void>;\n canItemDrop: (item: BreadcrumbItemData) => (draggedItem: U, monitor: DropTargetMonitor) => boolean;\n itemComponent?: FunctionComponent<SVGProps<SVGSVGElement>>;\n acceptedTypes: string[];\n dispatch: T;\n useDrop: typeof useDrop;\n}\n\n/**\n * Breadcrumbs component\n *\n * @property {BreadcrumbItemData[]} items\n * - Array of breadcrumb items to be displayed, each containing a label, icon, and other related properties.\n *\n * @property {string} [rootBreadcrumbItemDataCy]\n * - Custom `data-cy` attribute applied to the root breadcrumb item.\n *\n * @property {Function} [menu]\n * - Optional custom menu component for rendering a dropdown menu for breadcrumb items that need additional actions\n * or options.\n *\n * @property {Object[]} namePath\n * - Array of objects representing the path and UUID of the breadcrumb item, used for handling navigation or selection.\n *\n * @property {boolean} isSomeItemSelected\n * - If true, indicates that some breadcrumb items are selected, affecting the display and behavior of the breadcrumbs.\n *\n * @property {any[]} selectedItems\n * - Array of selected breadcrumb items, used to manage the selection state and related actions.\n *\n * @property {Function} onItemDropped\n * - Callback function that is triggered when a breadcrumb item is dropped, used for handling drag-and-drop operations.\n *\n * @property {Function} canItemDrop\n * - Determines if a breadcrumb item can be dropped. Used for validating drop actions in the drag-and-drop interaction.\n *\n * @property {FunctionComponent<SVGProps<SVGSVGElement>>} [itemComponent]\n * - Optional custom component for rendering icons or other visual elements inside each breadcrumb item.\n *\n * @property {string[]} acceptedTypes\n * - Array of accepted drag-and-drop types for breadcrumb items,\n * specifying what types of items can be dragged and dropped.\n *\n * @property {Dispatch} dispatch\n * - The Redux dispatch function for dispatching actions related to the breadcrumb items.\n *\n * @property {Functiodn} useDrop\n * - Hook for dnd.\n */\n\nconst Breadcrumbs = <T extends Dispatch, U>(props: Readonly<BreadcrumbsProps<T, U>>): JSX.Element => {\n const MenuItem = forwardRef<HTMLDivElement, { children: ReactNode }>((props, ref) => {\n return (\n <div\n ref={ref}\n className=\"flex cursor-pointer items-center hover:bg-gray-5 hover:text-gray-80 dark:hover:bg-gray-10\"\n >\n {props.children}\n </div>\n );\n });\n\n const getItemsList = (): JSX.Element[] => {\n const items = props.items;\n const itemsList = [] as JSX.Element[];\n const hiddenItemsList = [] as JSX.Element[];\n const breadcrumbSeparator = (key: React.Key) => {\n return (\n <div key={key} className=\"text-dgray-50 flex items-center\">\n <CaretRight weight=\"bold\" className=\"h-4 w-4\" data-testid=\"caret-right\" />\n </div>\n );\n };\n\n for (let i = 0; i < items.length; i++) {\n const separatorKey = 'breadcrumbSeparator-' + items[i].uuid + i.toString();\n const itemKey = 'breadcrumbItem-' + items[i].uuid + i.toString();\n\n if (items.length > 3 && i !== 0 && i < items.length - 2) {\n if (i === 1) {\n itemsList.push(breadcrumbSeparator(separatorKey));\n }\n hiddenItemsList.push(\n <MenuItem>\n <BreadcrumbsItem\n key={itemKey}\n item={items[i]}\n isHiddenInList\n totalBreadcrumbsLength={items.length}\n items={items}\n namePath={props.namePath}\n isSomeItemSelected={props.isSomeItemSelected}\n selectedItems={props.selectedItems}\n onItemDropped={props.onItemDropped}\n canItemDrop={props.canItemDrop}\n itemComponent={props.itemComponent}\n acceptedTypes={props.acceptedTypes}\n dispatch={props.dispatch}\n useDrop={props.useDrop}\n />\n </MenuItem>,\n );\n } else {\n itemsList.push(\n <BreadcrumbsItem\n breadcrumbButtonDataCy={i === 0 ? props?.rootBreadcrumbItemDataCy : undefined}\n key={itemKey}\n item={items[i]}\n totalBreadcrumbsLength={items.length}\n items={items}\n menu={props.menu}\n namePath={props.namePath}\n isSomeItemSelected={props.isSomeItemSelected}\n selectedItems={props.selectedItems}\n onItemDropped={props.onItemDropped}\n canItemDrop={props.canItemDrop}\n acceptedTypes={props.acceptedTypes}\n dispatch={props.dispatch}\n useDrop={props.useDrop}\n />,\n );\n if (i < items.length - 1) {\n itemsList.push(breadcrumbSeparator(separatorKey));\n }\n }\n }\n\n if (hiddenItemsList.length > 0) {\n const menu = (\n <Dropdown\n key=\"breadcrumbDropdownItems\"\n openDirection=\"left\"\n classMenuItems=\"left-0 top-1 w-max max-h-80 overflow-y-auto\n rounded-md border border-gray-10 bg-surface dark:bg-gray-5 shadow-subtle-hard z-10\"\n menuItems={hiddenItemsList}\n >\n {({ open }: { open: boolean }) => {\n return (\n <div\n className={`flex h-8 w-8 items-center justify-center\n rounded-full text-gray-60 transition-all duration-75 ease-in-out hover:bg-gray-5 hover:text-gray-80 ${\n open ? 'bg-gray-5' : ''\n }`}\n >\n <DotsThree weight=\"bold\" className=\"h-5 w-5\" />\n </div>\n );\n }}\n </Dropdown>\n );\n itemsList.splice(2, 0, menu);\n }\n\n return itemsList;\n };\n\n return <div className=\"flex w-full items-center\">{getItemsList()}</div>;\n};\n\nexport default Breadcrumbs;\n","import { IconProps } from '@phosphor-icons/react';\n\ninterface SidenavItemProps {\n label: string;\n notifications?: number;\n Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;\n onClick?: () => void;\n iconDataCy?: string;\n isActive?: boolean;\n isCollapsed?: boolean;\n subsection?: boolean;\n}\n\nconst SidenavItem = ({\n label,\n Icon,\n onClick,\n notifications,\n iconDataCy,\n isActive = false,\n isCollapsed = false,\n subsection = false,\n}: SidenavItemProps): JSX.Element => {\n return (\n <button\n onClick={onClick}\n data-cy={iconDataCy}\n className={`flex w-full flex-col overflow-hidden focus-visible:bg-gray-10 rounded-lg ${\n isActive ? 'bg-primary/20' : 'hover:bg-gray-5'\n } ${subsection ? 'pl-5' : ''}`}\n title={isCollapsed ? label : undefined}\n >\n <div className=\"flex flex-row px-2.5 py-2 w-full items-center justify-between min-h-[36px]\">\n <div className={`flex flex-row gap-3 items-center ${isActive ? 'text-primary' : 'text-gray-80'}`}>\n <Icon size={20} weight={isActive ? 'fill' : 'regular'} className=\"flex-shrink-0\" />\n <p\n className={`font-medium whitespace-nowrap overflow-hidden transition-all duration-300 ${isCollapsed ? 'opacity-0 delay-200' : 'opacity-100 delay-0'}`}\n >\n {label}\n </p>\n </div>\n <div\n className={`flex rounded-full px-2 py-1 transition-all duration-300 ${isActive ? 'text-white bg-primary' : 'bg-gray-10 text-gray-60'} ${isCollapsed || !notifications ? 'opacity-0 invisible delay-300' : 'opacity-100 delay-0'}`}\n >\n {notifications && <p className=\"text-xs font-medium\">{notifications}</p>}\n </div>\n </div>\n </button>\n );\n};\n\nexport default SidenavItem;\n","import { Icon } from '@phosphor-icons/react';\nimport SidenavItem from './SidenavItem';\n\nexport interface SidenavOption {\n label: string;\n icon: Icon;\n iconDataCy: string;\n isVisible: boolean;\n isActive?: boolean;\n notifications?: number;\n onClick?: () => void;\n subsection?: boolean;\n}\n\ninterface SidenavOptionsProps {\n options: SidenavOption[];\n isCollapsed: boolean;\n showSubsections?: boolean;\n}\n\nconst SidenavOptions = ({ options, isCollapsed, showSubsections }: SidenavOptionsProps): JSX.Element => {\n return (\n <div className=\"flex flex-col w-full\">\n {options\n .filter((option) => option.isVisible)\n .map((option, index) => {\n if (option.subsection && !showSubsections) {\n return null;\n }\n\n if (isCollapsed && option.subsection) {\n return null;\n }\n\n return (\n <SidenavItem\n key={`${option.iconDataCy}-${index}`}\n label={option.label}\n Icon={option.icon}\n iconDataCy={option.iconDataCy}\n isActive={option.isActive}\n notifications={option.notifications}\n onClick={option.onClick}\n isCollapsed={isCollapsed}\n subsection={option.subsection}\n />\n );\n })}\n </div>\n );\n};\n\nexport default SidenavOptions;\n","import { useState, useRef, useEffect } from 'react';\nimport { ReactNode } from 'react';\n\nexport interface PopoverProps {\n childrenButton: ReactNode;\n panel: (closePopover: () => void) => ReactNode;\n className?: string;\n classButton?: string;\n align?: 'left' | 'right';\n}\n\n/**\n * Popover component\n *\n * @property {ReactNode} childrenButton\n * - The content to be displayed inside the trigger button.\n *\n * @property {(closePopover: () => void) => ReactNode} panel\n * - A function that returns the content to be displayed inside the popover panel.\n * It receives a `closePopover` function as a parameter, which can be used to programmatically close the popover.\n *\n * @property {string} [className]\n * - Additional custom classes for the outermost container of the popover.\n * Can be used for positioning or adding custom styles.\n *\n * @property {string} [classButton]\n * - Custom classes for the trigger button.\n *\n * @returns {JSX.Element}\n * - The rendered Popover component.\n */\n\nconst Popover = ({ childrenButton, panel, className, classButton, align = 'right' }: PopoverProps): JSX.Element => {\n const [isOpen, setIsOpen] = useState(false);\n const panelRef = useRef<HTMLDivElement | null>(null);\n const [showContent, setShowContent] = useState(isOpen);\n const [transitionOpacity, setTransitionOpacity] = useState<string>('opacity-0');\n const [transitionScale, setTransitionScale] = useState<string>('scale-95');\n\n const togglePopover = () => setIsOpen((prev) => !prev);\n\n const handleMouseDown = (event: MouseEvent) => {\n if (panelRef.current && !panelRef.current.contains(event.target as Node)) {\n closePopover();\n }\n };\n\n const closePopover = () => {\n setIsOpen(false);\n };\n\n useEffect(() => {\n if (isOpen) {\n const timeout = setTimeout(() => {\n setTransitionOpacity('opacity-100');\n setTransitionScale('scale-100');\n }, 10);\n setShowContent(true);\n return () => clearTimeout(timeout);\n } else {\n setTransitionOpacity('opacity-0');\n setTransitionScale('scale-95');\n const timeout = setTimeout(() => {\n setShowContent(false);\n }, 100);\n return () => clearTimeout(timeout);\n }\n }, [isOpen]);\n\n useEffect(() => {\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, []);\n\n return (\n <div style={{ lineHeight: 0 }} className={`relative ${className}`}>\n <button\n onClick={togglePopover}\n className={`cursor-pointer outline-none ${classButton}`}\n aria-expanded={isOpen}\n data-testid=\"popover-button\"\n >\n {childrenButton}\n </button>\n {showContent && (\n <div\n ref={panelRef}\n className={\n 'absolute z-50 mt-1 transform rounded-md border border-gray-10 ' +\n `${align === 'left' ? 'left-0 origin-top-left' : 'right-0 origin-top-right'} ` +\n `bg-surface py-1.5 shadow-subtle duration-100 ease-out dark:bg-gray-5 ${transitionOpacity} ${transitionScale}`\n }\n >\n {panel(closePopover)}\n </div>\n )}\n </div>\n );\n};\n\nexport default Popover;\n","import { DotsNineIcon, LockIcon } from '@phosphor-icons/react';\nimport { cloneElement, isValidElement } from 'react';\nimport { Popover } from '../../overlay/popover';\n\nexport interface SuiteLauncherProps {\n className?: string;\n suiteArray: {\n icon: JSX.Element;\n title: string;\n onClick: () => void;\n isMain?: boolean;\n availableSoon?: boolean;\n isLocked?: boolean;\n }[];\n soonText?: string;\n align?: 'left' | 'right';\n}\n\n/**\n * SuiteLauncher renders a dropdown menu with a list of suite applications.\n *\n * @param {suiteLauncherProps} props\n * - Object containing properties for the suiteLauncher component.\n *\n * @param {suiteLauncherProps['suiteArray']} props.suiteArray\n * - Array of objects containing the suite applications.\n *\n * @param {string} [props.className]\n * - Optional CSS class name for the suiteLauncher component.\n *\n * @param {string} [props.soonText]\n * - Optional text to display when a suite application is available soon. It should be a translated string. Defaults to \"Soon\".\n *\n * @returns {JSX.Element}\n * - The rendered suiteLauncher component.\n */\nexport default function SuiteLauncher({\n className = '',\n suiteArray,\n soonText,\n align = 'right',\n}: Readonly<SuiteLauncherProps>): JSX.Element {\n const SuiteButton = (\n <div className=\"flex h-10 w-10 items-center justify-center\">\n <DotsNineIcon size={26} className=\"h-7 w-7\" weight=\"bold\" />\n </div>\n );\n\n const panel = (\n <div className=\"w-64 flex flex-wrap p-4\" data-testid=\"suite-launcher-panel\">\n {suiteArray.map((suiteApp, idx) => (\n <div\n key={idx}\n className={`w-1/3 flex items-center justify-center rounded-md ${suiteApp.isMain ? 'bg-primary/10 dark:bg-primary/20' : ''}`}\n >\n <div\n role=\"none\"\n className={\n 'flex items-center p-4 text-gray-80 w-full rounded-md ' +\n `${suiteApp.availableSoon ? '' : 'cursor-pointer hover:bg-gray-1 dark:hover:bg-gray-10'}`\n }\n style={{ lineHeight: 1.25 }}\n onClick={suiteApp.availableSoon ? undefined : suiteApp.onClick}\n >\n <div className=\"flex flex-col items-center w-full rounded-md\">\n {suiteApp.isLocked ? (\n <LockIcon\n size={26}\n weight=\"regular\"\n className=\"opacity-50 filter grayscale\"\n data-testid=\"suite-launcher-lock-icon\"\n />\n ) : isValidElement(suiteApp.icon as JSX.Element) ? (\n cloneElement(suiteApp.icon as JSX.Element, {\n size: 26,\n className:\n `${suiteApp.icon.props?.className ?? ''} ${suiteApp.isMain ? 'text-primary' : 'text-gray-80'} ` +\n `${suiteApp.availableSoon || suiteApp.isLocked ? 'opacity-50 filter grayscale' : ''}`,\n weight: suiteApp.isMain ? 'fill' : 'regular',\n })\n ) : (\n suiteApp.icon\n )}\n\n <div className=\"mt-1 flex items-center\">\n <span\n className={`text-xs font-medium whitespace-nowrap ${suiteApp.isMain ? 'text-primary' : 'text-gray-80'}`}\n style={{ lineHeight: 1, opacity: suiteApp.availableSoon || suiteApp.isLocked ? 0.5 : 1 }}\n >\n {suiteApp.title}\n </span>\n\n {suiteApp.availableSoon && (\n <div className=\"flex rounded-sm px-1 ml-1 py-0.5 bg-purple-1 dark:bg-purple-10 items-center\">\n <span\n className=\"font-medium text-purple-10 dark:text-purple-1\"\n style={{ lineHeight: 1, fontSize: 'xx-small' }}\n >\n {soonText ?? 'Soon'}\n </span>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n ))}\n </div>\n );\n\n return (\n <Popover\n className={className}\n childrenButton={SuiteButton}\n panel={() => panel}\n align={align}\n data-testid=\"app-suite-dropdown\"\n />\n );\n}\n","import { SidebarSimpleIcon } from '@phosphor-icons/react';\nimport { SuiteLauncher } from '../suiteLauncher';\n\ninterface SidenavHeaderProps {\n logo: string;\n title: string;\n onClick: () => void;\n isCollapsed: boolean;\n className?: string;\n onToggleCollapse?: () => void;\n suiteLauncher?: {\n className?: string;\n suiteArray: {\n icon: JSX.Element;\n title: string;\n onClick: () => void;\n isMain?: boolean;\n availableSoon?: boolean;\n isLocked?: boolean;\n }[];\n soonText: string;\n };\n}\n\nconst SidenavHeader = ({\n logo,\n title,\n onClick,\n isCollapsed,\n className,\n onToggleCollapse,\n suiteLauncher,\n}: SidenavHeaderProps): JSX.Element => {\n return (\n <div className={`flex flex-row justify-between w-full py-5 px-2 ${className}`}>\n <div className=\"relative flex flex-row gap-2 items-center\">\n <button className=\"flex flex-row gap-2 items-center\" onClick={onClick}>\n <img\n src={logo}\n width={28}\n height={28}\n alt={title}\n className={`flex-shrink-0 min-w-[28px] min-h-[28px] ${isCollapsed ? 'group-hover:hidden' : ''}`}\n />\n {!isCollapsed && <p className=\"text-xl font-medium text-gray-100 whitespace-nowrap\">{title}</p>}\n </button>\n {isCollapsed && onToggleCollapse && (\n <button\n onClick={onToggleCollapse}\n className=\"hidden group-hover:flex items-center justify-center text-gray-80 absolute left-0\"\n >\n <SidebarSimpleIcon size={28} />\n </button>\n )}\n </div>\n <div\n className={`flex z-20 flex-row gap-2 items-center transition-opacity duration-100 ${isCollapsed ? 'opacity-0 invisible' : 'opacity-100'}`}\n >\n {suiteLauncher && (\n <SuiteLauncher\n suiteArray={suiteLauncher?.suiteArray}\n soonText={suiteLauncher?.soonText}\n className={`text-gray-80 ${suiteLauncher?.className}`}\n align=\"left\"\n />\n )}\n {onToggleCollapse && (\n <button\n onClick={onToggleCollapse}\n className=\"flex items-center justify-center text-gray-80 hover:text-gray-90\"\n >\n <SidebarSimpleIcon size={28} />\n </button>\n )}\n </div>\n </div>\n );\n};\n\nexport default SidenavHeader;\n","import Skeleton from '../../feedback/skeleton/Skeleton';\nimport { SidenavStorageProps } from './Sidenav';\n\nconst SidenavStorage = ({\n usage,\n limit,\n percentage,\n onUpgradeClick,\n upgradeLabel,\n isLoading = false,\n barClassName = 'bg-gray-60',\n containerClassName,\n advertisement,\n}: SidenavStorageProps): JSX.Element => (\n <div className={`flex flex-col w-full gap-2.5 p-3${containerClassName ? ` ${containerClassName}` : ''}`}>\n {advertisement}\n <div className=\"flex flex-row w-full justify-between\">\n <div className=\"flex flex-row items-center gap-2\">\n {isLoading ? (\n <Skeleton />\n ) : (\n <>\n <p className=\"text-gray-60 text-sm font-semibold\">{usage}</p>\n <p className=\"text-gray-60 text-sm\">/</p>\n <p className=\"text-gray-60 text-sm\">{limit}</p>\n </>\n )}\n </div>\n {upgradeLabel && (\n <button className=\"text-primary text-sm hover:text-primary-dark font-semibold\" onClick={onUpgradeClick}>\n {upgradeLabel}\n </button>\n )}\n </div>\n <div className=\"flex w-full h-1.5 bg-gray-10 rounded-full\">\n <div\n className={`${barClassName} rounded-full`}\n style={{\n width: `${percentage}%`,\n }}\n />\n </div>\n </div>\n);\n\nexport default SidenavStorage;\n","import { ReactNode, useEffect, useRef, useState } from 'react';\nimport { WarningIcon } from '@phosphor-icons/react';\nimport SidenavOptions, { SidenavOption } from './SidenavOptions';\nimport SidenavHeader from './SidenavHeader';\nimport SidenavStorage from './SidenavStorage';\n\nexport interface SidenavHeaderProps {\n logo: string;\n title: string;\n onClick: () => void;\n className?: string;\n}\n\nexport interface SidenavStorageProps {\n usage: string;\n limit: string;\n percentage: number;\n onUpgradeClick: () => void;\n upgradeLabel?: string;\n isLoading?: boolean;\n barClassName?: string;\n containerClassName?: string;\n advertisement?: ReactNode;\n}\n\nexport interface SidenavProps {\n header: SidenavHeaderProps;\n primaryAction?: ReactNode;\n suiteLauncher?: {\n className?: string;\n suiteArray: {\n icon: JSX.Element;\n title: string;\n onClick: () => void;\n isMain?: boolean;\n availableSoon?: boolean;\n isLocked?: boolean;\n }[];\n soonText: string;\n };\n collapsedPrimaryAction?: ReactNode;\n options: SidenavOption[];\n showSubsections?: boolean;\n isCollapsed?: boolean;\n storage?: SidenavStorageProps;\n notification?: {\n message: string;\n actionLabel: string;\n onAction: () => void;\n type?: 'warning';\n };\n onToggleCollapse?: () => void;\n}\n\n/**\n * Sidenav component\n *\n * A custom sidenav component that provides a sidebar with options for navigation and interaction.\n *\n * @property {SidenavHeader} header - Header configuration with logo, title, and onClick handler\n * @property {ReactNode} primaryAction - The primary action displayed at the top of the sidenav\n * @property {object} suiteLauncher - The suite launcher configuration\n * @property {ReactNode} collapsedPrimaryAction - The primary action displayed when the sidenav is collapsed\n * @property {SidenavOption[]} options - An array of options to be displayed in the sidenav. Each option can specify an 'as' prop to use a custom component (e.g., NavLink)\n * @property {boolean} showSubsections - Determines whether to display the subsections of the sidenav\n * @property {boolean} isCollapsed - Determines whether the sidenav is collapsed or not\n * @property {SidenavStorage} storage - The storage information displayed at the bottom of the sidenav\n * @property {object} notification - Optional structured notification rendered above the storage section (hidden when collapsed). Accepts message, actionLabel, onAction, and an optional type ('warning').\n * @property {() => void} onToggleCollapse - A callback function triggered when the collapse button is clicked\n */\nconst Sidenav = ({\n header,\n primaryAction,\n suiteLauncher,\n collapsedPrimaryAction,\n options,\n showSubsections,\n isCollapsed = false,\n storage,\n notification,\n onToggleCollapse,\n}: SidenavProps) => {\n const [showContent, setShowContent] = useState(!isCollapsed);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n if (timerRef.current) clearTimeout(timerRef.current);\n if (isCollapsed) {\n setShowContent(false);\n } else {\n timerRef.current = setTimeout(() => setShowContent(true), 300);\n }\n return () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n };\n }, [isCollapsed]);\n\n return (\n <div\n className={`relative flex flex-col p-2 h-full justify-between bg-gray-1 border-r border-gray-10 transition-all duration-300 group ${\n isCollapsed ? 'w-[60px]' : 'w-64'\n }`}\n >\n <div className=\"flex flex-col\">\n <SidenavHeader\n logo={header.logo}\n title={header.title}\n onClick={header.onClick}\n isCollapsed={isCollapsed}\n onToggleCollapse={onToggleCollapse}\n suiteLauncher={suiteLauncher}\n className={header.className}\n />\n\n <div className=\"flex flex-col gap-4 overflow-hidden\">\n <div className=\"relative\">\n {!isCollapsed && <div className=\"transition-opacity duration-300 opacity-100\">{primaryAction}</div>}\n {isCollapsed && <div className=\"transition-opacity duration-300 opacity-100\">{collapsedPrimaryAction}</div>}\n </div>\n <SidenavOptions options={options} isCollapsed={isCollapsed} showSubsections={showSubsections} />\n </div>\n </div>\n\n {(notification || storage) && showContent && (\n <div className=\"flex flex-col\">\n {notification && (\n <div className=\"px-2 pb-2\">\n <div className=\"flex gap-1.5 items-start p-3 rounded-lg bg-yellow/10 border border-yellow/20\">\n <WarningIcon className=\"size-5 shrink-0 text-yellow-dark\" weight=\"fill\" />\n <div className=\"flex flex-col gap-0.5 min-w-0\">\n <p className=\"text-xs leading-tight text-gray-100\">{notification.message}</p>\n <button\n type=\"button\"\n onClick={notification.onAction}\n className=\"self-start text-xs font-medium text-primary hover:underline\"\n >\n {notification.actionLabel}\n </button>\n </div>\n </div>\n </div>\n )}\n {storage && (\n <SidenavStorage\n usage={storage.usage}\n limit={storage.limit}\n percentage={storage.percentage}\n onUpgradeClick={storage.onUpgradeClick}\n upgradeLabel={storage.upgradeLabel}\n isLoading={storage.isLoading}\n barClassName={storage.barClassName}\n containerClassName={storage.containerClassName}\n advertisement={storage.advertisement}\n />\n )}\n </div>\n )}\n </div>\n );\n};\n\nexport default Sidenav;\n","import { IconWeight, X } from '@phosphor-icons/react';\n\nexport interface BaseDialogProps {\n isOpen: boolean;\n title?: string;\n hideCloseButton?: boolean;\n subTitle?: string;\n dialogRounded?: boolean;\n children: JSX.Element | JSX.Element[];\n classes?: string;\n titleClasses?: string;\n panelClasses?: string;\n closeClass?: string;\n weightIcon?: IconWeight;\n bgColor?: string;\n onClose: () => void;\n dataTest?: string;\n}\n\n/**\n * BaseDialog component\n *\n * @property {boolean} isOpen\n * - Controls whether the dialog is open or closed. If true, the dialog is visible.\n *\n * @property {string} [title]\n * - The title of the dialog, displayed at the top of the dialog box.\n *\n * @property {boolean} [hideCloseButton]\n * - If true, hides the close button (X icon) in the top right corner of the dialog.\n *\n * @property {string} [subTitle]\n * - A subtitle for the dialog, displayed below the title.\n *\n * @property {boolean} [dialogRounded]\n * - If true, applies a more rounded corner style to the dialog.\n *\n * @property {JSX.Element | JSX.Element[]} children\n * - The content to be displayed inside the dialog. Can be a single JSX element or an array of elements.\n *\n * @property {string} [classes]\n * - Custom classes for the outermost container of the dialog. Allows additional styling like margins or padding.\n *\n * @property {string} [titleClasses]\n * - Custom classes for styling the title element. Can modify font size, weight, etc.\n *\n * @property {string} [panelClasses]\n * - Custom classes for the main dialog panel, where the content is displayed.\n *\n * @property {string} [closeClass]\n * - Custom classes for the close button, allowing for customization of the button's appearance.\n *\n * @property {IconWeight} [weightIcon]\n * - Controls the thickness of the close button icon (X). Options range from \"thin\" to \"bold\".\n *\n * @property {string} [bgColor]\n * - Custom background color for the dialog. Defaults to a light surface color if not provided.\n *\n * @property {() => void} onClose\n * - Callback function triggered when the close button or overlay is clicked, used to close the dialog.\n */\n\nconst BaseDialog = ({\n isOpen,\n title,\n subTitle,\n dialogRounded,\n children,\n onClose,\n classes,\n panelClasses,\n titleClasses,\n closeClass,\n weightIcon,\n bgColor,\n dataTest,\n hideCloseButton,\n}: BaseDialogProps): JSX.Element => {\n return (\n <div\n data-test={dataTest}\n className={`${isOpen ? 'flex' : 'hidden'} ${\n classes || ''\n } absolute bottom-0 left-0 right-0 top-0 z-50 bg-black/40`}\n >\n <div\n className={`${panelClasses || ''} absolute left-1/2 top-1/2 flex w-104 -translate-x-1/2\n -translate-y-1/2 flex-col overflow-hidden ${dialogRounded ? 'rounded-2xl' : 'rounded-lg pt-8'} text-gray-100 ${\n bgColor || 'bg-surface'\n }`}\n >\n <div className={`${subTitle ? 'justify-between bg-gray-1' : ''} p-5 flex flex-row items-start`}>\n {title ? (\n <div className=\"relative flex max-w-full flex-1 flex-col truncate\">\n <span className={`${titleClasses || ''} truncate text-xl`} title={title}>\n {title}\n </span>\n <span className=\"max-w-fit flex-1 truncate text-base font-normal text-gray-50\">{subTitle}</span>\n </div>\n ) : null}\n {hideCloseButton ? null : (\n <div\n className={`relative ml-auto cursor-pointer bg-surface\n transition duration-200 ease-in-out ${closeClass || 'text-primary hover:text-primary-dark'} `}\n >\n <X role=\"button\" onClick={onClose} size={28} weight={weightIcon} />\n </div>\n )}\n </div>\n {children}\n </div>\n </div>\n );\n};\n\nexport default BaseDialog;\n","import { useEffect } from 'react';\nimport { useState } from 'react';\nimport { Button } from '../../input/button';\n\nexport interface DialogProps {\n isOpen: boolean;\n onClose: () => void;\n onPrimaryAction: () => void;\n onSecondaryAction: () => void;\n title: string;\n subtitle: string;\n primaryAction: string | JSX.Element;\n secondaryAction: string | JSX.Element;\n primaryActionColor: 'primary' | 'danger';\n isLoading?: boolean;\n maxWidth?: 'sm' | 'md' | 'lg';\n}\n\n/**\n * Dialog component\n *\n * @property {boolean} isOpen\n * - Controls whether the dialog is open or closed. If true, the dialog becomes visible.\n *\n * @property {() => void} onClose\n * - Callback function triggered when the overlay or the close button is clicked. Used to close the dialog.\n *\n * @property {() => void} onPrimaryAction\n * - Callback function triggered when the primary action button is clicked.\n *\n * @property {() => void} onSecondaryAction\n * - Callback function triggered when the secondary action button is clicked.\n *\n * @property {string} title\n * - The title of the dialog, displayed at the top of the dialog box.\n *\n * @property {string} subtitle\n * - A subtitle for the dialog, displayed below the title.\n *\n * @property {string | JSX.Element} primaryAction\n * - The label or content for the primary action button.\n *\n * @property {string} secondaryAction\n * - The label or content for the secondary action button.\n *\n * @property {('primary' | 'danger')} primaryActionColor\n * - Defines the color of the primary action button. Can either be 'primary' or 'danger'.\n *\n * @property {boolean} [isLoading]\n * - Optional flag to indicate if the buttons should show a loading state. Defaults to false.\n *\n * @property {'sm' | 'md' | 'lg'} [maxWidth]\n * - Optional maximum width for the dialog. Can be 'sm', 'md', or 'lg'.\n *\n * @returns {JSX.Element}\n * - The rendered dialog component.\n */\n\nconst Dialog = ({\n isOpen,\n onClose,\n onPrimaryAction,\n onSecondaryAction,\n title,\n subtitle,\n primaryAction,\n secondaryAction,\n primaryActionColor,\n isLoading,\n maxWidth = 'sm',\n}: DialogProps): JSX.Element => {\n const [isVisible, setIsVisible] = useState(isOpen);\n const [transitionOpacity, setTransitionOpacity] = useState<string>('opacity-0');\n const [transitionScale, setTransitionScale] = useState<string>('scale-95');\n\n useEffect(() => {\n if (isOpen) {\n const timeout = setTimeout(() => {\n setTransitionOpacity('opacity-100');\n setTransitionScale('scale-100');\n }, 10);\n setIsVisible(true);\n return () => clearTimeout(timeout);\n } else {\n setTransitionOpacity('opacity-0');\n setTransitionScale('scale-95');\n const timeout = setTimeout(() => {\n setIsVisible(false);\n }, 150);\n return () => clearTimeout(timeout);\n }\n }, [isOpen]);\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n onClose();\n }\n };\n\n if (isOpen) {\n window.addEventListener('keydown', handleKeyDown);\n }\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [isOpen, onClose]);\n\n return (\n <>\n {isVisible && (\n <div className={`fixed inset-0 z-50 ${isOpen ? '' : 'pointer-events-none'}`}>\n <div\n className={\n `absolute inset-0 bg-gray-100/50 transition-opacity duration-150 ` +\n `dark:bg-black/75 ${transitionOpacity}`\n }\n onClick={onClose}\n data-testid=\"dialog-overlay\"\n ></div>\n\n <div\n className={\n `absolute left-1/2 top-1/2 w-full max-w-${maxWidth} -translate-x-1/2 -translate-y-1/2 transform ` +\n `rounded-2xl bg-surface p-5 transition-all duration-150 dark:bg-gray-1 ${transitionScale} ${transitionOpacity}`\n }\n >\n <div className=\"flex flex-col space-y-2\">\n <p className=\"text-2xl font-medium text-gray-100\">{title}</p>\n <p className=\"text-gray-60\">{subtitle}</p>\n </div>\n\n <div className=\"mt-5 flex justify-end space-x-2\">\n <Button variant=\"secondary\" onClick={onSecondaryAction} disabled={isLoading}>\n {secondaryAction}\n </Button>\n <Button\n onClick={onPrimaryAction}\n loading={isLoading}\n variant={primaryActionColor === 'primary' ? 'primary' : 'destructive'}\n >\n {primaryAction}\n </Button>\n </div>\n </div>\n </div>\n )}\n </>\n );\n};\n\nexport default Dialog;\n","import { ReactNode, useEffect, useRef, useState } from 'react';\n\nexport interface ModalProps {\n isOpen: boolean;\n onClose: () => void;\n children: ReactNode;\n maxWidth?: string;\n className?: string;\n width?: string;\n preventClosing?: boolean;\n stopMouseDownPropagation?: boolean;\n}\n\n/**\n * Modal component\n *\n * @param {ModalProps} props - Properties of the Modal component.\n *\n * @property {boolean} isOpen\n * - Controls the visibility of the modal. If `true`, the modal is shown; if `false`, the modal is hidden.\n *\n * @property {() => void} onClose\n * - Callback function that is called when the modal is closed.\n * This function is triggered by clicking outside the modal or\n * pressing the 'Escape' key (unless `preventClosing` is `true`).\n *\n * @property {ReactNode} children\n * - The content to be displayed inside the modal.\n *\n * @property {string} [maxWidth]\n * - Optional maximum width for the modal. Defaults to `'max-w-lg'` if not specified.\n *\n * @property {string} [className]\n * - Optional custom class names to apply to the modal content wrapper.\n *\n * @property {string} [width]\n * - Optional width for the modal. Defaults to `'w-full'` if not specified.\n *\n * @property {boolean} [preventClosing=false]\n * - Optional flag to prevent the modal from closing when clicking outside or pressing the 'Escape' key.\n *\n * @property {boolean} [stopMouseDownPropagation=false]\n * - Optional flag to stop event propagation on mousedown events.\n *\n * @returns {JSX.Element | null}\n * - The rendered Modal component, or `null` if `isOpen` is `false`.\n *\n * The component uses a series of hooks and effects to manage modal transitions and handle click and key press events.\n * It supports smooth opacity and scale transitions during opening and closing,\n * and prevents interaction with the modal's background during the transitions.\n *\n * The `preventClosing` prop ensures the modal stays open when interacting outside of the modal or pressing 'Escape'.\n *\n * The modal is displayed with a fixed position in the center of the screen, with a backdrop overlay.\n * The content of the modal is rendered inside a flex container with transition effects to animate its appearance.\n */\n\nconst Modal = ({\n isOpen,\n onClose,\n children,\n maxWidth,\n className,\n width,\n preventClosing = false,\n stopMouseDownPropagation = false,\n}: ModalProps): JSX.Element | null => {\n const modalRef = useRef<HTMLDivElement | null>(null);\n const [showContent, setShowContent] = useState(isOpen);\n const [transitionOpacity, setTransitionOpacity] = useState<string>('opacity-0');\n const [transitionScale, setTransitionScale] = useState<string>('scale-95');\n\n const closeLastOpenModal = () => {\n const openModals = document.querySelectorAll('[data-modal]');\n const lastModal = openModals[openModals.length - 1];\n if (modalRef.current === lastModal) {\n onClose();\n }\n };\n\n const handleMouseDown = (e: React.MouseEvent) => {\n if (stopMouseDownPropagation) {\n e.stopPropagation();\n }\n };\n\n useEffect(() => {\n if (isOpen) {\n const timeout = setTimeout(() => {\n setTransitionOpacity('opacity-100');\n setTransitionScale('scale-100');\n }, 10);\n setShowContent(true);\n return () => clearTimeout(timeout);\n } else {\n setTransitionOpacity('opacity-0');\n setTransitionScale('scale-95');\n const timeout = setTimeout(() => {\n setShowContent(false);\n }, 150);\n return () => clearTimeout(timeout);\n }\n }, [isOpen]);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node) && !preventClosing) {\n event.preventDefault();\n closeLastOpenModal();\n }\n };\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isOpen, onClose, preventClosing]);\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && !preventClosing) {\n event.preventDefault();\n closeLastOpenModal();\n }\n };\n\n if (isOpen) {\n window.addEventListener('keydown', handleKeyDown);\n }\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [isOpen, onClose, preventClosing]);\n\n return (\n <>\n {showContent && (\n <div className=\"m-0\" onMouseDown={handleMouseDown} role=\"dialog\" aria-modal=\"true\">\n <div\n className={`\n fixed\n min-h-full\n inset-0\n z-[9999]\n bg-highlight/40\n transition-opacity\n duration-150\n ease-out\n ${transitionOpacity}\n pointer-events-none \n `}\n />\n <div\n className={`\n fixed\n inset-0\n z-[9999]\n flex\n min-h-full\n items-center\n justify-center\n transition-opacity\n duration-150\n ease-out\n overflow-y-auto\n ${transitionOpacity}\n ${transitionScale}\n `}\n >\n <section\n data-testid={'ModalContent'}\n ref={modalRef}\n data-modal\n className={`\n ${width ?? 'w-full'}\n ${maxWidth ?? 'max-w-lg'}\n ${className ?? 'p-5'}\n text-gray-100\n rounded-2xl\n bg-surface\n shadow-subtle-hard\n transform\n transition-all\n duration-150\n ease-out\n ${transitionOpacity}\n ${transitionScale}\n `}\n >\n {children}\n </section>\n </div>\n </div>\n )}\n </>\n );\n};\n\nexport default Modal;\n","import { ReactNode, useEffect, useRef, useState } from 'react';\n\nexport interface TransparentModalProps {\n isOpen: boolean;\n onClose: () => void;\n children: ReactNode;\n className?: string;\n disableBackdrop?: boolean;\n}\n\nconst TransparentModal = ({ isOpen, onClose, children, className, disableBackdrop = false }: TransparentModalProps) => {\n const modalRef = useRef<HTMLDivElement>(null);\n const [showContent, setShowContent] = useState(isOpen);\n const [transitionOpacity, setTransitionOpacity] = useState('opacity-0');\n const [transitionScale, setTransitionScale] = useState('scale-95');\n\n useEffect(() => {\n if (isOpen) {\n setShowContent(true);\n const timeout = setTimeout(() => {\n setTransitionOpacity('opacity-100');\n setTransitionScale('scale-100');\n }, 10);\n return () => clearTimeout(timeout);\n } else {\n setTransitionOpacity('opacity-0');\n setTransitionScale('scale-95');\n const timeout = setTimeout(() => {\n setShowContent(false);\n }, 150);\n return () => clearTimeout(timeout);\n }\n }, [isOpen]);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (modalRef.current && !modalRef.current.contains(event.target as Node)) {\n onClose();\n }\n };\n\n if (isOpen && !disableBackdrop) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isOpen, onClose, disableBackdrop]);\n\n if (!showContent) return null;\n\n return (\n <div\n className={`\n fixed \n inset-0 \n z-50 \n flex \n items-center \n justify-center\n ${disableBackdrop ? 'pointer-events-none' : ''}\n `}\n >\n {/* Backdrop */}\n {!disableBackdrop && (\n <div\n className={`\n fixed \n inset-0 \n bg-black/50 \n backdrop-blur-sm \n transition-opacity \n duration-200\n ${transitionOpacity}\n `}\n />\n )}\n\n {/* Modal */}\n <div\n ref={modalRef}\n className={`\n relative\n flex\n bg-black/15\n border\n border-white/15\n rounded-[20px]\n backdrop-blur\n shadow-lg\n transition-all\n duration-200\n pointer-events-auto\n ${transitionOpacity}\n ${transitionScale}\n ${className}\n `}\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport default TransparentModal;\n","const MessageCheapSkeleton = () => (\n <div className={'flex flex-col text-left gap-2 w-full py-3 px-5 border-b border-gray-5'}>\n <div className=\"flex flex-row w-full gap-2\">\n {/* Avatar */}\n <div className=\"flex flex-col h-7 w-8 rounded-full animate-pulse bg-gray-10\" />\n <div className=\"flex flex-col gap-1 w-full\">\n {/* Name and date */}\n <div className={'flex flex-row w-full justify-between'}>\n <div className=\"flex rounded-md w-1/3 h-3 bg-gray-10 animate-pulse\" />\n <div className=\"flex rounded-md w-1/4 h-3 bg-gray-10 animate-pulse\" />\n </div>\n {/* Subject */}\n <div className=\"flex rounded-md w-1/2 h-3 bg-gray-10 animate-pulse\" />\n {/* Body */}\n <div className=\"flex rounded-md w-full h-3 bg-gray-10 animate-pulse\" />\n </div>\n </div>\n </div>\n);\n\nexport default MessageCheapSkeleton;\n","import { Avatar } from '@/components/avatar';\n\nexport interface MessageCheapProps {\n email: {\n id: string;\n from: {\n name: string;\n avatar: string;\n };\n subject: string;\n createdAt: string;\n body: string;\n read: boolean;\n };\n active?: boolean;\n selected?: boolean;\n onClick: (id: string, isRead?: boolean) => void;\n}\n\nconst MessageCheap = ({ email, active, selected, onClick }: MessageCheapProps) => {\n const isHighlighted = active || selected;\n\n return (\n <button\n onClick={() => onClick(email.id, email.read)}\n className={`flex flex-col border-b border-gray-10 text-left gap-2 w-full py-3 px-5 ${isHighlighted ? 'bg-primary/10' : ''}`}\n >\n <div className=\"flex flex-row w-full gap-2\">\n <Avatar fullName={email.from.name} src={email.from.avatar} size={'xxs'} />\n <div className=\"flex flex-col w-full\">\n <div className={`flex flex-row w-full justify-between ${isHighlighted ? 'text-primary' : ''}`}>\n <div className=\"flex flex-row gap-1 w-full max-w-[150px] items-center\">\n {!email.read && <div className=\"h-2 w-2 rounded-full bg-primary\" />}\n <p className=\"font-semibold truncate\">{email.from.name}</p>\n </div>\n <div>\n <p className={`text-sm font-medium ${isHighlighted ? 'text-primary' : 'text-gray-50'}`}>\n {email.createdAt}\n </p>\n </div>\n </div>\n <p className={`text-sm font-semibold ${isHighlighted ? 'text-primary' : ''}`}>{email.subject}</p>\n <p className={`text-sm ${isHighlighted ? 'text-primary/80' : 'text-gray-50'}`}>{email.body}</p>\n </div>\n </div>\n </button>\n );\n};\n\nexport default MessageCheap;\n","import { InfiniteScroll } from '@/components/infiniteScroll';\nimport MessageCheapSkeleton from '../cheaps/MessageCheapSkeleton';\nimport MessageCheap from '../cheaps/MessageCheap';\nimport { ReactNode } from 'react';\n\nexport interface TrayListProps {\n mails: {\n id: string;\n from: {\n name: string;\n avatar: string;\n };\n subject: string;\n createdAt: string;\n body: string;\n read: boolean;\n }[];\n selectedEmails?: string[];\n loading: boolean;\n checked?: boolean;\n activeEmail?: string;\n hasMoreItems?: boolean;\n emptyState?: ReactNode;\n onMailSelected?: (id: string, isRead?: boolean) => void;\n onLoadMore?: () => void;\n}\n\n/**\n *\n * @param {TrayListProps} TrayListProps - Props for the TrayList component\n * @prop {Array} TrayListProps.mails - An array of email objects\n *\n * @prop {string[]} TrayListProps.selectedEmails - An array of selected email IDs\n *\n * @prop {boolean} TrayListProps.loading - A boolean indicating loading state\n *\n * @prop {boolean} TrayListProps.checked - A boolean indicating whether all emails are checked\n *\n * @prop {string} TrayListProps.activeEmail - The ID of the currently active email\n *\n * @prop {boolean} TrayListProps.hasMoreItems - A boolean indicating whether there are more items to load\n *\n * @prop {ReactNode} TrayListProps.emptyState - A JSX element to display when there are no emails\n *\n * @prop {(id: string) => void} TrayListProps.onMailSelected - A function to handle email selection\n *\n * @prop {() => void} TrayListProps.onLoadMore - A function to load more emails\n *\n * @returns {JSX.Element} The rendered TrayList component\n */\n\nconst TrayList = ({\n mails,\n selectedEmails = [],\n loading,\n checked,\n activeEmail,\n hasMoreItems = false,\n emptyState,\n onMailSelected = () => {},\n onLoadMore = () => {},\n}: TrayListProps) => {\n const loader = (\n <div className=\"flex flex-col\">\n {new Array(3).fill(0).map((_, index) => (\n <MessageCheapSkeleton key={index} />\n ))}\n </div>\n );\n\n return (\n <div className=\"flex flex-col w-[400px] min-w-[200px] max-w-[400px] h-full\">\n <div id=\"tray-scroll-container\" className=\"overflow-y-auto w-full h-full min-h-0\">\n {loading ? (\n <>\n {new Array(8).fill(0).map((_, index) => (\n <div key={index} className=\"flex flex-col gap-2\">\n <MessageCheapSkeleton />\n </div>\n ))}\n </>\n ) : (\n <>\n {mails.length === 0 ? (\n <>{emptyState}</>\n ) : (\n <InfiniteScroll\n handleNextPage={onLoadMore}\n hasMoreItems={hasMoreItems}\n loader={loader}\n scrollableTarget=\"tray-scroll-container\"\n >\n {mails.map((email) => (\n <div key={email.id} className=\"flex items-center w-full flex-col\">\n <MessageCheap\n email={email}\n active={activeEmail === email.id}\n selected={checked || selectedEmails.includes(email.id)}\n onClick={onMailSelected}\n />\n </div>\n ))}\n </InfiniteScroll>\n )}\n </>\n )}\n </div>\n </div>\n );\n};\n\nexport default TrayList;\n","import { Avatar } from '@/components/avatar';\n\ninterface UserCheapProps {\n fullName: string;\n email: string;\n avatar?: string;\n}\n\n/**\n * A cheap user component to render a user's information.\n *\n * @param {UserCheapProps} props - The props object.\n * @param {string} props.fullName - The user's full name.\n * @param {string} props.email - The user's email address.\n * @param {string} [props.avatar] - The user's avatar URL. If not provided, the avatar will be generated from the user's name.\n */\nconst UserCheap = ({ fullName, email, avatar }: UserCheapProps) => (\n <div className=\"flex flex-row gap-2 border max-w-64 bg-surface w-full border-gray-10 shadow-subtle rounded-lg\">\n <div className=\"flex flex-row w-full gap-2 p-4\">\n <Avatar src={avatar} fullName={fullName} diameter={40} />\n <div className=\"flex flex-col min-w-0\">\n <p className=\"font-medium text-gray-100 truncate\">{fullName}</p>\n <p className=\"text-sm text-gray-50 truncate\">{email}</p>\n </div>\n </div>\n </div>\n);\n\nexport default UserCheap;\n"],"names":["DefaultAvatar","fullName","diameter","className","initials","nameToInitials","jsx","trimmedName","namesArray","first","second","PictureAvatar","src","style","SIZES","Avatar","size","diameterValue","Card","children","useHotkeys","keyMap","dependencies","handleKeyDown","event","keyCombination","useEffect","Menu","item","menu","isOpen","genericEnterKey","handleMenuClose","paddingX","paddingY","selectedIndex","setSelectedIndex","useState","enterPressed","setEnterPressed","handleMouseEnter","index","isUnClickableItem","menuItem","handleArrowDown","prevIndex","getNextEnabledIndex","startIndex","newIndex","newCurrentIndex","handleArrowUp","getPreviousEnabledIndex","handleEnterKey","isValidElement","onClick","option","i","e","jsxs","MENU_BUTTON_HEIGHT","ContextMenu","menuItemsRef","openedFromRightClick","posX","posY","isContextMenuCutOff","SvgCheck","props","React","SvgMinus","Checkbox","id","checked","indeterminate","required","checkboxDataCy","disabled","Minus","Check","TOP_MIN_HEIGHT","ListItem","listIndex","itemComposition","selected","columnsWidth","onClose","onSelectedChanged","onDoubleClick","onClickContextMenu","onThreeDotsButtonPressed","disableItemCompositionStyles","onMouseEnter","onMouseLeave","menuButtonRef","useRef","rootWrapperRef","setOpenedFromRightClick","setPosX","setPosY","dimensions","setDimensions","setIsContextMenuCutOff","handleOpenPosition","element","contextMenuHeight","bottom","windowHeight","isContextCutOff","handleContextMenuClick","childWidth","childHeight","wrapperRect","innerWidth","innerHeight","x","y","handleContextMenuDotsButton","handleClick","_col","DotsThree","ListHeader","selectedItems","onTopSelectionCheckboxClick","items","header","orderBy","onOrderableColumnClicked","displayMenuDiv","isVerticalScrollbarVisible","column","ArrowUp","ArrowDown","SkeletonLoaderItem","skeletonItem","columns","col","SkeletonLoader","skeleton","Fragment","InfiniteScroll","handleNextPage","hasMoreItems","loader","scrollableTarget","classNameLoader","loaderRef","scrollContainerRef","showLoader","setShowLoader","observer","entry","currentLoaderRef","childrenWithLoader","child","List","onEnterPressed","onSelectedItemsChanged","isLoading","forceLoading","skinSkeleton","emptyState","onOrderByChanged","onNextPage","headerBackgroundColor","keyBoardShortcutActions","disableKeyboardShortcuts","containerRef","isItemSelected","container","isEmptyState","idItemContextMenuOpen","setIdItemContextMenuOpen","skeletonData","handleClickOutside","unselectAllItems","changesToMake","unselectAllItemsAndSelectOne","executeClickOnSelectedItem","selectedItem","selectAllItems","s","field","onCloseContextMenu","columnWasAlreadySelected","handleKeyPress","action","handleRKeyPressed","handleBackspaceKeyPressed","onItemClick","itemClicked","onRightItemClick","handleThreeDotsButtonClick","prevId","value","Table","TableHeader","TableBody","TableRow","TableCell","isHeader","Component","Loader","classNameContainer","classNameText","type","text","isSpinner","Button","variant","onKeyDown","loading","dataTest","autofocus","buttonDataCy","buttonChildrenDataCy","styles","Empty","icon","title","subtitle","contextMenuClick","button","SkeletonItem","Skeleton","UsageWarningBanner","description","usage","limit","percentage","upgradeLabel","closeButtonLabel","onUpgradeClick","onCloseButtonClick","barClassName","CloudWarningIcon","XIcon","CircleButton","active","onClickToggleButton","dropdown","indicator","handleOpen","handleClose","target","circleButton","handleToggle","handleMainClick","getButtonStyles","renderIndicator","Warning","renderDropdownButton","CaretUp","Tooltip","popsFrom","delayInMs","arrow","visible","setVisible","timeoutRef","show","hide","handleMouseLeave","tooltipPosition","trianglePosition","triangle","Copyable","classText","copiedText","copyToClipboardText","justCopied","setJustCopied","onCopy","Copy","Input","label","accent","placeholder","maxLength","onChange","onClear","message","onFocus","onBlur","autoComplete","name","labelDataCy","inputDataCy","inputClassName","borderRadius","fontClasses","inputRef","focusInput","focusColor","borderColor","placeholderColor","padding","showPassword","setShowPassword","isFocused","setIsFocused","input","Eye","EyeSlash","MagnifyingGlass","X","messageColor","MessageIcon","CheckCircle","WarningOctagon","RadioButton","borderStyle","checkedStyle","RangeSlider","min","max","step","ariaLabel","sliderBackground","SwitchComponent","dataTestId","onCheckedChange","setChecked","handleCheckedChange","newChecked","backgroundColor","sizeClasses","thumbSizeClasses","checkedTranslation","TextArea","accentColor","Header","leftContent","rightContent","Grid","dataCy","extractPaddingValues","pxMatch","pyMatch","px","py","Dropdown","options","classButton","menuItems","classMenuItems","openDirection","dropdownActionsContext","setIsOpen","direction","group1","group2","group3","allItems","toggleMenu","prev","closeMenu","BreadcrumbsItem","isOver","canDrop","drop","monitor","onItemClicked","isDraggingOverClassNames","Breadcrumbs","MenuItem","forwardRef","ref","getItemsList","itemsList","hiddenItemsList","breadcrumbSeparator","key","CaretRight","separatorKey","itemKey","open","SidenavItem","Icon","notifications","iconDataCy","isActive","isCollapsed","subsection","SidenavOptions","showSubsections","Popover","childrenButton","panel","align","panelRef","showContent","setShowContent","transitionOpacity","setTransitionOpacity","transitionScale","setTransitionScale","togglePopover","handleMouseDown","closePopover","timeout","SuiteLauncher","suiteArray","soonText","SuiteButton","DotsNineIcon","suiteApp","idx","LockIcon","cloneElement","SidenavHeader","logo","onToggleCollapse","suiteLauncher","SidebarSimpleIcon","SidenavStorage","containerClassName","advertisement","Sidenav","primaryAction","collapsedPrimaryAction","storage","notification","timerRef","WarningIcon","BaseDialog","subTitle","dialogRounded","classes","panelClasses","titleClasses","closeClass","weightIcon","bgColor","hideCloseButton","Dialog","onPrimaryAction","onSecondaryAction","secondaryAction","primaryActionColor","maxWidth","isVisible","setIsVisible","Modal","width","preventClosing","stopMouseDownPropagation","modalRef","closeLastOpenModal","openModals","lastModal","TransparentModal","disableBackdrop","MessageCheapSkeleton","MessageCheap","email","isHighlighted","TrayList","mails","selectedEmails","activeEmail","onMailSelected","onLoadMore","_","UserCheap","avatar"],"mappings":"ucAAA,SAAwBA,GAAc,CACpC,SAAAC,EACA,SAAAC,EACA,UAAAC,EAAY,EACd,EAIiB,CACf,MAAMC,EAAWC,GAAeJ,CAAQ,EAExC,OACEK,EAAAA,IAAC,MAAA,CACC,MAAO,CAAE,MAAOJ,EAAU,OAAQA,EAAU,SAAUA,EAAW,GAAA,EACjE,UAAW,GAAGC,CAAS,gJAEvB,SAAAG,EAAAA,IAAC,KAAG,SAAAF,CAAA,CAAS,CAAA,CAAA,CAGnB,CAEA,SAASC,GAAeJ,EAAkB,CACxC,GAAI,CAACA,EACH,MAAO,GAGT,MAAMM,EAAcN,GAAU,KAAA,EAE9B,GAAI,CAACM,EACH,MAAO,GAET,MAAMC,EAAaD,EAAY,MAAM,GAAG,EACxC,GAAIC,EAAW,SAAW,EAAG,MAAO,GAAGA,EAAW,CAAC,EAAE,OAAO,CAAC,CAAC,GACzD,CACH,MAAMC,EAAQD,EAAW,CAAC,EAAE,OAAO,CAAC,EAC9BE,EAASF,EAAW,CAAC,EAAE,OAAO,CAAC,EACrC,OAAOC,EAAQC,CACjB,CACF,CCtCA,SAAwBC,GAAc,CACpC,IAAAC,EACA,SAAAV,EACA,UAAAC,EAAY,GACZ,MAAAU,EAAQ,CAAA,CACV,EAKiB,CACf,OACEP,EAAAA,IAAC,MAAA,CACC,MAAO,CAAE,MAAOJ,EAAU,OAAQA,EAAU,GAAGW,CAAA,EAC/C,UAAW,GAAGV,CAAS,kDACvB,IAAAS,EACA,UAAW,EAAA,CAAA,CAGjB,CCdA,MAAME,GAAmC,CACvC,IAAK,GACL,GAAI,GACJ,GAAI,GACJ,KAAM,GACN,GAAI,GAC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