From 4a6f9edff6aee2dd1099f3ba7d1362aca8ea6826 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 28 Aug 2026 19:53:38 +0530 Subject: [PATCH] refactor: migrate web Input to @makeplane/propel Input (#9708) Replace @plane/ui Input in apps/web with Propel Input and InputGroup. hasError maps to Field invalid. Default size is 2xl to match the old h-10 height. --- .../(projects)/workspace-views/page.tsx | 23 +- .../components/account/auth-forms/email.tsx | 83 +++---- .../account/auth-forms/forgot-password.tsx | 33 +-- .../account/auth-forms/password.tsx | 27 +-- .../account/auth-forms/reset-password.tsx | 69 +++--- .../account/auth-forms/set-password.tsx | 69 +++--- .../account/auth-forms/unique-code.tsx | 33 +-- .../core/components/api-token/modal/form.tsx | 24 ++- .../automation/select-month-modal.tsx | 63 +++--- .../components/core/image-picker-popover.tsx | 37 ++-- .../core/modals/change-email-modal.tsx | 60 +++--- .../core/modals/gpt-assistant-popover.tsx | 31 +-- apps/web/core/components/cycles/form.tsx | 31 +-- .../links/create-update-link-modal.tsx | 50 +++-- .../inbox/modals/create-modal/issue-title.tsx | 27 +-- .../issue-detail/label/create-label.tsx | 31 +-- .../links/create-update-link-modal.tsx | 50 +++-- .../issue-modal/components/title-input.tsx | 39 ++-- .../labels/create-update-label-inline.tsx | 30 +-- apps/web/core/components/modules/form.tsx | 31 +-- .../modules/links/create-update-modal.tsx | 51 +++-- .../onboarding/create-workspace.tsx | 86 ++++---- .../components/onboarding/invite-members.tsx | 37 ++-- .../components/onboarding/profile-setup.tsx | 156 +++++++------- .../components/onboarding/steps/team/root.tsx | 37 ++-- .../components/pages/modals/page-form.tsx | 27 +-- .../power-k/ui/modal/shortcuts-root.tsx | 10 +- .../project-states/create-update/form.tsx | 32 +-- .../project/create/common-attributes.tsx | 56 ++--- .../project/delete-project-modal.tsx | 58 ++--- apps/web/core/components/project/form.tsx | 58 ++--- .../project/leave-project-modal.tsx | 54 +++-- .../profile/content/pages/general/form.tsx | 118 +++++----- .../profile/content/pages/security.tsx | 204 +++++++++--------- apps/web/core/components/views/form.tsx | 33 +-- .../core/components/web-hooks/form/input.tsx | 27 ++- .../workspace/create-workspace-form.tsx | 102 ++++----- .../workspace/delete-workspace-form.tsx | 58 ++--- .../workspace/invite-modal/fields.tsx | 29 +-- .../workspace/settings/workspace-details.tsx | 62 +++--- .../sidebar/favorites/new-fav-folder.tsx | 17 +- .../core/components/workspace/views/form.tsx | 29 +-- 42 files changed, 1199 insertions(+), 983 deletions(-) diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/page.tsx index e80d29cf78..ca468e2d3c 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/page.tsx @@ -7,10 +7,11 @@ import React, { useState } from "react"; import { observer } from "mobx-react"; // plane imports +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { DEFAULT_GLOBAL_VIEWS_LIST } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { SearchIcon } from "@plane/propel/icons"; -import { Input } from "@plane/ui"; + // components import { PageHead } from "@/components/core/page-title"; import { GlobalDefaultViewListItem } from "@/components/workspace/views/default-view-list-item"; @@ -30,15 +31,17 @@ function WorkspaceViewsPage() { <>
-
- - setQuery(e.target.value)} - placeholder="Search" - mode="true-transparent" - /> +
+ + + setQuery(e.target.value)} + placeholder="Search" + aria-label="Search" + /> +
{DEFAULT_GLOBAL_VIEWS_LIST.filter((v) => t(v.i18n_label).toLowerCase().includes(query.toLowerCase())).map( diff --git a/apps/web/core/components/account/auth-forms/email.tsx b/apps/web/core/components/account/auth-forms/email.tsx index 2138753aaf..7bf76ca0ef 100644 --- a/apps/web/core/components/account/auth-forms/email.tsx +++ b/apps/web/core/components/account/auth-forms/email.tsx @@ -10,11 +10,13 @@ import { observer } from "mobx-react"; // icons import { CircleAlert, XCircle } from "lucide-react"; // plane imports +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import type { IEmailCheckData } from "@plane/types"; -import { Input, Spinner } from "@plane/ui"; -import { cn, checkEmailValidity } from "@plane/utils"; +import { Spinner } from "@plane/ui"; +import { checkEmailValidity } from "@plane/utils"; // helpers type TAuthEmailForm = { defaultEmail: string; @@ -54,45 +56,44 @@ export const AuthEmailForm = observer(function AuthEmailForm(props: TAuthEmailFo -
{ - setIsFocused(true); - }} - onBlur={() => { - setIsFocused(false); - }} - > - setEmail(e.target.value)} - placeholder={t("auth.common.email.placeholder")} - className={`h-10 w-full border-0 disable-autofill-style placeholder:text-placeholder autofill:bg-danger-primary focus:bg-none active:bg-transparent`} - autoComplete="off" - autoFocus - ref={inputRef} - /> - {email.length > 0 && ( - - )} -
+ + { + setIsFocused(true); + }} + onBlur={() => { + setIsFocused(false); + }} + > + setEmail(e.target.value)} + placeholder={t("auth.common.email.placeholder")} + autoComplete="off" + autoFocus + ref={inputRef} + /> + {email.length > 0 && ( + + )} + + {emailError?.email && !isFocused && (

diff --git a/apps/web/core/components/account/auth-forms/forgot-password.tsx b/apps/web/core/components/account/auth-forms/forgot-password.tsx index ebb9345c35..8054944987 100644 --- a/apps/web/core/components/account/auth-forms/forgot-password.tsx +++ b/apps/web/core/components/account/auth-forms/forgot-password.tsx @@ -11,10 +11,12 @@ import { Controller, useForm } from "react-hook-form"; // icons import { CircleCheck } from "lucide-react"; // plane imports +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { useTranslation } from "@plane/i18n"; import { Button, getButtonStyling } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; -import { Input } from "@plane/ui"; + import { cn, checkEmailValidity } from "@plane/utils"; // hooks import useTimer from "@/hooks/use-timer"; @@ -94,19 +96,22 @@ export const ForgotPasswordForm = observer(function ForgotPasswordForm() { validate: (value) => checkEmailValidity(value) || t("auth.common.email.errors.invalid"), }} render={({ field: { value, onChange, ref } }) => ( - 0} - /> + + + 0} + /> + + )} /> {resendTimerCode > 0 && ( diff --git a/apps/web/core/components/account/auth-forms/password.tsx b/apps/web/core/components/account/auth-forms/password.tsx index 09ccac02c6..c98ffff341 100644 --- a/apps/web/core/components/account/auth-forms/password.tsx +++ b/apps/web/core/components/account/auth-forms/password.tsx @@ -10,11 +10,12 @@ import Link from "next/link"; // icons import { Eye, EyeOff, Info, XCircle } from "lucide-react"; // plane imports +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { API_BASE_URL, E_PASSWORD_STRENGTH } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import { CloseIcon } from "@plane/propel/icons"; -import { Input, PasswordStrengthIndicator, Spinner } from "@plane/ui"; +import { PasswordStrengthIndicator, Spinner } from "@plane/ui"; import { getPasswordStrength } from "@plane/utils"; // components import { ForgotPasswordPopover } from "@/components/account/auth-forms/forgot-password-popover"; @@ -173,43 +174,43 @@ export const AuthPasswordForm = observer(function AuthPasswordForm(props: Props) -

+ handleFormChange("email", e.target.value)} placeholder={t("auth.common.email.placeholder")} - className={`h-10 w-full border-0 disable-autofill-style placeholder:text-placeholder`} disabled /> {passwordFormData.email.length > 0 && ( )} -
+
-
+ handleFormChange("password", e.target.value)} placeholder={t("auth.common.password.placeholder")} - className="h-10 w-full border border-strong !bg-surface-1 pr-12 disable-autofill-style placeholder:text-placeholder" onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} autoComplete="off" @@ -218,7 +219,7 @@ export const AuthPasswordForm = observer(function AuthPasswordForm(props: Props) -
+ {passwordSupport}
@@ -238,22 +239,22 @@ export const AuthPasswordForm = observer(function AuthPasswordForm(props: Props) -
+ handleFormChange("confirm_password", e.target.value)} placeholder={t("auth.common.password.confirm_password.placeholder")} - className="h-10 w-full border border-strong !bg-surface-1 pr-12 disable-autofill-style placeholder:text-placeholder" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} autoComplete="off" /> -
+ {!!passwordFormData.confirm_password && passwordFormData.password !== passwordFormData.confirm_password && renderPasswordMatchError && ( diff --git a/apps/web/core/components/account/auth-forms/reset-password.tsx b/apps/web/core/components/account/auth-forms/reset-password.tsx index 98283d3505..1e8f1c9208 100644 --- a/apps/web/core/components/account/auth-forms/reset-password.tsx +++ b/apps/web/core/components/account/auth-forms/reset-password.tsx @@ -10,10 +10,11 @@ import { useSearchParams } from "next/navigation"; // icons import { Eye, EyeOff } from "lucide-react"; // ui +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { API_BASE_URL, E_PASSWORD_STRENGTH } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; -import { Input, PasswordStrengthIndicator } from "@plane/ui"; +import { PasswordStrengthIndicator } from "@plane/ui"; // components import { getPasswordStrength } from "@plane/utils"; // helpers @@ -114,81 +115,81 @@ export const ResetPasswordForm = observer(function ResetPasswordForm() { -
+ -
+
-
+ handleFormChange("password", e.target.value)} - //hasError={Boolean(errors.password)} placeholder={t("auth.common.password.placeholder")} - className="h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" minLength={8} onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} autoComplete="new-password" autoFocus /> - {showPassword.password ? ( - handleShowPassword("password")} - /> - ) : ( - handleShowPassword("password")} - /> - )} -
+ +
-
+ handleFormChange("confirm_password", e.target.value)} placeholder={t("auth.common.password.confirm_password.placeholder")} - className="h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} autoComplete="new-password" /> - {showPassword.retypePassword ? ( - handleShowPassword("retypePassword")} - /> - ) : ( - handleShowPassword("retypePassword")} - /> - )} -
+ + {!!resetFormData.confirm_password && resetFormData.password !== resetFormData.confirm_password && renderPasswordMatchError && ( diff --git a/apps/web/core/components/account/auth-forms/set-password.tsx b/apps/web/core/components/account/auth-forms/set-password.tsx index f16db6650b..4863a02718 100644 --- a/apps/web/core/components/account/auth-forms/set-password.tsx +++ b/apps/web/core/components/account/auth-forms/set-password.tsx @@ -11,11 +11,12 @@ import { useSearchParams } from "next/navigation"; // icons import { Eye, EyeOff } from "lucide-react"; // plane imports +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { E_PASSWORD_STRENGTH } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; -import { Input, PasswordStrengthIndicator } from "@plane/ui"; +import { PasswordStrengthIndicator } from "@plane/ui"; // components import { getPasswordStrength } from "@plane/utils"; // hooks @@ -117,81 +118,81 @@ export const SetPasswordForm = observer(function SetPasswordForm() { -
+ -
+
-
+ handleFormChange("password", e.target.value)} - //hasError={Boolean(errors.password)} placeholder={t("auth.common.password.placeholder")} - className="h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" minLength={8} onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} autoComplete="new-password" autoFocus /> - {showPassword.password ? ( - handleShowPassword("password")} - /> - ) : ( - handleShowPassword("password")} - /> - )} -
+ +
-
+ handleFormChange("confirm_password", e.target.value)} placeholder={t("auth.common.password.confirm_password.placeholder")} - className="h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} autoComplete="new-password" /> - {showPassword.retypePassword ? ( - handleShowPassword("retypePassword")} - /> - ) : ( - handleShowPassword("retypePassword")} - /> - )} -
+ + {!!passwordFormData.confirm_password && passwordFormData.password !== passwordFormData.confirm_password && renderPasswordMatchError && ( diff --git a/apps/web/core/components/account/auth-forms/unique-code.tsx b/apps/web/core/components/account/auth-forms/unique-code.tsx index 9c4b8a6c18..832b98facd 100644 --- a/apps/web/core/components/account/auth-forms/unique-code.tsx +++ b/apps/web/core/components/account/auth-forms/unique-code.tsx @@ -6,10 +6,11 @@ import { useEffect, useState } from "react"; import { CircleCheck, XCircle } from "lucide-react"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { API_BASE_URL } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; -import { Input, Spinner } from "@plane/ui"; +import { Spinner } from "@plane/ui"; // constants // helpers import { EAuthModes } from "@/helpers/authentication.helper"; @@ -98,45 +99,47 @@ export function AuthUniqueCodeForm(props: TAuthUniqueCodeForm) { -
+ handleFormChange("email", e.target.value)} placeholder={t("auth.common.email.placeholder")} - className="h-10 w-full border-0 disable-autofill-style placeholder:text-placeholder" autoComplete="off" disabled /> {uniqueCodeFormData.email.length > 0 && ( )} -
+
- handleFormChange("code", e.target.value)} - placeholder={t("auth.common.unique_code.placeholder")} - className="h-10 w-full border border-strong !bg-surface-1 pr-12 disable-autofill-style placeholder:text-placeholder" - autoComplete="off" - autoFocus - /> + + handleFormChange("code", e.target.value)} + placeholder={t("auth.common.unique_code.placeholder")} + autoComplete="off" + autoFocus + /> +

