Skip to content

Chore/replace components from library part3 #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prepare": "husky install"
},
"dependencies": {
"@chingu-x/components": "^0.10.0",
"@chingu-x/components": "^0.10.4",
"@hello-pangea/dnd": "^16.3.0",
"@heroicons/react": "^2.0.18",
"@hookform/resolvers": "^3.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { type SubmitHandler, useForm } from "react-hook-form";
import { type Dispatch, type SetStateAction } from "react";
import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import { TextInput } from "@chingu-x/components/inputs";
import { resetPasswordRequestEmail } from "@/app/(auth)/authService";
import TextInput from "@/components/inputs/TextInput";
import { onOpenModal } from "@/store/features/modal/modalSlice";
import { useAppDispatch } from "@/store/hooks";
import { validateTextInput } from "@/utils/form/validateInput";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { type SubmitHandler, useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import { TextInput } from "@chingu-x/components/inputs";
import { serverSignIn } from "@/app/(auth)/authService";

import TextInput from "@/components/inputs/TextInput";
import { validateTextInput } from "@/utils/form/validateInput";
import { clientSignIn } from "@/store/features/auth/authSlice";
import { onOpenModal } from "@/store/features/modal/modalSlice";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useForm, type SubmitHandler } from "react-hook-form";
import * as z from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { Button } from "@chingu-x/components/button";
import TextInput from "@/components/inputs/TextInput";
import { TextInput } from "@chingu-x/components/inputs";
import { validateTextInput } from "@/utils/form/validateInput";
import routePaths from "@/utils/routePaths";

Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/users/components/NewPasswordContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import * as z from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import { TextInput } from "@chingu-x/components/inputs";
import { resetPassword } from "@/app/(auth)/authService";
import TextInput from "@/components/inputs/TextInput";
import { onOpenModal } from "@/store/features/modal/modalSlice";
import { useAppDispatch } from "@/store/hooks";
import { validateTextInput } from "@/utils/form/validateInput";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PencilSquareIcon } from "@heroicons/react/24/outline";
import { type SetStateAction, useEffect } from "react";
import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import TextInput from "@/components/inputs/TextInput";
import { TextInput } from "@chingu-x/components/inputs";
import { validateTextInput } from "@/utils/form/validateInput";
import { useAppDispatch } from "@/store/hooks";
import { editHours } from "@/app/(main)/my-voyage/[teamId]/directory/directoryService";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { type Dispatch, type SetStateAction, useEffect } from "react";
import { useParams } from "next/navigation";
import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import TextInput from "@/components/inputs/TextInput";
import { TextInput } from "@chingu-x/components/inputs";
import { validateTextInput } from "@/utils/form/validateInput";
import { useAppDispatch } from "@/store/hooks";
import useServerAction from "@/hooks/useServerAction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { type SubmitHandler, useForm } from "react-hook-form";
import { useEffect, useRef, useState } from "react";
import { Spinner } from "@chingu-x/components/spinner";
import { TextInput } from "@chingu-x/components/inputs";
import Card from "./Card";
import TextInput from "@/components/inputs/TextInput";
import { validateTextInput } from "@/utils/form/validateInput";
import { type Features } from "@/store/features/features/featuresSlice";
import useServerAction from "@/hooks/useServerAction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { TrashIcon } from "@heroicons/react/20/solid";
import { useState, useEffect } from "react";
import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import TextInput from "@/components/inputs/TextInput";
import Textarea from "@/components/inputs/Textarea";
import { TextInput, Textarea } from "@chingu-x/components/inputs";
import { validateTextInput } from "@/utils/form/validateInput";
import { useAppDispatch, useIdeation } from "@/store/hooks";
import { type IdeationData } from "@/store/features/ideation/ideationSlice";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { TrashIcon } from "@heroicons/react/20/solid";

import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import TextInput from "@/components/inputs/TextInput";
import Textarea from "@/components/inputs/Textarea";
import { TextInput, Textarea } from "@chingu-x/components/inputs";

import { validateTextInput } from "@/utils/form/validateInput";
import { useSprint, useAppDispatch } from "@/store/hooks";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ import { LinkIcon } from "@heroicons/react/24/outline";

import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import DateTimePicker from "@/components/inputs/DateTimePicker";
import TextInput from "@/components/inputs/TextInput";
import Textarea from "@/components/inputs/Textarea";
import { DateTimePicker, TextInput, Textarea } from "@chingu-x/components/inputs";


import {
validateDateTimeInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { zodResolver } from "@hookform/resolvers/zod";

import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import BaseFormPage from "@/components/form/BaseFormPage";
import { BaseFormPage } from "@chingu-x/components/form";
import { submitVoyageProjectForm } from "@/myVoyage/sprints/sprintsService";
import FormInput from "@/components/form/FormInput";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { zodResolver } from "@hookform/resolvers/zod";

import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import BaseFormPage from "@/components/form/BaseFormPage";
import { BaseFormPage } from "@chingu-x/components/form";
import { submitCheckInForm } from "@/myVoyage/sprints/sprintsService";
import FormInput from "@/components/form/FormInput";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useParams } from "next/navigation";

