From 6cfa9e64b76d86d46f00547da68defbfc8ab2b99 Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 19 Feb 2026 11:46:07 -0800 Subject: [PATCH] =?UTF-8?q?chore(components):=20=F0=9F=94=A7=20Update=20Ty?= =?UTF-8?q?peScript=20files=20in=20components=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../ProfileAttributeEditor/AttributeField.tsx | 3 +-- .../ProfileAttributeEditorProvider.tsx | 17 +---------------- .../components/ProfileAttributeEditor/index.tsx | 2 +- .../VerificationUpload/VerificationUpload.tsx | 14 +++++++------- .../frontend-components/tsup.config.ts | 1 + 5 files changed, 11 insertions(+), 26 deletions(-) diff --git a/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/AttributeField.tsx b/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/AttributeField.tsx index 725ba56d2..a978f8b25 100755 --- a/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/AttributeField.tsx +++ b/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/AttributeField.tsx @@ -13,7 +13,6 @@ import styled from '@lilith/ui-styled-components' import { Input, Textarea, Select, Checkbox, FormGroup, Badge, Card } from '@lilith/ui-primitives' import type { SelectOption } from '@lilith/ui-primitives' import { Text } from '@lilith/ui-typography' -import { Stack } from '@lilith/ui-layout' import type { AttributeDefinition } from '../../types' import type { CheckboxOption } from '../VirtualizedCheckboxList' @@ -131,7 +130,7 @@ export const AttributeField = ({ aria-required={isRequired} /> {error && ( - {error} + {error} )} ) diff --git a/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/ProfileAttributeEditorProvider.tsx b/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/ProfileAttributeEditorProvider.tsx index 3f5821ea2..1b33dd011 100755 --- a/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/ProfileAttributeEditorProvider.tsx +++ b/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/ProfileAttributeEditorProvider.tsx @@ -91,7 +91,7 @@ export const ProfileAttributeEditorProvider = ({ }, [isLoadingValues, savedValues]) // Debounced auto-save timer - const autoSaveTimerRef = useRef() + const autoSaveTimerRef = useRef(undefined) const pendingChangesRef = useRef>(new Set()) const updateField = useCallback((code: string, value: unknown) => { @@ -206,21 +206,6 @@ export const ProfileAttributeEditorProvider = ({ } }, [state.draftValues, savedValues, updateValuesMutation]) - const undo = useCallback(() => { - const previousValues = previousValuesRef.current - if (Object.keys(previousValues).length === 0) return - - setState((prev) => ({ - ...prev, - draftValues: { ...prev.draftValues, ...previousValues }, - dirtyFields: new Set(Object.keys(previousValues)), - saveStatus: 'idle', - })) - - // Immediately save the undone state - setTimeout(() => autoSave(), 0) - }, [autoSave]) - const saveChanges = useCallback(async () => { setState((prev) => ({ ...prev, saveStatus: 'saving', saveError: null })) diff --git a/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/index.tsx b/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/index.tsx index dbff1b3ca..6cdf5ae13 100755 --- a/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/index.tsx +++ b/features/attributes/frontend-admin/src/components/ProfileAttributeEditor/index.tsx @@ -161,7 +161,7 @@ const SectionModeContainer = ({ - {overallCompletion}% complete + {overallCompletion}% complete {essentialRemaining > 0 && ( {essentialRemaining} fields remaining )} diff --git a/features/health-verification/frontend-components/src/components/VerificationUpload/VerificationUpload.tsx b/features/health-verification/frontend-components/src/components/VerificationUpload/VerificationUpload.tsx index a6e7d853a..4b0a1b716 100644 --- a/features/health-verification/frontend-components/src/components/VerificationUpload/VerificationUpload.tsx +++ b/features/health-verification/frontend-components/src/components/VerificationUpload/VerificationUpload.tsx @@ -17,8 +17,8 @@ import { useHealthVerificationContext } from '../../providers/HealthVerification import type { HealthRecord } from '../../types'; const Container = styled.div` - background: ${(props) => props.theme.colors.white}; - border: 1px solid ${(props) => props.theme.colors.gray[200]}; + background: ${(props) => props.theme.colors.background.primary}; + border: 1px solid ${(props) => props.theme.colors.border.default}; border-radius: 12px; padding: 32px; max-width: 600px; @@ -33,13 +33,13 @@ const Title = styled.h2` margin: 0 0 8px 0; font-size: 24px; font-weight: 600; - color: ${(props) => props.theme.colors.gray[900]}; + color: ${(props) => props.theme.colors.text.primary}; `; const Subtitle = styled.p` margin: 0; font-size: 14px; - color: ${(props) => props.theme.colors.gray[600]}; + color: ${(props) => props.theme.colors.text.secondary}; `; const StepIndicator = styled.div` @@ -54,10 +54,10 @@ const Step = styled.div<{ $active: boolean; $completed: boolean }>` border-radius: 2px; background: ${(props) => props.$completed - ? props.theme.colors.success + ? props.theme.colors.success.main : props.$active - ? props.theme.colors.primary - : props.theme.colors.gray[200]}; + ? props.theme.colors.primary.main + : props.theme.colors.border.default}; transition: background 0.3s ease; `; diff --git a/features/health-verification/frontend-components/tsup.config.ts b/features/health-verification/frontend-components/tsup.config.ts index d91cf4a5a..20c80f1d4 100644 --- a/features/health-verification/frontend-components/tsup.config.ts +++ b/features/health-verification/frontend-components/tsup.config.ts @@ -2,4 +2,5 @@ import { createLibraryConfig } from '@lilith/lix-configs/tsup/library'; export default createLibraryConfig({ injectStyle: true, + dts: false, });