diff --git a/apps/web/core/components/api-token/modal/form.tsx b/apps/web/core/components/api-token/modal/form.tsx index 1e1b96cf90..32c9456f67 100644 --- a/apps/web/core/components/api-token/modal/form.tsx +++ b/apps/web/core/components/api-token/modal/form.tsx @@ -9,13 +9,15 @@ import { add } from "date-fns"; import { Controller, useForm } from "react-hook-form"; import { Calendar } from "lucide-react"; // types +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { IApiToken } from "@plane/types"; // ui import { Switch } from "@makeplane/propel/components/switch"; -import { CustomSelect, Input, TextArea } from "@plane/ui"; +import { CustomSelect, TextArea } from "@plane/ui"; import { cn, renderFormattedDate, renderFormattedTime } from "@plane/utils"; // components import { DateDropdown } from "@/components/dropdowns/date"; @@ -144,14 +146,18 @@ export function CreateApiTokenForm(props: Props) { validate: (val) => val.trim() !== "" || t("title_is_required"), }} render={({ field: { value, onChange } }) => ( - + + + + + )} /> {errors.label && {errors.label.message}} diff --git a/apps/web/core/components/automation/select-month-modal.tsx b/apps/web/core/components/automation/select-month-modal.tsx index ed847676ac..b557934c49 100644 --- a/apps/web/core/components/automation/select-month-modal.tsx +++ b/apps/web/core/components/automation/select-month-modal.tsx @@ -7,11 +7,12 @@ import { useParams } from "next/navigation"; // react-hook-form import { Controller, useForm } from "react-hook-form"; +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { Button } from "@plane/propel/button"; import type { IProject } from "@plane/types"; // ui -import { Input, EModalPosition, EModalWidth, ModalCore } from "@plane/ui"; - +import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui"; // types type Props = { isOpen: boolean; @@ -63,19 +64,22 @@ export function SelectMonthModal({ type, initialValues, isOpen, handleClose, han }} render={({ field: { value, onChange, ref } }) => (