import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import Textarea from "@/components/inputs/Textarea";
import { Textarea } from "@chingu-x/components/inputs";

import { validateTextInput } from "@/utils/form/validateInput";
import useServerAction from "@/hooks/useServerAction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useParams } from "next/navigation";

import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import Textarea from "@/components/inputs/Textarea";
import { Textarea } from "@chingu-x/components/inputs";

import { validateTextInput } from "@/utils/form/validateInput";
import { type Section } from "@/store/features/sprint/sprintSlice";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useParams } from "next/navigation";

import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import Textarea from "@/components/inputs/Textarea";
import { Textarea } from "@chingu-x/components/inputs";

import { validateTextInput } from "@/utils/form/validateInput";
import { type Section } from "@/store/features/sprint/sprintSlice";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { AvatarGroup } from "@chingu-x/components/avatar-group";
import { Tooltip } from "@chingu-x/components/tooltip";
import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import { TextInput } from "@chingu-x/components/inputs";
import GetIcon from "./GetIcons";
import AddVoteBtn from "./AddVoteBtn";
import RemoveVoteBtn from "./RemoveVoteBtn";
Expand All @@ -20,7 +21,6 @@ import {
editTechItem,
} from "@/myVoyage/tech-stack/techStackService";
import getTechCategory from "@/myVoyage/tech-stack/components/getTechCategory";
import TextInput from "@/components/inputs/TextInput";
import type { TechStackItem } from "@/store/features/techStack/techStackSlice";
import { useUser, useAppDispatch, useAppSelector } from "@/store/hooks";
import useServerAction from "@/hooks/useServerAction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { LinkIcon } from "@heroicons/react/24/outline";
import { Button } from "@chingu-x/components/button";
import { Spinner } from "@chingu-x/components/spinner";
import { TextInput } from "@chingu-x/components/inputs";
import { useAppDispatch } from "@/store/hooks";
import { validateTextInput } from "@/utils/form/validateInput";
import TextInput from "@/components/inputs/TextInput";
import { onOpenModal } from "@/store/features/modal/modalSlice";
import { addResource } from "@/app/(main)/my-voyage/[teamId]/voyage-resources/resourcesService";
import useServerAction from "@/hooks/useServerAction";
Expand Down
207 changes: 1 addition & 206 deletions src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,208 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--primary: 33 122 86; /* #217A56 */
--primary-focus: 40 92 68; /* #285C44 */
--primary-content: 196 222 210; /* #C4DED2 */
--secondary: 163 206 233; /* #A3CEE9 */
--secondary-focus: 177 198 212; /* #B1C6D4 */
--secondary-content: 218 234 242; /* #DAEAF2 */
--accent: 166 153 141; /* #A6998D */
--accent-focus: 134 128 121; /* #868079 */
--accent-content: 217 213 208; /* #D9D5D0 */
--neutral: 107 114 128; /* #6B7280 */
--neutral-focus: 76 81 91; /* #4C515B */
--neutral-content: 156 161 170; /* #9CA1AA */
--info: 143 196 229; /* #8FC4E5 */
--info-content: 220 237 247; /* #DCEDF7 */
--success: 20 184 166; /* #14B8A6 */
--success-content: 182 233 227; /* #B6E9E3 */
--warning: 255 172 12; /* #FFAC0C */
--warning-content: 255 229 180; /* #FFE5B4 */
--error: 230 98 75; /* #E6624B */
--error-content: 247 206 199; /* #F7CEC7 */
--base-100: 227 229 235; /* #E3E5EB */
--base-200: 245 245 245; /* #F5F5F5 */
--base-300: 22 23 26; /* #16171A */
--base-content: 238 239 240; /* #EEEFF0 */
--overlay: rgba(22,23,26,0.25); /* #16171A @ 25% */
}

[data-theme='dark'] {
--primary: 64 147 109; /* #40936D */
--primary-focus: 95 142 108; /* #5F8E6C */
--primary-content: 57 71 65; /* #394741 */
--secondary: 68 114 141; /* #44728D */
--secondary-focus: 94 115 135; /* #5E7387 */
--secondary-content: 54 68 77; /* #36444D */
--accent: 97 101 102; /* #616566 */
--accent-focus: 107 106 108; /* #6B6A6C */
--accent-content: 63 63 64; /* -#3F3F40 */
--neutral: 107 114 128; /* #6B7280 */
--neutral-focus: 160 165 174; /* #A0A5AE */
--neutral-content: 80 85 94; /* #50555E */
--info: 132 181 212; /* #84B5D4 */
--info-content: 102 139 163; /* #668BA3 */
--success: 67 198 184; /* #43C6B8 */
--success-content: 14 131 118; /* #0E8376 */
--warning: 255 189 61; /* #FFBD3D */
--warning-content: 181 122 9; /* #B57A09 */
--error: 235 129 111; /* #EB816F */
--error-content: 163 70 53; /*#A34635 */
--base-100: 56 59 67; /* #383B43 */
--base-200: 22 23 26; /* #16171A */
--base-300: 245 245 245; /* #F5F5F5 */
--base-content: 45 48 54; /* #2D3036 */
--overlay: rgba(245,245,245,0.25); /* #F5F5F5 @ 25% */
}
}

