Merge pull request #4642 from Infisical/feat/tw-upgrade

Feat/tw upgrade
This commit is contained in:
Akhil Mohan
2025-10-10 11:36:17 +05:30
committed by GitHub
669 changed files with 2856 additions and 3367 deletions
@@ -269,7 +269,7 @@ const GroupRolesForm = ({ projectRoles, roles, groupId, onClose }: FormProps) =>
return (
<form onSubmit={handleSubmit(handleRoleUpdate)} id="role-update-form">
<div className="thin-scrollbar max-h-80 space-y-4 overflow-y-auto">
<div className="max-h-80 thin-scrollbar space-y-4 overflow-y-auto">
{projectRoles
?.filter(
({ name, slug }) =>
@@ -281,7 +281,7 @@ const GroupRolesForm = ({ projectRoles, roles, groupId, onClose }: FormProps) =>
return (
<div key={id} className="flex items-center space-x-4">
<div className="flex-grow">
<div className="grow">
<Controller
control={control}
defaultValue={Boolean(userProjectRoleDetails?.id)}
@@ -68,7 +68,7 @@ export const GroupsSection = () => {
return (
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<div className="mb-4 flex items-center justify-between">
<p className="text-xl font-semibold text-mineshaft-100">User Groups</p>
<p className="text-xl font-medium text-mineshaft-100">User Groups</p>
<ProjectPermissionCan I={ProjectPermissionActions.Create} a={ProjectPermissionSub.Groups}>
{(isAllowed) => (
<Button
@@ -168,13 +168,13 @@ export const IdentityTab = withProjectPermission(
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<div className="mb-4 flex items-center justify-between">
<div className="flex items-center gap-1">
<p className="text-xl font-semibold text-mineshaft-100">Identities</p>
<p className="text-xl font-medium text-mineshaft-100">Identities</p>
<a
href="https://infisical.com/docs/documentation/platform/identities/overview"
target="_blank"
rel="noopener noreferrer"
>
<div className="ml-1 mt-[0.16rem] inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
<div className="mt-[0.16rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
<span>Docs</span>
<FontAwesomeIcon
@@ -378,7 +378,7 @@ export const SpecificPrivilegeSecretForm = ({
isChecked={field.value}
onCheckedChange={(isChecked) => field.onChange(isChecked)}
/>
<div className="pointer-events-none ml-1 flex select-none flex-col text-mineshaft-300">
<div className="pointer-events-none ml-1 flex flex-col text-mineshaft-300 select-none">
<div className="flex flex-row items-center gap-1">
<FontAwesomeIcon
icon={faEye}
@@ -409,7 +409,7 @@ export const SpecificPrivilegeSecretForm = ({
isChecked={field.value}
onCheckedChange={(isChecked) => field.onChange(isChecked)}
/>
<div className="pointer-events-none ml-1 flex select-none flex-col text-mineshaft-300">
<div className="pointer-events-none ml-1 flex flex-col text-mineshaft-300 select-none">
<div className="flex flex-row items-center gap-1">
<FontAwesomeIcon
icon={faPlus}
@@ -442,7 +442,7 @@ export const SpecificPrivilegeSecretForm = ({
isChecked={field.value}
onCheckedChange={(isChecked) => field.onChange(isChecked)}
/>
<div className="pointer-events-none ml-1 flex select-none flex-col text-mineshaft-300">
<div className="pointer-events-none ml-1 flex flex-col text-mineshaft-300 select-none">
<div className="flex flex-row items-center gap-1">
<FontAwesomeIcon
icon={faPencil}
@@ -473,7 +473,7 @@ export const SpecificPrivilegeSecretForm = ({
isChecked={field.value}
onCheckedChange={(isChecked) => field.onChange(isChecked)}
/>
<div className="pointer-events-none ml-1 flex select-none flex-col text-mineshaft-300">
<div className="pointer-events-none ml-1 flex flex-col text-mineshaft-300 select-none">
<div className="flex flex-row items-center gap-1">
<FontAwesomeIcon
icon={faTrashCan}
@@ -504,7 +504,7 @@ export const SpecificPrivilegeSecretForm = ({
rightIcon={<FontAwesomeIcon icon={faCaretDown} className="ml-4" />}
isDisabled={isMemberEditDisabled}
className={twMerge(
"w-full border-mineshaft-600 bg-mineshaft-900 py-2.5 text-sm capitalize text-mineshaft-300 hover:border-mineshaft-600 hover:bg-mineshaft-800",
"w-full border-mineshaft-600 bg-mineshaft-900 py-2.5 text-sm text-mineshaft-300 capitalize hover:border-mineshaft-600 hover:bg-mineshaft-800",
isExpired && "text-red-600"
)}
>
@@ -57,7 +57,7 @@ export const MembersSection = () => {
return (
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<div className="mb-4 flex items-center justify-between">
<p className="text-xl font-semibold text-mineshaft-100">Users</p>
<p className="text-xl font-medium text-mineshaft-100">Users</p>
<ProjectPermissionCan I={ProjectPermissionActions.Create} a={ProjectPermissionSub.Member}>
{(isAllowed) => (
<Button
@@ -193,7 +193,7 @@ export const MembersTable = ({ handlePopUpOpen }: Props) => {
variant="plain"
size="sm"
className={twMerge(
"flex h-[2.375rem] w-[2.6rem] items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",
"flex h-9.5 w-[2.6rem] items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",
isTableFiltered && "border-primary/50 text-primary"
)}
>
@@ -209,7 +209,7 @@ export const MembersTable = ({ handlePopUpOpen }: Props) => {
>
Roles
</DropdownSubMenuTrigger>
<DropdownSubMenuContent className="thin-scrollbar max-h-[20rem] overflow-y-auto rounded-l-none">
<DropdownSubMenuContent className="max-h-80 thin-scrollbar overflow-y-auto rounded-l-none">
<DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
Apply Roles to Filter Users
</DropdownMenuLabel>
@@ -167,7 +167,7 @@ export const ProjectRoleList = () => {
return (
<div className="rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<div className="mb-4 flex justify-between">
<p className="text-xl font-semibold text-mineshaft-100">Project Roles</p>
<p className="text-xl font-medium text-mineshaft-100">Project Roles</p>
<ProjectPermissionCan I={ProjectPermissionActions.Create} a={ProjectPermissionSub.Role}>
{(isAllowed) => (
<Button
@@ -261,7 +261,7 @@ export const ProjectRoleList = () => {
<Td>{name}</Td>
<Td>{slug}</Td>
<Td>
<Badge className="w-min whitespace-nowrap bg-mineshaft-400/50 text-bunker-200">
<Badge className="w-min bg-mineshaft-400/50 whitespace-nowrap text-bunker-200">
{isCustomProjectRole(slug) ? "Custom" : "Default"}
</Badge>
</Td>
@@ -278,7 +278,7 @@ export const ProjectRoleList = () => {
<FontAwesomeIcon icon={faEllipsisV} />
</IconButton>
</DropdownMenuTrigger>
<DropdownMenuContent className="min-w-[12rem]" sideOffset={2} align="end">
<DropdownMenuContent className="min-w-48" sideOffset={2} align="end">
<ProjectPermissionCan
I={ProjectPermissionActions.Edit}
a={ProjectPermissionSub.Role}
@@ -335,7 +335,7 @@ export const ProjectRoleList = () => {
icon={<FontAwesomeIcon icon={faTrash} />}
className={twMerge(
isAllowed
? "hover:!bg-red-500 hover:!text-white"
? "hover:bg-red-500! hover:text-white!"
: "pointer-events-none cursor-not-allowed opacity-50",
"transition-colors duration-100"
)}
@@ -17,7 +17,7 @@ export const ServiceTokenTab = () => {
{/* <div className="flex w-full flex-row items-center rounded-md border border-primary-600/70 bg-primary/[.07] p-4 text-base text-white">
<FontAwesomeIcon icon={faWarning} className="pr-6 text-4xl text-white/80" />
<div className="flex w-full flex-col text-sm">
<span className="mb-4 text-lg font-semibold">Deprecation Notice</span>
<span className="mb-4 text-lg font-medium">Deprecation Notice</span>
<p>
Service Tokens are being deprecated in favor of Machine Identities.
<br />
@@ -26,7 +26,7 @@ export const ServiceTokenTab = () => {
<a
href="https://infisical.com/blog/deprecating-api-keys"
target="_blank"
className="font-semibold text-primary-400" rel="noreferrer"
className="font-medium text-primary-400" rel="noreferrer"
>
here
</a>
@@ -35,7 +35,7 @@ export const ServiceTokenTab = () => {
<a
href="https://infisical.com/docs/documentation/platform/identities/overview"
target="_blank"
className="font-semibold text-primary-400" rel="noreferrer"
className="font-medium text-primary-400" rel="noreferrer"
>
Learn more about Machine Identities
</a>
@@ -201,7 +201,7 @@ const ServiceTokenForm = () => {
defaultValue="/"
render={({ field, fieldState: { error } }) => (
<FormControl
className="mb-0 flex-grow"
className="mb-0 grow"
label={index === 0 ? "Secrets Path" : undefined}
isError={Boolean(error)}
errorText={error?.message}
@@ -314,7 +314,7 @@ const ServiceTokenForm = () => {
</div>
</form>
) : (
<div className="mb-3 mr-2 mt-2 flex items-center justify-end rounded-md bg-white/[0.07] p-2 text-base text-gray-400">
<div className="mt-2 mr-2 mb-3 flex items-center justify-end rounded-md bg-white/[0.07] p-2 text-base text-gray-400">
<p className="mr-4 break-all">{newToken}</p>
<IconButton
ariaLabel="copy icon"
@@ -323,7 +323,7 @@ const ServiceTokenForm = () => {
onClick={copyTokenToClipboard}
>
<FontAwesomeIcon icon={isTokenCopied ? faCheck : faCopy} />
<span className="absolute -left-8 -top-20 hidden w-28 translate-y-full rounded-md bg-bunker-800 py-2 pl-3 text-center text-sm text-gray-400 group-hover:flex group-hover:animate-fadeIn">
<span className="group-hover:animate-fade-in absolute -top-20 -left-8 hidden w-28 translate-y-full rounded-md bg-bunker-800 py-2 pl-3 text-center text-sm text-gray-400 group-hover:flex">
{t("common.click-to-copy")}
</span>
</IconButton>
@@ -51,13 +51,13 @@ export const ServiceTokenSection = withProjectPermission(
<div className="mb-2 flex items-center justify-between">
<div>
<div className="flex items-center gap-1">
<p className="text-xl font-semibold text-mineshaft-100">Service Tokens</p>
<p className="text-xl font-medium text-mineshaft-100">Service Tokens</p>
<a
href="https://infisical.com/docs/documentation/platform/token"
target="_blank"
rel="noopener noreferrer"
>
<div className="ml-1 mt-[0.16rem] inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
<div className="mt-[0.16rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
<span>Docs</span>
<FontAwesomeIcon
@@ -236,7 +236,7 @@ export const ServiceTokenTable = ({ handlePopUpOpen }: Props) => {
<FontAwesomeIcon icon={faEllipsisV} />
</IconButton>
</DropdownMenuTrigger>
<DropdownMenuContent className="min-w-[12rem]" sideOffset={2} align="end">
<DropdownMenuContent className="min-w-48" sideOffset={2} align="end">
<ProjectPermissionCan
I={ProjectPermissionActions.Delete}
a={ProjectPermissionSub.ServiceTokens}