- + + + + + Months
)} @@ -97,19 +101,22 @@ export function SelectMonthModal({ type, initialValues, isOpen, handleClose, han }} render={({ field: { value, onChange, ref } }) => (
- + + + + + Months
)} diff --git a/apps/web/core/components/core/image-picker-popover.tsx b/apps/web/core/components/core/image-picker-popover.tsx index edcf3b948e..be049801d8 100644 --- a/apps/web/core/components/core/image-picker-popover.tsx +++ b/apps/web/core/components/core/image-picker-popover.tsx @@ -13,13 +13,14 @@ import { Controller } from "react-hook-form"; import useSWR from "swr"; import { Popover } from "@headlessui/react"; // plane imports +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { ACCEPTED_COVER_IMAGE_MIME_TYPES_FOR_REACT_DROPZONE, MAX_FILE_SIZE } from "@plane/constants"; import { useOutsideClickDetector } from "@plane/hooks"; import { Tabs } from "@plane/propel/tabs"; import { Button, getButtonStyling } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import { EFileAssetType } from "@plane/types"; -import { Input, Loader } from "@plane/ui"; +import { Loader } from "@plane/ui"; // helpers import { STATIC_COVER_IMAGES, getCoverImageDisplayURL } from "@/helpers/cover-image.helper"; // hooks @@ -223,22 +224,24 @@ function ImagePickerPopoverComponent} render={({ field: { value, ref } }) => ( - { - if (e.key === "Enter") { - e.preventDefault(); - setSearchParams(formData.search); - } - }} - value={value} - onChange={(e) => setFormData({ ...formData, search: e.target.value })} - ref={ref} - placeholder="Search for images" - className="w-full text-13" - /> + + { + if (e.key === "Enter") { + e.preventDefault(); + setSearchParams(formData.search); + } + }} + value={value} + onChange={(e) => setFormData({ ...formData, search: e.target.value })} + ref={ref} + placeholder="Search for images" + /> + )} />
diff --git a/apps/web/core/components/issues/issue-modal/components/title-input.tsx b/apps/web/core/components/issues/issue-modal/components/title-input.tsx index cf1a1795f5..365e833b5e 100644 --- a/apps/web/core/components/issues/issue-modal/components/title-input.tsx +++ b/apps/web/core/components/issues/issue-modal/components/title-input.tsx @@ -9,12 +9,14 @@ import { observer } from "mobx-react"; import type { Control, FormState } from "react-hook-form"; import { Controller } from "react-hook-form"; // plane imports +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { ETabIndices } from "@plane/constants"; // types import { useTranslation } from "@plane/i18n"; import type { TIssue } from "@plane/types"; // ui -import { Input } from "@plane/ui"; + // helpers import { getTabIndex } from "@plane/utils"; // hooks @@ -60,22 +62,25 @@ export const IssueTitleInput = observer(function IssueTitleInput(props: TIssueTi }, }} render={({ field: { value, onChange, ref } }) => ( - { - onChange(e.target.value); - handleFormChange(); - }} - ref={issueTitleRef || ref} - hasError={Boolean(errors.name)} - placeholder={t("title")} - className="w-full text-body-sm-regular" - autoFocus - tabIndex={getIndex("name")} - /> + + + { + onChange(e.target.value); + handleFormChange(); + }} + ref={issueTitleRef || ref} + placeholder={t("title")} + autoFocus + tabIndex={getIndex("name")} + /> + + )} /> {errors?.name?.message} diff --git a/apps/web/core/components/labels/create-update-label-inline.tsx b/apps/web/core/components/labels/create-update-label-inline.tsx index 6be483cd1a..70be4ca919 100644 --- a/apps/web/core/components/labels/create-update-label-inline.tsx +++ b/apps/web/core/components/labels/create-update-label-inline.tsx @@ -11,12 +11,13 @@ import type { SubmitHandler } from "react-hook-form"; import { Controller, useForm } from "react-hook-form"; import { Popover, Transition } from "@headlessui/react"; // plane imports +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { getRandomLabelColor, LABEL_COLOR_OPTIONS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { IIssueLabel } from "@plane/types"; -import { Input } from "@plane/ui"; // error codes const errorCodes = { @@ -219,18 +220,21 @@ export const CreateUpdateLabelInline = observer( }, }} render={({ field: { value, onChange, ref } }) => ( - + + + + + )} />
diff --git a/apps/web/core/components/modules/form.tsx b/apps/web/core/components/modules/form.tsx index a958bc486c..3eb632eff7 100644 --- a/apps/web/core/components/modules/form.tsx +++ b/apps/web/core/components/modules/form.tsx @@ -7,12 +7,14 @@ import { useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; // plane imports +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { ETabIndices } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import type { IModule } from "@plane/types"; // ui -import { Input, TextArea } from "@plane/ui"; +import { TextArea } from "@plane/ui"; import { getDate, renderFormattedPayloadDate, getTabIndex } from "@plane/utils"; // components import { DateRangeDropdown } from "@/components/dropdowns/date-range"; @@ -124,18 +126,21 @@ export function ModuleForm(props: Props) { }, }} render={({ field: { value, onChange } }) => ( - + + + + + )} /> {errors?.name?.message} diff --git a/apps/web/core/components/modules/links/create-update-modal.tsx b/apps/web/core/components/modules/links/create-update-modal.tsx index b99254aefd..3d437a07e0 100644 --- a/apps/web/core/components/modules/links/create-update-modal.tsx +++ b/apps/web/core/components/modules/links/create-update-modal.tsx @@ -7,12 +7,13 @@ import { useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; // plane types +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { ILinkDetails, ModuleLink } from "@plane/types"; // plane ui -import { Input, ModalCore } from "@plane/ui"; - +import { ModalCore } from "@plane/ui"; type Props = { createLink: (formData: ModuleLink) => Promise; data?: ILinkDetails | null; @@ -99,16 +100,19 @@ export function CreateUpdateModuleLinkModal(props: Props) { required: "URL is required", }} render={({ field: { value, onChange, ref } }) => ( - + + + + + )} />
@@ -121,16 +125,19 @@ export function CreateUpdateModuleLinkModal(props: Props) { control={control} name="title" render={({ field: { value, onChange, ref } }) => ( - + + + + + )} /> diff --git a/apps/web/core/components/onboarding/create-workspace.tsx b/apps/web/core/components/onboarding/create-workspace.tsx index 34f7a937ce..b7eae16489 100644 --- a/apps/web/core/components/onboarding/create-workspace.tsx +++ b/apps/web/core/components/onboarding/create-workspace.tsx @@ -8,6 +8,8 @@ import { useState } from "react"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; // constants +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { ORGANIZATION_SIZE, RESTRICTED_URLS } from "@plane/constants"; // types import { useTranslation } from "@plane/i18n"; @@ -15,7 +17,7 @@ import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { IUser, IWorkspace, TOnboardingSteps } from "@plane/types"; // ui -import { CustomSelect, Input, Spinner } from "@plane/ui"; +import { CustomSelect, Spinner } from "@plane/ui"; import { validateWorkspaceName, validateSlug } from "@plane/utils"; // hooks import { useWorkspace } from "@/hooks/store/use-workspace"; @@ -147,24 +149,27 @@ export const CreateWorkspace = observer(function CreateWorkspace(props: Props) { }} render={({ field: { value, ref, onChange } }) => (
- { - onChange(event.target.value); - setValue("name", event.target.value); - setValue("slug", event.target.value.toLocaleLowerCase().trim().replace(/ /g, "-"), { - shouldValidate: true, - }); - }} - placeholder={t("workspace_creation.form.name.placeholder")} - ref={ref} - hasError={Boolean(errors.name)} - className="w-full border-strong placeholder:text-placeholder" - autoFocus - /> + + + { + onChange(event.target.value); + setValue("name", event.target.value); + setValue("slug", event.target.value.toLocaleLowerCase().trim().replace(/ /g, "-"), { + shouldValidate: true, + }); + }} + placeholder={t("workspace_creation.form.name.placeholder")} + ref={ref} + autoFocus + /> + +
)} /> @@ -188,29 +193,26 @@ export const CreateWorkspace = observer(function CreateWorkspace(props: Props) { }, }} render={({ field: { value, ref, onChange } }) => ( -
- {window && window.location.host}/ - { - const validation = validateSlug(e.target.value); - if (validation === true) setInvalidSlug(false); - else setInvalidSlug(true); - onChange(e.target.value.toLowerCase()); - }} - ref={ref} - hasError={Boolean(errors.slug)} - placeholder={t("workspace_creation.form.url.placeholder")} - className="w-full border-none !px-0" - /> -
+ + + {window && window.location.host}/ + { + const validation = validateSlug(e.target.value); + if (validation === true) setInvalidSlug(false); + else setInvalidSlug(true); + onChange(e.target.value.toLowerCase()); + }} + ref={ref} + placeholder={t("workspace_creation.form.url.placeholder")} + /> + + )} />

