diff --git a/components/AdminMessages.tsx b/components/AdminMessages.tsx index 1f46e3a..eefed44 100644 --- a/components/AdminMessages.tsx +++ b/components/AdminMessages.tsx @@ -1,7 +1,7 @@ import { AdminMessageLevel, AdminMessagesProps } from "@/submodules/react-components/types/admin-messages"; import { CurrentPage } from "@/submodules/react-components/hooks/web-socket/constants"; -import { IconAlertCircle, IconInfoSquare, IconPoint, IconX } from "@tabler/icons-react"; import { useMemo } from "react"; +import { MemoIconAlertCircle, MemoIconInfoSquare, MemoIconPoint, MemoIconX } from "./kern-icons/icons"; export default function AdminMessages(props: AdminMessagesProps) { const isOnLabelingPage = useMemo(() => props.currentPage == CurrentPage.LABELING, [props.currentPage]); @@ -18,13 +18,13 @@ export default function AdminMessages(props: AdminMessagesProps) {
- {activeMessage.level == AdminMessageLevel.INFO && } - {activeMessage.level == AdminMessageLevel.WARNING && } - {activeMessage.level} + {activeMessage.level == AdminMessageLevel.INFO && } + {activeMessage.level == AdminMessageLevel.WARNING && } + {activeMessage.level} {activeMessage.text} - {activeMessage.displayDate && <>
Scheduled for {activeMessage.displayDate}
} + {activeMessage.displayDate && <>
Scheduled for {activeMessage.displayDate}
}
)) diff --git a/components/InfoButton.tsx b/components/InfoButton.tsx index 317fd6d..7f4a9c7 100644 --- a/components/InfoButton.tsx +++ b/components/InfoButton.tsx @@ -1,10 +1,10 @@ import { combineClassNames } from "@/submodules/javascript-functions/general"; import { useDefaults } from "@/submodules/react-components/hooks/useDefaults"; -import { IconInfoCircle } from "@tabler/icons-react"; import { Dispatch, Fragment, SetStateAction, useEffect, useRef, useState } from "react"; import useOnClickOutside from "@/submodules/react-components/hooks/useHooks/useOnClickOutside"; import { Transition } from "@headlessui/react"; import { INFO_BUTTON_DEFAULT_VALUES, InfoButtonConfig, InfoButtonProps } from "../types/infoButton"; +import { MemoIconInfoCircle } from "./kern-icons/icons"; function generateAndCheckConfig(props: InfoButtonProps, setOpen: Dispatch>): InfoButtonConfig { @@ -45,7 +45,7 @@ export function InfoButton(_props: InfoButtonProps) { if (!config) return null; return (
- + {props.display == "absoluteDiv" ?
-

{content}

: content} diff --git a/components/InputWithClearIcon.tsx b/components/InputWithClearIcon.tsx index d79e6dd..0d639ae 100644 --- a/components/InputWithClearIcon.tsx +++ b/components/InputWithClearIcon.tsx @@ -1,4 +1,6 @@ -import { IconX } from "@tabler/icons-react"; +import { useCallback } from "react"; +import { MemoIconX } from "./kern-icons/icons"; +import useRefFor from "../hooks/useRefFor"; export type InputWithClearIconProps = { value: string; @@ -8,6 +10,11 @@ export type InputWithClearIconProps = { } export default function InputWithClearIcon(props: InputWithClearIconProps) { + const clearInputRef = useRefFor(props.onChange) + const clearInput = useCallback(() => { + clearInputRef.current(''); + }, [props.onChange]); + return (
props.onChange(event.target.value)} /> {props.value && ( - props.onChange("")} /> + )}
) } \ No newline at end of file diff --git a/components/KernDropdown.tsx b/components/KernDropdown.tsx index 64159d5..85029bd 100644 --- a/components/KernDropdown.tsx +++ b/components/KernDropdown.tsx @@ -4,13 +4,12 @@ import { KernDropdownProps } from '../types/dropdown'; import { combineClassNames } from '../../javascript-functions/general'; import { SELECT_ALL, checkDropdownProps, getActiveNegateGroupColor, getDropdownDisplayText, prepareDropdownOptionsToArray, reduceColorProperty, setOptionsWithSearchBar } from '../helpers/dropdown-helper'; import { Tooltip } from '@nextui-org/react'; -import { IconChevronDown, IconDotsVertical, IconExternalLink } from '@tabler/icons-react'; -import { IconTrashXFilled } from '@tabler/icons-react'; import useOnClickOutside from '../hooks/useHooks/useOnClickOutside'; import { useDefaults } from '../hooks/useDefaults'; import SVGIcon from './SVGIcon'; import { CSSProperties } from 'react'; import useRefFor from '../hooks/useRefFor'; +import { MemoIconChevronDown, MemoIconDotsVertical, MemoIconExternalLink, MemoIconTrashXFilled } from './kern-icons/icons'; const DEFAULTS = { fontSizeClass: 'text-xs' }; @@ -197,14 +196,14 @@ export default function KernDropdown(props: KernDropdownProps) { className="h-9 w-full text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pr-8 pl-4 truncate placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100 disabled:opacity-50 disabled:cursor-not-allowed" disabled={isDisabled && !props.ignoreDisabledForSearch} placeholder="Type to search..." /> -