[WIP] Encryption for secure values (#183)

This commit is contained in:
Gregory Schier
2025-04-15 07:18:26 -07:00
committed by GitHub
parent e114a85c39
commit 2e55a1bd6d
208 changed files with 4063 additions and 28698 deletions

View File

@@ -12,6 +12,7 @@ export type PlainInputProps = Omit<InputProps, 'wrapLines' | 'onKeyDown' | 'type
onFocusRaw?: HTMLAttributes<HTMLInputElement>['onFocus'];
type?: 'text' | 'password' | 'number';
step?: number;
hideObscureToggle?: boolean;
};
export function PlainInput({
@@ -31,8 +32,10 @@ export function PlainInput({
onPaste,
required,
rightSlot,
hideObscureToggle,
size = 'md',
type = 'text',
tint,
validate,
autoSelect,
placeholder,
@@ -115,6 +118,16 @@ export function PlainInput({
size === 'xs' && 'min-h-xs',
)}
>
{tint != null && (
<div
aria-hidden
className={classNames(
'absolute inset-0 opacity-5 pointer-events-none',
tint === 'info' && 'bg-info',
tint === 'warning' && 'bg-warning',
)}
/>
)}
{leftSlot}
<HStack
className={classNames(
@@ -128,7 +141,7 @@ export function PlainInput({
key={forceUpdateKey}
id={id}
type={type === 'password' && !obscured ? 'text' : type}
defaultValue={defaultValue}
defaultValue={defaultValue ?? undefined}
autoComplete="off"
autoCapitalize="off"
autoCorrect="off"
@@ -143,7 +156,7 @@ export function PlainInput({
onKeyDownCapture={onKeyDownCapture}
/>
</HStack>
{type === 'password' && (
{type === 'password' && !hideObscureToggle && (
<IconButton
title={obscured ? `Show ${label}` : `Obscure ${label}`}
size="xs"