{t("workspace_creation.form.url.edit_slug")}

diff --git a/apps/web/core/components/onboarding/invite-members.tsx b/apps/web/core/components/onboarding/invite-members.tsx index b73c87bb8b..3a4d03a78e 100644 --- a/apps/web/core/components/onboarding/invite-members.tsx +++ b/apps/web/core/components/onboarding/invite-members.tsx @@ -20,6 +20,8 @@ import { usePopper } from "react-popper"; import { XCircle } from "lucide-react"; import { Listbox } from "@headlessui/react"; // plane imports +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import type { EUserPermissions } from "@plane/constants"; import { ROLE, ROLE_DETAILS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; @@ -29,7 +31,7 @@ import { PlusIcon, CheckIcon, ChevronDownIcon } from "@plane/propel/icons"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { IUser, IWorkspace } from "@plane/types"; // ui -import { Input, Spinner } from "@plane/ui"; +import { Spinner } from "@plane/ui"; // services import { WorkspaceService } from "@/services/workspace.service"; // components @@ -153,21 +155,24 @@ const InviteMemberInput = observer(function InviteMemberInput(props: InviteMembe }, }} render={({ field: { value, onChange, ref } }) => ( - { - emailOnChange(event); - onChange(event); - }} - ref={ref} - hasError={Boolean(errors.emails?.[index]?.email)} - placeholder={placeholderEmails[index % placeholderEmails.length]} - className="w-full border-strong text-11 placeholder:text-placeholder sm:text-13" - autoComplete="off" - /> + + + { + emailOnChange(event); + onChange(event); + }} + ref={ref} + placeholder={placeholderEmails[index % placeholderEmails.length]} + autoComplete="off" + /> + + )} /> diff --git a/apps/web/core/components/onboarding/profile-setup.tsx b/apps/web/core/components/onboarding/profile-setup.tsx index 1880323e8f..e02f934be8 100644 --- a/apps/web/core/components/onboarding/profile-setup.tsx +++ b/apps/web/core/components/onboarding/profile-setup.tsx @@ -8,6 +8,8 @@ import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; import { Eye, EyeOff } from "lucide-react"; +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { E_PASSWORD_STRENGTH } from "@plane/constants"; // types import { useTranslation } from "@plane/i18n"; @@ -15,7 +17,7 @@ import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { IUser, TUserProfile, TOnboardingSteps } from "@plane/types"; // ui -import { Input, PasswordStrengthIndicator, Spinner } from "@plane/ui"; +import { PasswordStrengthIndicator, Spinner } from "@plane/ui"; // components import { cn, getFileURL, getPasswordStrength, validatePersonName } from "@plane/utils"; import { UserImageUploadModal } from "@/components/core/modals/user-image-upload-modal"; @@ -310,19 +312,22 @@ export const ProfileSetup = observer(function ProfileSetup(props: Props) { }, }} render={({ field: { value, onChange, ref } }) => ( - + + + + + )} /> {errors.first_name && ( @@ -348,18 +353,21 @@ export const ProfileSetup = observer(function ProfileSetup(props: Props) { }, }} render={({ field: { value, onChange, ref } }) => ( - + + + + + )} /> {errors.last_name && {errors.last_name.message}} @@ -380,32 +388,34 @@ export const ProfileSetup = observer(function ProfileSetup(props: Props) { required: false, }} render={({ field: { value, onChange, ref } }) => ( -
- setIsPasswordInputFocused(true)} - onBlur={() => setIsPasswordInputFocused(false)} - autoComplete="new-password" - /> - {showPassword.password ? ( - handleShowPassword("password")} + + + setIsPasswordInputFocused(true)} + onBlur={() => setIsPasswordInputFocused(false)} + autoComplete="new-password" + aria-label="New password..." /> - ) : ( - handleShowPassword("password")} - /> - )} -
+ > + {showPassword.password ? ( + + ) : ( + + )} + + + )} /> @@ -423,30 +433,32 @@ export const ProfileSetup = observer(function ProfileSetup(props: Props) { watch("password") ? (value === watch("password") ? true : "Passwords don't match") : true, }} render={({ field: { value, onChange, ref } }) => ( -
- - {showPassword.retypePassword ? ( - handleShowPassword("retypePassword")} + + + - ) : ( - handleShowPassword("retypePassword")} - /> - )} -
+ > + {showPassword.retypePassword ? ( + + ) : ( + + )} + + + )} /> {errors.confirm_password && ( diff --git a/apps/web/core/components/onboarding/steps/team/root.tsx b/apps/web/core/components/onboarding/steps/team/root.tsx index 536110fd03..b5fb4bd0b6 100644 --- a/apps/web/core/components/onboarding/steps/team/root.tsx +++ b/apps/web/core/components/onboarding/steps/team/root.tsx @@ -19,6 +19,8 @@ import { usePopper } from "react-popper"; import { XCircle } from "lucide-react"; import { Listbox } from "@headlessui/react"; // plane imports +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import type { EUserPermissions } from "@plane/constants"; import { ROLE, ROLE_DETAILS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; @@ -26,7 +28,7 @@ import { Button } from "@plane/propel/button"; import { PlusIcon, CheckIcon, ChevronDownIcon } from "@plane/propel/icons"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import { EOnboardingSteps } from "@plane/types"; -import { Input, Spinner } from "@plane/ui"; +import { Spinner } from "@plane/ui"; // hooks import { useWorkspace } from "@/hooks/store/use-workspace"; // services @@ -149,21 +151,24 @@ const InviteMemberInput = observer(function InviteMemberInput(props: InviteMembe }, }} render={({ field: { value, onChange, ref } }) => ( - { - emailOnChange(event); - onChange(event); - }} - ref={ref} - hasError={Boolean(errors.emails?.[index]?.email)} - placeholder={placeholderEmails[index % placeholderEmails.length]} - className="w-full border-strong text-11 placeholder:text-placeholder sm:text-13" - autoComplete="off" - /> + + + { + emailOnChange(event); + onChange(event); + }} + ref={ref} + placeholder={placeholderEmails[index % placeholderEmails.length]} + autoComplete="off" + /> + + )} /> diff --git a/apps/web/core/components/pages/modals/page-form.tsx b/apps/web/core/components/pages/modals/page-form.tsx index 810e838c15..84ba42750e 100644 --- a/apps/web/core/components/pages/modals/page-form.tsx +++ b/apps/web/core/components/pages/modals/page-form.tsx @@ -9,6 +9,7 @@ import { useState } from "react"; import type { LucideIcon } from "lucide-react"; // plane imports +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { ETabIndices, EPageAccess } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; @@ -16,7 +17,7 @@ import { EmojiPicker, EmojiIconPickerTypes, Logo } from "@plane/propel/emoji-ico import { GlobeIcon, LockIcon, PageIcon } from "@plane/propel/icons"; import type { ISvgIcons } from "@plane/propel/icons"; import type { TPage } from "@plane/types"; -import { Input } from "@plane/ui"; + import { getTabIndex } from "@plane/utils"; // components import { AccessField } from "@/components/common/access-field"; @@ -114,17 +115,19 @@ export function PageForm(props: Props) { } />
- handleFormData("name", e.target.value)} - placeholder="Title" - className="w-full resize-none text-14" - tabIndex={getIndex("name")} - required - autoFocus - /> + + handleFormData("name", e.target.value)} + placeholder="Title" + tabIndex={getIndex("name")} + required + autoFocus + /> + {isTitleLengthMoreThan255Character && ( Max length of the name should be less than 255 characters diff --git a/apps/web/core/components/power-k/ui/modal/shortcuts-root.tsx b/apps/web/core/components/power-k/ui/modal/shortcuts-root.tsx index acf392350c..2f9be5add2 100644 --- a/apps/web/core/components/power-k/ui/modal/shortcuts-root.tsx +++ b/apps/web/core/components/power-k/ui/modal/shortcuts-root.tsx @@ -7,9 +7,10 @@ import { useState, Fragment } from "react"; import { Dialog, Transition } from "@headlessui/react"; // plane imports +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { CloseIcon, SearchIcon } from "@plane/propel/icons"; import { ScrollArea } from "@plane/propel/scrollarea"; -import { Input } from "@plane/ui"; + // hooks import { usePowerK } from "@/hooks/store/use-power-k"; // local imports @@ -70,20 +71,21 @@ export function ShortcutsModal(props: Props) {
-
+ setQuery(e.target.value)} placeholder="Search for shortcuts" - className="w-full border-none bg-transparent py-1 text-11 text-secondary outline-none" + aria-label="Search for shortcuts" autoFocus tabIndex={1} /> -
+
diff --git a/apps/web/core/components/project-states/create-update/form.tsx b/apps/web/core/components/project-states/create-update/form.tsx index f3fdec84d6..4518271b81 100644 --- a/apps/web/core/components/project-states/create-update/form.tsx +++ b/apps/web/core/components/project-states/create-update/form.tsx @@ -6,10 +6,11 @@ import { useEffect, useState } from "react"; import { TwitterPicker } from "react-color"; +import { Field } from "@makeplane/propel/components/field"; +import { Input, InputGroup } from "@makeplane/propel/components/input"; import { Button } from "@plane/propel/button"; import type { IState } from "@plane/types"; -import { Popover, Input, TextArea } from "@plane/ui"; - +import { Popover, TextArea } from "@plane/ui"; type TStateForm = { data: Partial; onSubmit: (formData: Partial) => Promise<{ status: string }>; @@ -73,18 +74,21 @@ export function StateForm(props: TStateForm) {
{/* title */} - handleFormData("name", e.target.value)} - hasError={(errors && Boolean(errors.name)) || false} - className="w-full" - maxLength={100} - autoFocus - /> + + + handleFormData("name", e.target.value)} + maxLength={100} + autoFocus + /> + + {/* description */}