::-webkit-scrollbar {
width: 4px;
height: 6px
}

::-webkit-scrollbar-track {
background: #919191;
border-radius: 2px;
}

::-webkit-scrollbar-thumb {
background: #C0C0C0;
border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
background: #C0C0C0;
}

/* to hide or show content based on the current theme */
[data-theme='dark'] [data-hide-on-theme='dark'],
[data-theme='light'] [data-hide-on-theme='light'] {
display: none;
}

/* a fix for a textarea placeholder missing bottom padding for Safari */
@supports (-webkit-hyphens:none) {
textarea::placeholder {
padding-bottom: 8px;
}
}

/* to remove the reveal password button (eye) which is added by MS Edge and IE */
input::-ms-reveal,
input::-ms-clear {
display: none;
}

/* React DateTime Picker styles */
.react-datepicker {
border-radius: 8px !important;
overflow: hidden !important;
}

.react-datepicker {
background-color: #F5F5F5 !important;
border: 2px solid rgba(107, 114, 128, 0.4) !important;
/* box-shadow: 0px 0px 0px 3px rgba(107, 114, 128, 0.3) !important; */
}

[data-theme='dark'] .react-datepicker {
background-color: #16171A !important;
border: 2px solid rgba(107, 114, 128, 0.4) !important;
/* box-shadow: 0px 0px 0px 3px rgba(107, 114, 128, 0.3) !important; */
}

.react-datepicker__navigation-icon::before {
border-color: #6B7280 !important;
}

[data-theme='dark'] .react-datepicker__navigation-icon::before {
border-color: #6B7280 !important;
}

.react-datepicker__month-container,
.react-datepicker__header,
.react-datepicker__time-container,
.react-datepicker__header,
.react-datepicker__time-box {
background-color: #F5F5F5 !important;
border: none !important;
}

.react-datepicker__month-container {
border-right: 1px solid rgba(107, 114, 128, 0.4) !important;
}

[data-theme='dark'] .react-datepicker__month-container,
[data-theme='dark'] .react-datepicker__header,
[data-theme='dark'] .react-datepicker__time-container,
[data-theme='dark'] .react-datepicker__header,
[data-theme='dark'] .react-datepicker__time-box {
background-color: #16171A !important;
}

.react-datepicker__day,
.react-datepicker__current-month {
font-size: 14px !important;
font-weight: semibold !important;;
}

.react-datepicker__day,
.react-datepicker__current-month,
.react-datepicker__day-name,
.react-datepicker-time__header,
.react-datepicker__time-list-item {
color: #4C515B !important;
}

[data-theme='dark'] .react-datepicker__day,
[data-theme='dark'] .react-datepicker__current-month,
[data-theme='dark'] .react-datepicker__day-name,
[data-theme='dark'] .react-datepicker-time__header,
[data-theme='dark'] .react-datepicker__time-list-item {
color: #A0A5AE !important;
}

.react-datepicker__day--today {
color: #4C515B !important;
}

[data-theme='dark'] .react-datepicker__day--today {
color: #A0A5AE !important;
}

.react-datepicker__day.react-datepicker__day--selected,
.react-datepicker__time-list-item--selected,
.react-datepicker__day--keyboard-selected,
.react-datepicker__day:hover,
.react-datepicker__time-list-item:hover {
background: #E3E5EB !important;
color: #4C515B !important;
}

[data-theme='dark'] .react-datepicker__day.react-datepicker__day--selected,
[data-theme='dark'] .react-datepicker__time-list-item--selected,
[data-theme='dark'] .react-datepicker__day--keyboard-selected,
[data-theme='dark'] .react-datepicker__day:hover,
[data-theme='dark'] .react-datepicker__time-list-item:hover {
background: #383B43 !important;
color: #A0A5AE !important;
}

.react-datepicker__time-list-item--disabled,
.react-datepicker__time-list-item--disabled:hover {
background: none !important;
color: #E3E5EB !important;
}

[data-theme='dark'] .react-datepicker__time-list-item--disabled {
color: #383B43 !important;
}

.react-datepicker__triangle {
display: none !important;
}
@tailwind utilities;
Loading