diff --git a/src/components/containers/modal/Modal.tsx b/src/components/containers/modal/Modal.tsx
index 1eccc0b..a066b0d 100644
--- a/src/components/containers/modal/Modal.tsx
+++ b/src/components/containers/modal/Modal.tsx
@@ -4,7 +4,6 @@ import React, { Fragment } from "react";
import _ModalTitle from "./_ModalTitle";
import _ModalFooter from "./_ModalFooter";
import classNames from "classnames";
-import _ModalCloseButton from "./_ModalCloseButton";
type Props = {
children: React.ReactNode;
@@ -57,6 +56,5 @@ function Modal ({
Modal.Header = _ModalTitle;
Modal.Footer = _ModalFooter;
-Modal.CloseButton = _ModalCloseButton;
export default Modal;
diff --git a/src/components/containers/modal/_ModalCloseButton.tsx b/src/components/containers/modal/_ModalCloseButton.tsx
deleted file mode 100644
index 3e1e399..0000000
--- a/src/components/containers/modal/_ModalCloseButton.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import React from "react";
-import Button from "components/controls/Button";
-import { ReactComponent as SVGTimesIcon } from "assets/svg/times.svg";
-
-type Props = {
- onClose: VoidFunction,
-};
-
-export default function _ModalCloseButton({onClose}: Props) {
- return (
-
-
-
- );
-}
diff --git a/src/components/controls/Button.tsx b/src/components/controls/Button.tsx
deleted file mode 100644
index 2107bac..0000000
--- a/src/components/controls/Button.tsx
+++ /dev/null
@@ -1,239 +0,0 @@
-import classNames from 'classnames';
-import {
- StyleColorVariants,
- StyleColorVariantsMap,
- StyleType,
-} from 'core/_variants';
-import React from 'react';
-
-type Props = {
- href?: string;
- variant?: StyleColorVariants;
- type?: StyleType;
- iconed?: boolean | "only";
- glowing?: boolean;
- disabled?: boolean;
- onClick?: (event: React.MouseEvent) => void;
- children?: React.ReactNode;
- className?: string | undefined;
- rel?: string | undefined;
- htmlType?: 'button' | 'submit' | 'reset' | undefined;
-};
-
-const buttonBgVariants: StyleColorVariantsMap = {
- gray: 'bg-gray-500',
- blue: 'bg-blue-500',
- emerald: 'bg-emerald-600',
- pink: 'bg-pink-500',
- purple: 'bg-purple-500',
- red: 'bg-red-500',
- sky: 'bg-sky-500',
- yellow: 'bg-yellow-500',
- "dark-coral": "bg-dark-coral-500",
-};
-
-const buttonBgDisabledVariants: StyleColorVariantsMap = {
- gray: 'bg-gray-200',
- blue: 'bg-blue-100/10',
- emerald: 'bg-emerald-200/50',
- pink: 'bg-pink-200/50',
- purple: 'bg-purple-200/50',
- red: 'bg-red-200/50',
- sky: 'bg-sky-200/50',
- yellow: 'bg-yellow-200/50',
- "dark-coral": "bg-dark-coral-200/50",
-};
-
-const buttonBgDisabledHoverVariants: StyleColorVariantsMap = {
- gray: 'hover:bg-gray-500/50',
- blue: 'hover:bg-blue-100/10',
- emerald: 'hover:bg-emerald-500/50',
- pink: 'hover:bg-pink-500/50',
- purple: 'hover:bg-purple-500/50',
- red: 'hover:bg-red-500/50',
- sky: 'hover:bg-sky-500/50',
- yellow: 'hover:bg-yellow-500/50',
- "dark-coral": "hover:bg-dark-coral-500/50",
-};
-
-const buttonHoverBgVariants: StyleColorVariantsMap = {
- gray: 'hover:bg-gray-600',
- blue: 'hover:bg-blue-400',
- emerald: 'hover:bg-emerald-600',
- pink: 'hover:bg-pink-600',
- purple: 'hover:bg-purple-600',
- red: 'hover:bg-red-600',
- sky: 'hover:bg-sky-600',
- yellow: 'hover:bg-yellow-600',
- "dark-coral": "hover:bg-dark-coral-600",
-};
-
-const buttonBorderVariants: StyleColorVariantsMap = {
- gray: 'border-gray-500',
- blue: 'border-blue-500',
- emerald: 'border-emerald-700',
- pink: 'border-pink-300',
- purple: 'border-purple-300',
- red: 'border-red-300',
- sky: 'border-sky-300',
- yellow: 'border-yellow-300',
- "dark-coral": "border-dark-coral-500",
-};
-
-const buttonBorderHoverVariants: StyleColorVariantsMap = {
- gray: 'hover:border-gray-500',
- blue: 'hover:border-blue-400',
- emerald: 'hover:border-emerald-900',
- pink: 'hover:border-pink-400',
- purple: 'hover:border-purple-400',
- red: 'hover:border-red-500',
- sky: 'hover:border-sky-400',
- yellow: 'hover:border-yellow-400',
- "dark-coral": "hover:border-dark-coral-400",
-};
-
-const buttonTextVariants: StyleColorVariantsMap = {
- gray: 'text-white',
- blue: 'text-white',
- emerald: 'text-emerald-300',
- pink: 'text-white',
- purple: 'text-white',
- red: 'text-white',
- sky: 'text-white',
- yellow: 'text-white',
- "dark-coral": "text-white",
-};
-
-const buttonTextHoverVariants: StyleColorVariantsMap = {
- blue: 'hover:text-white',
- emerald: 'hover:text-emerald-900',
- gray: 'hover:text-white',
- pink: 'hover:text-white',
- purple: 'hover:text-white',
- red: 'hover:text-white',
- sky: 'hover:text-white',
- yellow: 'hover:text-white',
- "dark-coral": 'hover:text-white',
-}
-
-const buttonTextMutedVariants: StyleColorVariantsMap = {
- gray: 'text-gray-500',
- blue: 'text-gray-50',
- emerald: 'text-gray-50',
- pink: 'text-gray-50',
- purple: 'text-gray-50',
- red: 'text-gray-50',
- sky: 'text-gray-50',
- yellow: 'text-gray-50',
- "dark-coral": "text-gray-500",
-};
-
-const buttonGlowVariants: StyleColorVariantsMap = {
- gray: 'shadow-gray-300/50',
- blue: 'shadow-blue-500/50',
- emerald: 'shadow-blue-700/50',
- pink: 'shadow-blue-300/50',
- purple: 'shadow-blue-300/50',
- red: 'shadow-blue-300/50',
- sky: 'shadow-blue-300/50',
- yellow: 'shadow-blue-300/50',
- "dark-coral": "shadow-dark-coral-300/50",
-};
-
-const buttonHoverGlowVariants: StyleColorVariantsMap = {
- gray: 'hover:shadow-gray-300/50',
- blue: 'hover:shadow-blue-400/50',
- emerald: 'hover:shadow-blue-300/50',
- pink: 'hover:shadow-blue-300/50',
- purple: 'hover:shadow-blue-300/50',
- red: 'hover:shadow-blue-300/50',
- sky: 'hover:shadow-blue-300/50',
- yellow: 'hover:shadow-blue-300/50',
- "dark-coral": "hover:shadow-dark-coral-300/50",
-};
-
-const isURL = (str: string) =>
- /^(?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)\S*$/.test(str);
-
-const isInternalURL = (str: string) => /^\/(\S*\/)*\S*\/?$/.test(str);
-
-/**
- * Common button component
- * @param {string|undefined} href New location link
- * @param {boolean} iconed Flag to process component with icon. Default: `false`
- * @param {StyleGlobalVariants|undefined} variant Button variant.
- * Default: `base`
- * @param {StyleType} type Button type.
- * Default: `fill`
- * @param {boolean|undefined} glowing Enables glowing shadow around
- * button element. Default `false`
- * @param {boolean|undefined} disabled Shows button element as
- * disabled item
- * @return {JSX.Element}
- */
-const Button = ({
- href,
- iconed,
- variant = 'gray',
- type = 'fill',
- glowing = false,
- disabled,
- onClick: onPress,
- children,
- className,
- rel,
- htmlType,
-}: Props) =>{
- const isExternal = isURL(href ?? '');
- const isInternal = isInternalURL(href ?? '');
-
- const As = isExternal || isInternal ? 'a' : 'button';
-
- return (
-
- {children}
-
- );
-};
-
-export default Button;
diff --git a/src/components/controls/Combox.tsx b/src/components/controls/Combox.tsx
index f9e6dda..a465a26 100644
--- a/src/components/controls/Combox.tsx
+++ b/src/components/controls/Combox.tsx
@@ -1,6 +1,5 @@
import { Combobox } from "@headlessui/react";
import { useState } from "react";
-import { ReactComponent as SVGDropdownIcon } from "assets/svg/dropdown.svg";
import classNames from "classnames";
type OptionPropsArg = {
@@ -50,10 +49,6 @@ export default function Combox({
/>
-
({
}
value={valueMaper ? valueMaper(option) : option}
>
- {(stats) => itemBuilder(stats, option)}
+
))
)}
diff --git a/src/components/parts/GlobalControls.tsx b/src/components/parts/GlobalControls.tsx
index f81ac05..5cd380c 100644
--- a/src/components/parts/GlobalControls.tsx
+++ b/src/components/parts/GlobalControls.tsx
@@ -11,11 +11,9 @@ import { useTranslation } from "react-i18next";
/* -------------------------------------------------------------------------- */
/* Components */
/* -------------------------------------------------------------------------- */
-import Button from "components/controls/Button";
/* -------------------------------------------------------------------------- */
/* Icons */
/* -------------------------------------------------------------------------- */
-import { ReactComponent as SVGBackIcon } from "assets/svg/backstab.svg";
/* -------------------------------------------------------------------------- */
/* Component */
/* -------------------------------------------------------------------------- */
@@ -36,20 +34,6 @@ export default function GlobalControls() {
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
-
>
);
diff --git a/src/components/parts/Header.tsx b/src/components/parts/Header.tsx
index 2682ab6..99650bb 100644
--- a/src/components/parts/Header.tsx
+++ b/src/components/parts/Header.tsx
@@ -8,17 +8,11 @@ import { useNavigate } from "react-router-dom";
/* -------------------------------------------------------------------------- */
import ContextMenu from "components/containers/contextmenu/ContextMenu";
import Logotype from "components/Logotype";
-import Button from "components/controls/Button";
import Avatar from "components/containers/Avatar";
import ContextMenuAction from "components/containers/contextmenu/ContextMenuAction";
/* -------------------------------------------------------------------------- */
/* SVG */
/* -------------------------------------------------------------------------- */
-import { ReactComponent as SVGSearchIcon } from "assets/svg/search.svg";
-import { ReactComponent as SVGBellIcon } from "assets/svg/bell.svg";
-import { ReactComponent as SVGCogIcon } from "assets/svg/cog.svg";
-import { ReactComponent as SVGUserAddIcon } from "assets/svg/user-add.svg";
-import { ReactComponent as SVGExitIcon } from "assets/svg/exit.svg";
/* -------------------------------------------------------------------------- */
/* Hooks */
/* -------------------------------------------------------------------------- */
@@ -66,12 +60,7 @@ export default function Header({title}: Props) {
-
-
+
}
className="absolute w-full min-h-14 sm:w-80 -bottom-3
@@ -100,9 +89,7 @@ export default function Header({title}: Props) {
disabled={isLoading}
className="group w-full py-2 -mx-4 px-4 hover:bg-gray-200/20 rounded-md hover:text-blue-400 transition-colors"
caption="Account settings"
- icon={
-
- }
+
/>
{
@@ -111,17 +98,13 @@ export default function Header({title}: Props) {
disabled={isLoading}
className="group w-full py-2 -mx-4 px-4 hover:bg-gray-200/20 rounded-md hover:text-blue-400 transition-colors"
caption={t("account.connect")}
- icon={
-
- }
+
/>
- }
+
/>
diff --git a/src/core/_variants.ts b/src/core/_variants.ts
index 6b41568..6f94d40 100644
--- a/src/core/_variants.ts
+++ b/src/core/_variants.ts
@@ -1,4 +1,4 @@
-export type StyleType = "fill" | "outline" | "text";
+export type StyleType = "high" | "medium" | "low";
export type StyleColorVariants = "blue" | "pink" | "red" | "purple" | "yellow" | "sky" | "emerald" | "gray" | "dark-coral";
diff --git a/src/localization/views/LanguageSelector.tsx b/src/localization/views/LanguageSelector.tsx
index 15791a1..e6b4dc0 100644
--- a/src/localization/views/LanguageSelector.tsx
+++ b/src/localization/views/LanguageSelector.tsx
@@ -48,7 +48,6 @@ export default function LanguageSelector({ isShown, onClose }: Props) {
return (
-
{t("selectLanguage")}
You have to be authorized
to access techpal dashboard
-
);
diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx
index 7a250b2..fd91cc7 100644
--- a/src/pages/Dashboard.tsx
+++ b/src/pages/Dashboard.tsx
@@ -15,7 +15,6 @@ import AvailabilityIndicator from "components/indicators/AvailabilityIndicator";
/* -------------------------------------------------------------------------- */
/* Icons */
/* -------------------------------------------------------------------------- */
-import { ReactComponent as SVGArrowRightShortIcon } from "assets/svg/arrow-right-short.svg";
/* -------------------------------------------------------------------------- */
/* Dashboard page */
/* -------------------------------------------------------------------------- */
@@ -25,7 +24,7 @@ import { useServicesViewModel } from "services/controller/servicesViewModel";
import CircleLoader from "components/CircleLoader";
import _ from "lodash";
import { useUIStore } from "ui/data/uiSlice";
-import Button from "components/controls/Button";
+
import { useNavigate } from "react-router-dom";
import { useSubscriptionsStore } from "subscriptions/data/subscriptionsSlice";
import { useSubscriptionsViewModel } from "subscriptions/controller/subscriptionsViewModel";
@@ -64,13 +63,7 @@ export default function Dashboard() {
-
+
@@ -84,7 +77,7 @@ export default function Dashboard() {
className="font-semibold inline-flex items-center space-x-2 hover:space-x-3"
>
connect
-
+
@@ -128,7 +121,6 @@ export default function Dashboard() {
open
-
@@ -175,7 +167,6 @@ export default function Dashboard() {
className="font-semibold inline-flex items-center space-x-2 hover:space-x-3"
>
open
-
diff --git a/src/pages/NoMatch.tsx b/src/pages/NoMatch.tsx
index b107f07..895268d 100644
--- a/src/pages/NoMatch.tsx
+++ b/src/pages/NoMatch.tsx
@@ -9,7 +9,6 @@ import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
/* -------------------------------------------------------------------------- */
/* Components */
-import Button from "components/controls/Button";
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* Misc */
@@ -17,7 +16,6 @@ import Button from "components/controls/Button";
/* -------------------------------------------------------------------------- */
/* Icons */
/* -------------------------------------------------------------------------- */
-import { ReactComponent as SVGBackIcon } from "assets/svg/backstab.svg";
/* -------------------------------------------------------------------------- */
/* Account information management page */
/* -------------------------------------------------------------------------- */
@@ -33,23 +31,7 @@ const NoMatch = (): JSX.Element => {
404
Page Not Found
{t('serv.noSuchPath')}
-
+
);
};
diff --git a/src/ui/views/GlobalSearch.tsx b/src/ui/views/GlobalSearch.tsx
index 9b14ba3..25b32e6 100644
--- a/src/ui/views/GlobalSearch.tsx
+++ b/src/ui/views/GlobalSearch.tsx
@@ -6,12 +6,9 @@ import Modal from "components/containers/modal/Modal";
/* -------------------------------------------------------------------------- */
/* Icons/SVG */
/* -------------------------------------------------------------------------- */
-import { ReactComponent as SVGSearchIcon } from "assets/svg/search.svg";
-import { ReactComponent as SVGTimesIcon } from "assets/svg/times.svg";
/* -------------------------------------------------------------------------- */
/* Components */
/* -------------------------------------------------------------------------- */
-import Button from "components/controls/Button";
/* -------------------------------------------------------------------------- */
/* Hooks */
/* -------------------------------------------------------------------------- */
@@ -36,28 +33,7 @@ export default function GlobalSearchbar() {
{}}>
-
-
-
- {}}
- placeholder={t('search.label')}
- className="bg-transparent
- focus:outline-none
- px-4 py-2 w-full"
- />
-
-
-
+
diff --git a/src/user/views/EmailEditor.tsx b/src/user/views/EmailEditor.tsx
index d1c82db..ce11f0f 100644
--- a/src/user/views/EmailEditor.tsx
+++ b/src/user/views/EmailEditor.tsx
@@ -12,12 +12,10 @@ import { useEmailDataViewModel } from "../controller/emailDataViewModel";
/* Components */
/* -------------------------------------------------------------------------- */
import Modal from "components/containers/modal/Modal";
-import Button from "components/controls/Button";
import InputField from "components/controls/InputField";
/* -------------------------------------------------------------------------- */
/* Icons */
/* -------------------------------------------------------------------------- */
-import { ReactComponent as SVGCircleProgressIcon } from "assets/svg/circle-progress.svg";
import { useTranslation } from "react-i18next";
/* -------------------------------------------------------------------------- */
/* Component */
@@ -60,7 +58,6 @@ export default function EmailEditor({ isShown, onClose: extOnClose }: Props) {
return (
diff --git a/src/user/views/PasswordConfirmation.tsx b/src/user/views/PasswordConfirmation.tsx
index 9985bbc..630e53b 100644
--- a/src/user/views/PasswordConfirmation.tsx
+++ b/src/user/views/PasswordConfirmation.tsx
@@ -3,7 +3,6 @@ import Modal from "components/containers/modal/Modal";
import { Formik } from "formik";
import { useTranslation } from "react-i18next";
import InputField from "components/controls/InputField";
-import Button from "components/controls/Button";
type Props = {
isShown: boolean;
@@ -28,7 +27,6 @@ export default function PasswordConfirmation({
return (
-
{t("dialogues.confirmAction.title")}
-
)}
diff --git a/src/user/views/PersonalInfomrationEditor.tsx b/src/user/views/PersonalInfomrationEditor.tsx
index c564a0d..edfdd71 100644
--- a/src/user/views/PersonalInfomrationEditor.tsx
+++ b/src/user/views/PersonalInfomrationEditor.tsx
@@ -1,10 +1,8 @@
import React from "react";
import Modal from "components/containers/modal/Modal";
-import Button from "components/controls/Button";
import InputField from "components/controls/InputField";
import { useUserStore } from "../data/userSlice";
-import { ReactComponent as SVGCircleProgressIcon } from "assets/svg/circle-progress.svg";
import classNames from "classnames";
import { useTranslation } from "react-i18next";
import { Formik } from "formik";
@@ -38,7 +36,6 @@ export default function PersonalInfomrationEditor({
return (
-
{t("account.info")}
-
-
+
)}