mirror of
https://github.com/documenso/documenso.git
synced 2026-07-26 18:04:55 +10:00
138d663c25
Merge origin/main into feat/external-2fa-codes. Resolve formatting conflicts caused by biome rollout; preserve both feature streams: PR's external 2FA token + signing-session 2FA proof additions plus main's RateLimit/RecipientExpired/signingReminders/date-auto-insert. In complete-document-with-token.ts, drop the duplicate early field-fetching block introduced when main moved that logic later with date auto-insert support; keep the EXTERNAL_TWO_FACTOR_AUTH check using derivedRecipientActionAuth.
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import { cn } from '@documenso/ui/lib/utils';
|
|
import { Loader } from 'lucide-react';
|
|
|
|
export const DocumentSigningFieldsLoader = () => {
|
|
return (
|
|
<div className="absolute inset-0 flex items-center justify-center rounded-md bg-background">
|
|
<Loader className="h-5 w-5 animate-spin text-primary md:h-8 md:w-8" />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export const DocumentSigningFieldsUninserted = ({ children }: { children: React.ReactNode }) => {
|
|
return (
|
|
<p className="whitespace-pre-wrap text-[clamp(0.425rem,25cqw,0.825rem)] text-foreground duration-200 group-hover:text-recipient-green">
|
|
{children}
|
|
</p>
|
|
);
|
|
};
|
|
|
|
type DocumentSigningFieldsInsertedProps = {
|
|
children: React.ReactNode;
|
|
|
|
/**
|
|
* The text alignment of the field.
|
|
*
|
|
* Defaults to left.
|
|
*/
|
|
textAlign?: 'left' | 'center' | 'right';
|
|
};
|
|
|
|
export const DocumentSigningFieldsInserted = ({ children, textAlign = 'left' }: DocumentSigningFieldsInsertedProps) => {
|
|
return (
|
|
<div className="flex h-full w-full items-center overflow-hidden">
|
|
<p
|
|
className={cn(
|
|
'w-full whitespace-pre-wrap text-left text-[clamp(0.425rem,25cqw,0.825rem)] text-foreground duration-200',
|
|
{
|
|
'!text-center': textAlign === 'center',
|
|
'!text-right': textAlign === 'right',
|
|
},
|
|
)}
|
|
>
|
|
{children}
|
|
</p>
|
|
</div>
|
|
);
|
|
};
|