Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Add core color palette and refactor all apps to adhere to it
Leendert de Borstd8cc29c93ff9
diff --git a/apps/browser-extension/eslint.config.js b/apps/browser-extension/eslint.config.jsindex 3e3dee6d2..c03eef8cd 100644--- a/apps/browser-extension/eslint.config.js+++ b/apps/browser-extension/eslint.config.js@@ -162,7 +162,7 @@ export default [},},{- // Icons come from the shared catalog in core/models/src/icons (the Icon component, uiIconSvg), never inline SVG markup.+ // Brand style enforcement.files: ["src/**/*.{ts,tsx}"],ignores: ["src/entrypoints/popup/components/Icons/Icon.tsx", "src/entrypoints/popup/components/Logo.tsx", "src/utils/constants/logo.ts", "src/**/__tests__/**"],rules: {@@ -170,6 +170,8 @@ export default [{ selector: "JSXOpeningElement[name.name='svg']", message: "Use the Icon component with an icon from core/models/src/icons instead of inline SVG." },{ selector: "TemplateElement[value.raw=/<svg/]", message: "Use uiIconSvg() from @aliasvault/models/icons instead of inline SVG markup." },{ selector: "Literal[value=/<svg/]", message: "Use uiIconSvg() from @aliasvault/models/icons instead of inline SVG markup." },+ { selector: "Literal[value=/(orange|indigo)-[0-9]/]", message: "Use the primary-* brand colors (core/models/src/colors) instead of Tailwind orange or indigo; use amber for warnings." },+ { selector: "TemplateElement[value.raw=/(orange|indigo)-[0-9]/]", message: "Use the primary-* brand colors (core/models/src/colors) instead of Tailwind orange or indigo; use amber for warnings." },],},},diff --git a/apps/browser-extension/src/entrypoints/contentScript/style.css b/apps/browser-extension/src/entrypoints/contentScript/style.cssindex b57afd706..9d6a6a25a 100644--- a/apps/browser-extension/src/entrypoints/contentScript/style.css+++ b/apps/browser-extension/src/entrypoints/contentScript/style.css@@ -289,8 +289,8 @@ body {}.av-search-input:focus {- border-color: #2563eb;- box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);+ border-color: #f49541;+ box-shadow: 0 0 0 2px rgba(244, 149, 65, 0.2);}/* Vault Locked Popup */@@ -548,8 +548,8 @@ body {}.av-create-popup-input:focus {- border-color: #2563eb;- box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);+ border-color: #f49541;+ box-shadow: 0 0 0 3px rgba(244, 149, 65, 0.1);}.av-create-popup-input-default {@@ -768,7 +768,7 @@ body {}.av-create-popup-save:hover {- background: #c97731;+ background: #b8702f;transform: translateY(-1px);}@@ -1284,7 +1284,7 @@ body {}.av-password-config-toggle.active:hover {- background-color: #c97731;+ background-color: #b8702f;}.av-password-config-checkbox {@@ -1465,7 +1465,7 @@ body {}.av-save-prompt__btn--save:hover {- background: #c97731;+ background: #b8702f;}.av-save-prompt__btn--never {diff --git a/apps/browser-extension/src/entrypoints/popup/components/Alert.tsx b/apps/browser-extension/src/entrypoints/popup/components/Alert.tsxindex 7c98efac8..b9216e4dc 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Alert.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Alert.tsx@@ -14,7 +14,7 @@ interface IAlertProps {const Alert: React.FC<IAlertProps> = ({ variant, children, className = '' }) => {const variantStyles = {info: 'bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 text-blue-800 dark:text-blue-200',- warning: 'bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800 text-yellow-800 dark:text-yellow-200',+ warning: 'bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800 text-amber-800 dark:text-amber-200',error: 'bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-800 dark:text-red-200',success: 'bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-800 dark:text-green-200'};diff --git a/apps/browser-extension/src/entrypoints/popup/components/AlertMessage.tsx b/apps/browser-extension/src/entrypoints/popup/components/AlertMessage.tsxindex d24dcba5a..126c71db6 100644--- a/apps/browser-extension/src/entrypoints/popup/components/AlertMessage.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/AlertMessage.tsx@@ -37,7 +37,7 @@ const AlertMessage: React.FC<IAlertMessageProps> = ({ type, message, className =case 'success':return `${baseClasses} bg-green-100 dark:bg-green-900/30 border-green-300 dark:border-green-700 text-green-800 dark:text-green-300`;case 'warning':- return `${baseClasses} bg-yellow-100 dark:bg-yellow-900/30 border-yellow-300 dark:border-yellow-700 text-yellow-800 dark:text-yellow-300`;+ return `${baseClasses} bg-amber-100 dark:bg-amber-900/30 border-amber-300 dark:border-amber-700 text-amber-800 dark:text-amber-300`;case 'info':return `${baseClasses} bg-blue-100 dark:bg-blue-900/30 border-blue-300 dark:border-blue-700 text-blue-800 dark:text-blue-300`;default:diff --git a/apps/browser-extension/src/entrypoints/popup/components/ClipboardCountdownBar.tsx b/apps/browser-extension/src/entrypoints/popup/components/ClipboardCountdownBar.tsxindex cacfd7057..443d2ba0a 100644--- a/apps/browser-extension/src/entrypoints/popup/components/ClipboardCountdownBar.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/ClipboardCountdownBar.tsx@@ -81,7 +81,7 @@ export const ClipboardCountdownBar: React.FC = () => {<CountdownBarref={countdownBarRef}isVisible={isVisible}- colorClass="bg-orange-500"+ colorClass="bg-primary-500"/>);};diff --git a/apps/browser-extension/src/entrypoints/popup/components/CountdownBar.tsx b/apps/browser-extension/src/entrypoints/popup/components/CountdownBar.tsxindex 532a13477..c9c1ba2b3 100644--- a/apps/browser-extension/src/entrypoints/popup/components/CountdownBar.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/CountdownBar.tsx@@ -9,7 +9,7 @@ export interface ICountdownBarProps {*/isVisible: boolean;/**- * Color class for the progress bar (e.g., 'bg-orange-500', 'bg-primary-500').+ * Color class for the progress bar (e.g., 'bg-primary-500', 'bg-primary-500').*/colorClass?: string;}@@ -34,7 +34,7 @@ export interface ICountdownBarHandle {* Use the ref to control the animation.*/export const CountdownBar = forwardRef<ICountdownBarHandle, ICountdownBarProps>(- ({ isVisible, colorClass = 'bg-orange-500' }, ref) => {+ ({ isVisible, colorClass = 'bg-primary-500' }, ref) => {const animationRef = useRef<HTMLDivElement>(null);/**diff --git a/apps/browser-extension/src/entrypoints/popup/components/Dialogs/ConfirmDeleteModal.tsx b/apps/browser-extension/src/entrypoints/popup/components/Dialogs/ConfirmDeleteModal.tsxindex 824d0fb20..8667cabb1 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Dialogs/ConfirmDeleteModal.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Dialogs/ConfirmDeleteModal.tsx@@ -55,7 +55,7 @@ const ConfirmDeleteModal: React.FC<ConfirmDeleteModalProps> = ({{message}</p>{warning && (- <p className="mt-3 p-3 border rounded-md text-sm bg-yellow-100 dark:bg-yellow-900/30 border-yellow-300 dark:border-yellow-700 text-yellow-800 dark:text-yellow-300">+ <p className="mt-3 p-3 border rounded-md text-sm bg-amber-100 dark:bg-amber-900/30 border-amber-300 dark:border-amber-700 text-amber-800 dark:text-amber-300">{warning}</p>)}diff --git a/apps/browser-extension/src/entrypoints/popup/components/Folders/DeleteFolderModal.tsx b/apps/browser-extension/src/entrypoints/popup/components/Folders/DeleteFolderModal.tsxindex a264e6205..f6bd4fca7 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Folders/DeleteFolderModal.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Folders/DeleteFolderModal.tsx@@ -95,7 +95,7 @@ const DeleteFolderModal: React.FC<DeleteFolderModalProps> = ({className="w-full p-3 text-left border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50"><div className="flex items-start gap-3">- <div className="mt-0.5 text-orange-500">+ <div className="mt-0.5 text-primary-500"><Icon name="folder-check" className="w-5 h-5" /></div><div>diff --git a/apps/browser-extension/src/entrypoints/popup/components/Folders/FolderBreadcrumb.tsx b/apps/browser-extension/src/entrypoints/popup/components/Folders/FolderBreadcrumb.tsxindex d1f9fdb24..82173222c 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Folders/FolderBreadcrumb.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Folders/FolderBreadcrumb.tsx@@ -122,7 +122,7 @@ const FolderBreadcrumb: React.FC<FolderBreadcrumbProps> = ({) : (<buttononClick={() => handleBreadcrumbClick(rootPath)}- className="hover:text-orange-600 dark:hover:text-orange-400 transition-colors flex-shrink-0 flex items-center gap-1"+ className="hover:text-primary-600 dark:hover:text-primary-400 transition-colors flex-shrink-0 flex items-center gap-1"><Icon name="home" className="w-4 h-4" />{rootLabelText}@@ -136,7 +136,7 @@ const FolderBreadcrumb: React.FC<FolderBreadcrumbProps> = ({<Icon name="chevron-right" className="w-4 h-4 flex-shrink-0" /><buttononClick={() => handleBreadcrumbClick(crumbPath)}- className="hover:text-orange-600 dark:hover:text-orange-400 transition-colors truncate"+ className="hover:text-primary-600 dark:hover:text-primary-400 transition-colors truncate"title={crumb.name}>{crumb.name}diff --git a/apps/browser-extension/src/entrypoints/popup/components/Items/CurrentSiteSuggestion.tsx b/apps/browser-extension/src/entrypoints/popup/components/Items/CurrentSiteSuggestion.tsxindex baf9825a6..51550395a 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Items/CurrentSiteSuggestion.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Items/CurrentSiteSuggestion.tsx@@ -58,20 +58,20 @@ const CurrentSiteSuggestion: React.FC<CurrentSiteSuggestionProps> = ({ items, onreturn (<buttononClick={() => navigate(itemRoute(item))}- className="w-full mb-4 p-2 flex items-center gap-2 rounded-lg border border-orange-300 dark:border-orange-500/40 bg-orange-50 dark:bg-orange-900/20 hover:bg-orange-100 dark:hover:bg-orange-900/30 transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500 text-left"+ className="w-full mb-4 p-2 flex items-center gap-2 rounded-lg border border-primary-300 dark:border-primary-500/40 bg-primary-50 dark:bg-primary-900/20 hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 text-left"><div className="w-8 h-8 flex-shrink-0"><ItemIcon item={item} className="w-8 h-8" /></div><div className="min-w-0 flex-1">- <p className="text-xs font-medium text-orange-700 dark:text-orange-300 truncate">+ <p className="text-xs font-medium text-primary-700 dark:text-primary-300 truncate">{t('items.currentSiteMatch', { domain })}</p><p className="font-medium text-gray-900 dark:text-white truncate">{item.Name || t('items.untitled')}</p></div>- <Icon name="chevron-right" className="w-5 h-5 flex-shrink-0 text-orange-500 dark:text-orange-400" />+ <Icon name="chevron-right" className="w-5 h-5 flex-shrink-0 text-primary-500 dark:text-primary-400" /></button>);}@@ -81,13 +81,13 @@ const CurrentSiteSuggestion: React.FC<CurrentSiteSuggestionProps> = ({ items, onreturn (<buttononClick={() => onSearch(domain)}- className="w-full mb-4 p-2 flex items-center gap-2 rounded-lg border border-orange-300 dark:border-orange-500/40 bg-orange-50 dark:bg-orange-900/20 hover:bg-orange-100 dark:hover:bg-orange-900/30 transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500 text-left"+ className="w-full mb-4 p-2 flex items-center gap-2 rounded-lg border border-primary-300 dark:border-primary-500/40 bg-primary-50 dark:bg-primary-900/20 hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 text-left">- <Icon name="search" className="w-5 h-5 flex-shrink-0 text-orange-500 dark:text-orange-400" />- <span className="min-w-0 text-sm flex-1 font-medium text-orange-700 dark:text-orange-300 truncate">+ <Icon name="search" className="w-5 h-5 flex-shrink-0 text-primary-500 dark:text-primary-400" />+ <span className="min-w-0 text-sm flex-1 font-medium text-primary-700 dark:text-primary-300 truncate">{domain} ({t('items.numberOfItemMatchesFound', { count: matches.length })})</span>- <Icon name="chevron-right" className="w-5 h-5 flex-shrink-0 text-orange-500 dark:text-orange-400" />+ <Icon name="chevron-right" className="w-5 h-5 flex-shrink-0 text-primary-500 dark:text-primary-400" /></button>);}diff --git a/apps/browser-extension/src/entrypoints/popup/components/Items/Details/TotpBlock.tsx b/apps/browser-extension/src/entrypoints/popup/components/Items/Details/TotpBlock.tsxindex f3272aaa6..95a733454 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Items/Details/TotpBlock.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Items/Details/TotpBlock.tsx@@ -164,7 +164,7 @@ const TotpBlock: React.FC<TotpBlockProps> = ({ itemId, manifestId }) => {</div><div className="w-1 h-6 bg-gray-200 rounded-full dark:bg-gray-600"><div- className="bg-blue-600 rounded-full transition-all"+ className="bg-primary-500 rounded-full transition-all"style={{ height: `${getTotpElapsedPercentage(totpCode)}%`, width: '100%' }}/></div>diff --git a/apps/browser-extension/src/entrypoints/popup/components/Items/FolderPill.tsx b/apps/browser-extension/src/entrypoints/popup/components/Items/FolderPill.tsxindex 32376594a..863c40f0e 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Items/FolderPill.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Items/FolderPill.tsx@@ -30,13 +30,13 @@ const FolderPill: React.FC<IFolderPillProps> = ({ folder, onClick, isActive = farole="option"aria-selected={isActive}onClick={onClick}- className={`inline-flex items-center gap-1.5 px-3 py-1.5 bg-white dark:bg-gray-700/50 hover:bg-gray-50 dark:hover:bg-gray-600/50 rounded-full text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500/50 border ${+ className={`inline-flex items-center gap-1.5 px-3 py-1.5 bg-white dark:bg-gray-700/50 hover:bg-gray-50 dark:hover:bg-gray-600/50 rounded-full text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500/50 border ${isActive- ? 'border-orange-500 dark:border-orange-400 ring-2 ring-orange-500/40'+ ? 'border-primary-500 dark:border-primary-400 ring-2 ring-primary-500/40': 'border-gray-200 dark:border-gray-600'}`}>- <FolderIcon isShared={isShared} className="w-3.5 h-3.5 text-orange-500 dark:text-orange-400" />+ <FolderIcon isShared={isShared} className="w-3.5 h-3.5 text-primary-500 dark:text-primary-400" /><span className="text-gray-700 dark:text-gray-200 font-medium truncate max-w-[120px]">{folder.name}</span>diff --git a/apps/browser-extension/src/entrypoints/popup/components/Items/ItemFilterDropdown.tsx b/apps/browser-extension/src/entrypoints/popup/components/Items/ItemFilterDropdown.tsxindex d7c42a8b1..f60323c86 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Items/ItemFilterDropdown.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Items/ItemFilterDropdown.tsx@@ -58,7 +58,7 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({const itemRowClass = (selected: boolean) : string =>`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${selected- ? 'bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400'+ ? 'bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400': 'text-gray-700 dark:text-gray-300'}`;@@ -81,7 +81,7 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({className="flex items-center gap-1 text-gray-900 dark:text-white text-xl hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none min-w-0"><h2 className="flex items-baseline gap-1.5 min-w-0 overflow-hidden">- {titleFolder && <FolderIcon isShared={titleFolder.isShared} className="w-4 h-4 self-center text-orange-500 dark:text-orange-400" />}+ {titleFolder && <FolderIcon isShared={titleFolder.isShared} className="w-4 h-4 self-center text-primary-500 dark:text-primary-400" />}<span className="truncate">{title}</span>{count !== undefined && (<span className="text-sm text-gray-500 dark:text-gray-400 shrink-0">@@ -118,7 +118,7 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({className="absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1.5 px-2 py-1 text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 rounded hover:bg-gray-200 dark:hover:bg-gray-600"><span>{t('items.filters.showFolders')}</span>- <Icon name={showFolders ? 'square-check' : 'square-feather'} className={`w-5 h-5 ${showFolders ? 'text-orange-500 dark:text-orange-400' : 'text-gray-400 dark:text-gray-500'}`} />+ <Icon name={showFolders ? 'square-check' : 'square-feather'} className={`w-5 h-5 ${showFolders ? 'text-primary-500 dark:text-primary-400' : 'text-gray-400 dark:text-gray-500'}`} /></button>)}</div>@@ -131,7 +131,7 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({onClick={() => handleSelectFilter(option.type)}className={`${itemRowClass(selected)} flex items-center gap-2`}>- <span className={selected ? 'text-orange-500 dark:text-orange-400' : 'text-gray-400 dark:text-gray-500'}>+ <span className={selected ? 'text-primary-500 dark:text-primary-400' : 'text-gray-400 dark:text-gray-500'}>{option.iconSvg}</span>{t(option.titleKey)}@@ -164,7 +164,7 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({><span>{t('items.recentlyDeleted.title')}</span>{recentlyDeletedCount > 0 && (- <span className={activeFilter === 'deleted' ? 'text-orange-500 dark:text-orange-400' : 'text-gray-400 dark:text-gray-500'}>+ <span className={activeFilter === 'deleted' ? 'text-primary-500 dark:text-primary-400' : 'text-gray-400 dark:text-gray-500'}>{recentlyDeletedCount}</span>)}diff --git a/apps/browser-extension/src/entrypoints/popup/components/LoginServerInfo.tsx b/apps/browser-extension/src/entrypoints/popup/components/LoginServerInfo.tsxindex e722a52ac..d4ec18f00 100644--- a/apps/browser-extension/src/entrypoints/popup/components/LoginServerInfo.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/LoginServerInfo.tsx@@ -32,7 +32,7 @@ const LoginServerInfo: React.FC = () => {<buttononClick={handleClick}type="button"- className="text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500 underline"+ className="text-primary-500 hover:text-primary-600 dark:text-primary-400 dark:hover:text-primary-500 underline">{getDisplayUrl()}</button>)diff --git a/apps/browser-extension/src/entrypoints/popup/components/PasswordStrengthIndicator.tsx b/apps/browser-extension/src/entrypoints/popup/components/PasswordStrengthIndicator.tsxindex a4d68332f..c0e5295b3 100644--- a/apps/browser-extension/src/entrypoints/popup/components/PasswordStrengthIndicator.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/PasswordStrengthIndicator.tsx@@ -3,8 +3,10 @@ import React from 'react';import { useTranslation } from 'react-i18next';const LABEL_KEYS = ['veryWeak', 'weak', 'fair', 'good', 'strong'];+/* eslint-disable no-restricted-syntax -- strength scale (orange = very weak), not the brand color */const BAR_COLORS = ['bg-orange-400 dark:bg-orange-500', 'bg-yellow-500 dark:bg-yellow-600', 'bg-green-500 dark:bg-green-600', 'bg-green-600 dark:bg-green-700', 'bg-green-700 dark:bg-green-800'];const TEXT_COLORS = ['text-orange-600 dark:text-orange-400', 'text-yellow-600 dark:text-yellow-400', 'text-green-600 dark:text-green-400', 'text-green-700 dark:text-green-300', 'text-green-800 dark:text-green-200'];+/* eslint-enable no-restricted-syntax */type PasswordStrengthIndicatorProps = {/** The password to rate, the indicator hides itself while this is empty. */diff --git a/apps/browser-extension/src/entrypoints/popup/pages/auth/Login.tsx b/apps/browser-extension/src/entrypoints/popup/pages/auth/Login.tsxindex 4715709bb..2c50748db 100644--- a/apps/browser-extension/src/entrypoints/popup/pages/auth/Login.tsx+++ b/apps/browser-extension/src/entrypoints/popup/pages/auth/Login.tsx@@ -531,7 +531,7 @@ const Login: React.FC = () => {href={clientUrl ?? ''}target="_blank"rel="noopener noreferrer"- className="text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500"+ className="text-primary-500 hover:text-primary-600 dark:text-primary-400 dark:hover:text-primary-500">{t('auth.createNewVault')}</a>diff --git a/apps/browser-extension/src/entrypoints/popup/pages/auth/Upgrade.tsx b/apps/browser-extension/src/entrypoints/popup/pages/auth/Upgrade.tsxindex b6346cc58..455010c33 100644--- a/apps/browser-extension/src/entrypoints/popup/pages/auth/Upgrade.tsx+++ b/apps/browser-extension/src/entrypoints/popup/pages/auth/Upgrade.tsx@@ -460,7 +460,7 @@ const Upgrade: React.FC = () => {<div className="space-y-2"><div className="flex justify-between items-center"><span className="text-sm text-gray-600 dark:text-gray-400">{t('upgrade.yourVault')}</span>- <span className="text-sm font-bold text-orange-600 dark:text-orange-400">+ <span className="text-sm font-bold text-primary-600 dark:text-primary-400">{currentVersion?.compatibleUpToVersion ?? '...'}</span></div>@@ -475,7 +475,7 @@ const Upgrade: React.FC = () => {)}{kind === UpgradeKind.StorageFormat && (- <div className="bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-900 rounded p-4 text-sm text-orange-800 dark:text-orange-300">+ <div className="bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-900 rounded p-4 text-sm text-amber-800 dark:text-amber-300">{t('upgrade.otherDevicesWarning', { version: AppInfo.API_VERSION })}</div>)}diff --git a/apps/browser-extension/src/entrypoints/popup/pages/items/ItemsList.tsx b/apps/browser-extension/src/entrypoints/popup/pages/items/ItemsList.tsxindex e153ce401..29a3d7b08 100644--- a/apps/browser-extension/src/entrypoints/popup/pages/items/ItemsList.tsx+++ b/apps/browser-extension/src/entrypoints/popup/pages/items/ItemsList.tsx@@ -901,7 +901,7 @@ const ItemsList: React.FC = () => {<buttononClick={() => setShowEditFolderModal(true)}title={t('items.folders.editFolder')}- className="p-1.5 text-gray-400 hover:text-orange-500 dark:text-gray-500 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"+ className="p-1.5 text-gray-400 hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"><Icon name="pencil-alt" className="w-4 h-4" /></button>@@ -945,7 +945,7 @@ const ItemsList: React.FC = () => {});}}className={`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2 ${- sortOrder === option.value ? 'text-orange-600 dark:text-orange-400' : 'text-gray-700 dark:text-gray-300'+ sortOrder === option.value ? 'text-primary-600 dark:text-primary-400' : 'text-gray-700 dark:text-gray-300'}`}>{sortOrder === option.value ? (@@ -1038,7 +1038,7 @@ const ItemsList: React.FC = () => {setItemFilterType(ItemFilter.All);localStorage.removeItem(FILTER_STORAGE_KEY);}}- className="inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-orange-100 dark:bg-orange-900/30 hover:bg-orange-200 dark:hover:bg-orange-900/50 text-orange-700 dark:text-orange-300 rounded-lg transition-colors"+ className="inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-primary-100 dark:bg-primary-900/30 hover:bg-primary-200 dark:hover:bg-primary-900/50 text-primary-700 dark:text-primary-300 rounded-lg transition-colors"><Icon name="x" className="w-4 h-4" />{t('items.clearFilter')}@@ -1067,7 +1067,7 @@ const ItemsList: React.FC = () => {{canCreateSubfolder && (<buttononClick={handleAddFolder}- className="inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none text-gray-500 dark:text-gray-400 hover:text-orange-600 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700/50"+ className="inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none text-gray-500 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-700/50"><Icon name="folder" className="w-3.5 h-3.5" /><Icon name="plus" className="w-3 h-3 -ml-0.5" strokeWidth={2.5} />@@ -1102,8 +1102,8 @@ const ItemsList: React.FC = () => {onClick={handleAddFolder}className={`inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none ${folders.length > 0- ? 'text-gray-500 dark:text-gray-400 hover:text-orange-600 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700/50'- : 'text-gray-400 dark:text-gray-500 border border-dashed border-gray-300 dark:border-gray-600 hover:border-orange-400 dark:hover:border-orange-500 hover:text-orange-600 dark:hover:text-orange-400'+ ? 'text-gray-500 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-700/50'+ : 'text-gray-400 dark:text-gray-500 border border-dashed border-gray-300 dark:border-gray-600 hover:border-primary-400 dark:hover:border-primary-500 hover:text-primary-600 dark:hover:text-primary-400'}`}><Icon name="folder" className="w-3.5 h-3.5" />@@ -1167,7 +1167,7 @@ const ItemsList: React.FC = () => {setItemFilterType(ItemFilter.All);localStorage.removeItem(FILTER_STORAGE_KEY);}}- className="inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-orange-100 dark:bg-orange-900/30 hover:bg-orange-200 dark:hover:bg-orange-900/50 text-orange-700 dark:text-orange-300 rounded-lg transition-colors"+ className="inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-primary-100 dark:bg-primary-900/30 hover:bg-primary-200 dark:hover:bg-primary-900/50 text-primary-700 dark:text-primary-300 rounded-lg transition-colors"><Icon name="x" className="w-4 h-4" />{t('items.clearFilter')}diff --git a/apps/browser-extension/src/entrypoints/popup/pages/settings/FamilySharingSettings.tsx b/apps/browser-extension/src/entrypoints/popup/pages/settings/FamilySharingSettings.tsxindex e8a0646c8..2b25c2e3a 100644--- a/apps/browser-extension/src/entrypoints/popup/pages/settings/FamilySharingSettings.tsx+++ b/apps/browser-extension/src/entrypoints/popup/pages/settings/FamilySharingSettings.tsx@@ -386,7 +386,7 @@ const FamilySharingSettings: React.FC = () => {{receivedInvitations.map(invitation => (<div key={invitation.id} className="p-3 space-y-2 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-primary-400 dark:border-primary-500 ring-2 ring-primary-200 dark:ring-primary-900/60"><div className="flex items-center gap-2 min-w-0">- <FolderIcon isShared className="w-4 h-4 text-orange-500 dark:text-orange-400" />+ <FolderIcon isShared className="w-4 h-4 text-primary-500 dark:text-primary-400" /><div className="min-w-0"><p className="font-medium text-gray-900 dark:text-white truncate">{invitationNames[invitation.id] ?? familySharingText.sharedVault}</p><p className="text-sm text-gray-500 dark:text-gray-400">{familySharingText.invitedBy(invitation.inviterUsername)}</p>@@ -468,13 +468,13 @@ const FamilySharingSettings: React.FC = () => {<div className="flex items-center justify-between gap-2 -mx-1.5 -mt-1.5">{hasFolder ? (<button onClick={() => navigate(`/items/folder/${folderId}/${folderId}`)} className="flex flex-1 items-center gap-2 min-w-0 px-1.5 py-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">- <FolderIcon isShared className="w-4 h-4 text-orange-500 dark:text-orange-400" />+ <FolderIcon isShared className="w-4 h-4 text-primary-500 dark:text-primary-400" /><span className="font-medium text-gray-900 dark:text-white truncate">{vaultLabel(manifest)}</span><Icon name="chevron-right" className="w-4 h-4 ml-auto shrink-0 text-gray-400" /></button>) : (<div className="flex flex-1 items-center gap-2 min-w-0 px-1.5 py-1">- <FolderIcon isShared className="w-4 h-4 text-orange-500 dark:text-orange-400" />+ <FolderIcon isShared className="w-4 h-4 text-primary-500 dark:text-primary-400" /><span className="font-medium text-gray-900 dark:text-white truncate">{vaultLabel(manifest)}</span></div>)}diff --git a/apps/browser-extension/tailwind.config.js b/apps/browser-extension/tailwind.config.jsindex 7bdbe9820..25c5d4a68 100644--- a/apps/browser-extension/tailwind.config.js+++ b/apps/browser-extension/tailwind.config.js@@ -1,3 +1,5 @@+import aliasvaultColors from "../../core/models/src/colors/tailwind-preset.cjs";+/** @type {import('tailwindcss').Config} */export default {content: [@@ -5,24 +7,7 @@ export default {// Test fixtures are not shipped, so strip out of CSS."!./src/**/__tests__/**"],+ presets: [aliasvaultColors],darkMode: 'class',- theme: {- extend: {- colors: {- primary: {- "900": "#7b4a1e",- "800": "#9a5d26",- "700": "#b8702f",- "600": "#d68338",- "500": "#f49541",- "400": "#f6a752",- "300": "#f8b963",- "200": "#fbcb74",- "100": "#fdde85",- "50": "#ffe096"- }- }- }- },plugins: [],}\ No newline at end of filediff --git a/apps/mobile-app/android/app/src/main/res/layout/fragment_passkey_form.xml b/apps/mobile-app/android/app/src/main/res/layout/fragment_passkey_form.xmlindex 3c9c8ab75..bcaa76e5c 100644--- a/apps/mobile-app/android/app/src/main/res/layout/fragment_passkey_form.xml+++ b/apps/mobile-app/android/app/src/main/res/layout/fragment_passkey_form.xml@@ -187,7 +187,7 @@android:id="@+id/errorText"android:layout_width="match_parent"android:layout_height="wrap_content"- android:textColor="@color/av_error"+ android:textColor="@color/av_destructive"android:textSize="14sp"android:layout_marginBottom="16dp"android:visibility="gone" />diff --git a/apps/mobile-app/android/app/src/main/res/values-night/av_colors.xml b/apps/mobile-app/android/app/src/main/res/values-night/av_colors.xmlnew file mode 100644index 000000000..7c059cf11--- /dev/null+++ b/apps/mobile-app/android/app/src/main/res/values-night/av_colors.xml@@ -0,0 +1,26 @@+<?xml version="1.0" encoding="utf-8"?>+<!--+ <auto-generated />+ This file is auto-generated from core/models/src/colors/palette.json by core/models/scripts/generate-colors.cjs.+ Do not edit this file directly. Run 'node core/models/scripts/generate-colors.cjs' to regenerate.+-->+<resources>+ <color name="av_text">#ecedee</color>+ <color name="av_text_muted">#9ba1a6</color>+ <color name="av_background">#000000</color>+ <color name="av_accent_background">#202020</color>+ <color name="av_accent_border">#444444</color>+ <color name="av_primary">#f49541</color>+ <color name="av_primary_surface_text">#ffffff</color>+ <color name="av_secondary">#6b7280</color>+ <color name="av_tertiary">#eabf69</color>+ <color name="av_icon">#9ba1a6</color>+ <color name="av_success">#10b981</color>+ <color name="av_success_background">#1a3d2b</color>+ <color name="av_warning">#f59e0b</color>+ <color name="av_warning_background">#422006</color>+ <color name="av_info">#3b82f6</color>+ <color name="av_info_background">#1e3a5f</color>+ <color name="av_destructive">#ef4444</color>+ <color name="av_primary_ripple">#33f49541</color>+</resources>diff --git a/apps/mobile-app/android/app/src/main/res/values-night/colors.xml b/apps/mobile-app/android/app/src/main/res/values-night/colors.xmlindex 86d8666a4..4782bbe78 100644--- a/apps/mobile-app/android/app/src/main/res/values-night/colors.xml+++ b/apps/mobile-app/android/app/src/main/res/values-night/colors.xml@@ -1,15 +1,5 @@<resources>+ <!-- The theme colors (av_*) are generated into av_colors.xml from core/models/src/colors/palette.json. --><color name="splashscreen_background">#202020</color>- <color name="av_text">#ECEDEE</color>- <color name="av_text_muted">#9BA1A6</color>- <color name="av_background">#000000</color>- <color name="av_accent_background">#202020</color>- <color name="av_accent_border">#444444</color>- <color name="av_primary">#f49541</color>- <color name="av_primary_ripple">#33f49541</color>- <color name="av_secondary">#6b7280</color>- <color name="av_tertiary">#eabf69</color>- <color name="av_icon">#9BA1A6</color>- <color name="av_error">#ef4444</color><color name="av_loading_overlay">#CC000000</color>-</resources>\ No newline at end of file+</resources>diff --git a/apps/mobile-app/android/app/src/main/res/values/av_colors.xml b/apps/mobile-app/android/app/src/main/res/values/av_colors.xmlnew file mode 100644index 000000000..44f887786--- /dev/null+++ b/apps/mobile-app/android/app/src/main/res/values/av_colors.xml@@ -0,0 +1,26 @@+<?xml version="1.0" encoding="utf-8"?>+<!--+ <auto-generated />+ This file is auto-generated from core/models/src/colors/palette.json by core/models/scripts/generate-colors.cjs.+ Do not edit this file directly. Run 'node core/models/scripts/generate-colors.cjs' to regenerate.+-->+<resources>+ <color name="av_text">#11181c</color>+ <color name="av_text_muted">#4b5563</color>+ <color name="av_background">#f3f2f7</color>+ <color name="av_accent_background">#ffffff</color>+ <color name="av_accent_border">#d1d5db</color>+ <color name="av_primary">#f49541</color>+ <color name="av_primary_surface_text">#ffffff</color>+ <color name="av_secondary">#6b7280</color>+ <color name="av_tertiary">#eabf69</color>+ <color name="av_icon">#687076</color>+ <color name="av_success">#10b981</color>+ <color name="av_success_background">#dcfce7</color>+ <color name="av_warning">#d97706</color>+ <color name="av_warning_background">#fef3c7</color>+ <color name="av_info">#2563eb</color>+ <color name="av_info_background">#dbeafe</color>+ <color name="av_destructive">#ef4444</color>+ <color name="av_primary_ripple">#33f49541</color>+</resources>diff --git a/apps/mobile-app/android/app/src/main/res/values/colors.xml b/apps/mobile-app/android/app/src/main/res/values/colors.xmlindex fca018d0a..358fdd9bd 100644--- a/apps/mobile-app/android/app/src/main/res/values/colors.xml+++ b/apps/mobile-app/android/app/src/main/res/values/colors.xml@@ -1,30 +1,9 @@<resources>+ <!-- The theme colors (av_*) are generated into av_colors.xml from core/models/src/colors/palette.json. --><color name="splashscreen_background">#ffffff</color><color name="ic_launcher_background">#FFFFFF</color>- <color name="colorPrimary">#023c69</color>- <color name="av_light_text">#11181C</color>- <color name="av_light_text_muted">#4b5563</color>- <color name="av_light_background">#f3f4f6</color>- <color name="av_light_accent_background">#ffffff</color>- <color name="av_light_accent_border">#d1d5db</color>- <color name="av_light_primary">#f49541</color>- <color name="av_light_secondary">#6b7280</color>- <color name="av_light_tertiary">#eabf69</color>- <color name="av_light_icon">#687076</color>- <color name="av_light_error">#D32F2F</color>- <color name="av_text">#11181C</color>- <color name="av_text_muted">#4b5563</color>- <color name="av_background">#f3f4f6</color>- <color name="av_accent_background">#ffffff</color>- <color name="av_accent_border">#d1d5db</color>- <color name="av_primary">#f49541</color>- <color name="av_primary_ripple">#33f49541</color>- <color name="av_secondary">#6b7280</color>- <color name="av_tertiary">#eabf69</color>- <color name="av_icon">#687076</color>- <color name="av_error">#D32F2F</color><color name="av_loading_overlay">#CCFFFFFF</color><color name="primary">@color/av_primary</color><color name="iconBackground">#000000</color><color name="colorPrimaryDark">#ffffff</color>-</resources>\ No newline at end of file+</resources>diff --git a/apps/mobile-app/android/app/src/main/res/values/styles.xml b/apps/mobile-app/android/app/src/main/res/values/styles.xmlindex 0cf54e249..d5c4437ce 100644--- a/apps/mobile-app/android/app/src/main/res/values/styles.xml+++ b/apps/mobile-app/android/app/src/main/res/values/styles.xml@@ -2,7 +2,7 @@<style name="AppTheme" parent="Theme.EdgeToEdge"><item name="android:textColor">@android:color/black</item><item name="android:editTextStyle">@style/ResetEditText</item>- <item name="colorPrimary">@color/colorPrimary</item>+ <item name="colorPrimary">@color/av_primary</item><item name="enforceNavigationBarContrast">false</item></style><style name="ResetEditText" parent="@android:style/Widget.EditText">diff --git a/apps/mobile-app/components/Toast.tsx b/apps/mobile-app/components/Toast.tsxindex 420371241..22d2c1c8b 100644--- a/apps/mobile-app/components/Toast.tsx+++ b/apps/mobile-app/components/Toast.tsx@@ -1,3 +1,4 @@+import { ThemeColors } from '@aliasvault/models/colors';import { View, Text, StyleSheet } from 'react-native';import { useSafeAreaInsets } from 'react-native-safe-area-context';import Toast from 'react-native-toast-message';@@ -10,9 +11,9 @@ type ErrorToastProps = BaseToastProps & {text2?: string;};-const primaryColor = '#f97316';-const errorColor = '#dc2626';-const infoColor = '#3b82f6';+const primaryColor = ThemeColors.light.primary;+const errorColor = ThemeColors.light.destructive;+const infoColor = ThemeColors.light.info;const shadowColor = '#000';const textColor = '#fff';diff --git a/apps/mobile-app/constants/Colors.ts b/apps/mobile-app/constants/Colors.tsindex 8f25955c5..e49bd0434 100644--- a/apps/mobile-app/constants/Colors.ts+++ b/apps/mobile-app/constants/Colors.ts@@ -1,84 +1,53 @@+import { ThemeColors as SharedColors } from '@aliasvault/models/colors';+/**- * Below are the colors that are used in the app. The colors are defined in the light and dark mode.- * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.+ * The colors used in the app, per color scheme. The shared theme colors come from core/models/src/colors/palette.json,+ * the keys below them are specific to the React Native app.*/-export const Colors = {light: {+ ...SharedColors.light,white: '#ffffff',- text: '#11181C',- textMuted: '#4b5563',- background: '#f3f2f7',- accentBackground: '#fff',- accentBorder: '#d1d5db',errorBackground: '#f8d7da',errorBorder: '#f8d7da',errorText: '#842029',- tint: '#f49541',- icon: '#687076',- tabIconDefault: '#687076',- tabIconSelected: '#f49541',- headerBackgroundAndroid: '#f3f2f7',+ tint: SharedColors.light.primary,+ tabIconDefault: SharedColors.light.icon,+ tabIconSelected: SharedColors.light.primary,+ headerBackgroundAndroid: SharedColors.light.background,headerBackgroundIos: 'rgba(255, 255, 255, 0.7)',headerBorder: '#eae9eb',tabBarBackground: '#fff',- primary: '#f49541',- primarySurfaceText: '#ffffff',- secondary: '#6b7280',- tertiary: '#eabf69',loginHeader: '#f6dfc4',greenBackground: '#22c55e',skeleton: 'rgba(98, 98, 98, 0.33)',red: '#ff0000',black: '#000000',modalBackground: 'rgba(75, 85, 99, 0.6)',- modalSurface: '#f3f2f7',+ modalSurface: SharedColors.light.background,modalSurfaceRaised: '#ffffff',- success: '#10B981',- successBackground: '#dcfce7',- warning: '#d97706',- warningBackground: '#fef3c7',- info: '#2563eb',- infoBackground: '#dbeafe',- destructive: '#EF4444',},dark: {+ ...SharedColors.dark,white: '#ffffff',- text: '#ECEDEE',- textMuted: '#9BA1A6',- background: '#000000',- accentBackground: '#202020',- accentBorder: '#444444',errorBackground: '#3d1a1e',errorBorder: '#9c2530',errorText: '#fae1e3',- tint: '#f49541',- icon: '#9BA1A6',- tabIconDefault: '#9BA1A6',- tabIconSelected: '#f49541',- headerBackgroundAndroid: '#000000',+ tint: SharedColors.dark.primary,+ tabIconDefault: SharedColors.dark.icon,+ tabIconSelected: SharedColors.dark.primary,+ headerBackgroundAndroid: SharedColors.dark.background,headerBackgroundIos: 'rgba(0, 0, 0, 0.3)',headerBorder: '#2f2e30',tabBarBackground: '#000000',- primary: '#f49541',- primarySurfaceText: '#ffffff',- secondary: '#6b7280',- tertiary: '#eabf69',loginHeader: '#5c4331',greenBackground: '#22c55e',- skeleton: '#rgba(255,255,255,0.2)',+ skeleton: 'rgba(255, 255, 255, 0.2)',red: '#ff0000',black: '#000000',modalBackground: 'rgba(0, 0, 0, 0.7)',modalSurface: '#1c1c1e',modalSurfaceRaised: '#2c2c2e',- success: '#10B981',- successBackground: '#1a3d2b',- warning: '#f59e0b',- warningBackground: '#422006',- info: '#3b82f6',- infoBackground: '#1e3a5f',- destructive: '#EF4444',},} as const;diff --git a/apps/mobile-app/ios/VaultUI/ColorConstants.swift b/apps/mobile-app/ios/VaultUI/ColorConstants.swiftindex dd5643c20..e9d99951c 100644--- a/apps/mobile-app/ios/VaultUI/ColorConstants.swift+++ b/apps/mobile-app/ios/VaultUI/ColorConstants.swift@@ -1,31 +1,51 @@+// <auto-generated />+// This file is auto-generated from core/models/src/colors/palette.json by core/models/scripts/generate-colors.cjs.+// Do not edit this file directly. Run 'node core/models/scripts/generate-colors.cjs' to regenerate.+import SwiftUI/// Color constants for the apppublic struct ColorConstants {/// Light mode colorspublic struct Light {- public static let text = SwiftUI.Color(hex: "#11181C")+ public static let text = SwiftUI.Color(hex: "#11181c")public static let textMuted = SwiftUI.Color(hex: "#4b5563")- public static let background = SwiftUI.Color(hex: "#f3f4f6")+ public static let background = SwiftUI.Color(hex: "#f3f2f7")public static let accentBackground = SwiftUI.Color(hex: "#ffffff")public static let accentBorder = SwiftUI.Color(hex: "#d1d5db")public static let primary = SwiftUI.Color(hex: "#f49541")+ public static let primarySurfaceText = SwiftUI.Color(hex: "#ffffff")public static let secondary = SwiftUI.Color(hex: "#6b7280")public static let tertiary = SwiftUI.Color(hex: "#eabf69")public static let icon = SwiftUI.Color(hex: "#687076")+ public static let success = SwiftUI.Color(hex: "#10b981")+ public static let successBackground = SwiftUI.Color(hex: "#dcfce7")+ public static let warning = SwiftUI.Color(hex: "#d97706")+ public static let warningBackground = SwiftUI.Color(hex: "#fef3c7")+ public static let info = SwiftUI.Color(hex: "#2563eb")+ public static let infoBackground = SwiftUI.Color(hex: "#dbeafe")+ public static let destructive = SwiftUI.Color(hex: "#ef4444")}/// Dark mode colorspublic struct Dark {- public static let text = SwiftUI.Color(hex: "#ECEDEE")- public static let textMuted = SwiftUI.Color(hex: "#9BA1A6")+ public static let text = SwiftUI.Color(hex: "#ecedee")+ public static let textMuted = SwiftUI.Color(hex: "#9ba1a6")public static let background = SwiftUI.Color(hex: "#000000")public static let accentBackground = SwiftUI.Color(hex: "#202020")public static let accentBorder = SwiftUI.Color(hex: "#444444")public static let primary = SwiftUI.Color(hex: "#f49541")+ public static let primarySurfaceText = SwiftUI.Color(hex: "#ffffff")public static let secondary = SwiftUI.Color(hex: "#6b7280")public static let tertiary = SwiftUI.Color(hex: "#eabf69")- public static let icon = SwiftUI.Color(hex: "#9BA1A6")+ public static let icon = SwiftUI.Color(hex: "#9ba1a6")+ public static let success = SwiftUI.Color(hex: "#10b981")+ public static let successBackground = SwiftUI.Color(hex: "#1a3d2b")+ public static let warning = SwiftUI.Color(hex: "#f59e0b")+ public static let warningBackground = SwiftUI.Color(hex: "#422006")+ public static let info = SwiftUI.Color(hex: "#3b82f6")+ public static let infoBackground = SwiftUI.Color(hex: "#1e3a5f")+ public static let destructive = SwiftUI.Color(hex: "#ef4444")}/// Get colors for the specified color scheme@@ -43,9 +63,17 @@ public struct ColorConstants {static var accentBackground: Color { get }static var accentBorder: Color { get }static var primary: Color { get }+ static var primarySurfaceText: Color { get }static var secondary: Color { get }static var tertiary: Color { get }static var icon: Color { get }+ static var success: Color { get }+ static var successBackground: Color { get }+ static var warning: Color { get }+ static var warningBackground: Color { get }+ static var info: Color { get }+ static var infoBackground: Color { get }+ static var destructive: Color { get }}}diff --git a/apps/server/AliasVault.Admin/tailwind.config.js b/apps/server/AliasVault.Admin/tailwind.config.jsindex b75825d8f..dae28bc9a 100644--- a/apps/server/AliasVault.Admin/tailwind.config.js+++ b/apps/server/AliasVault.Admin/tailwind.config.js@@ -1,3 +1,5 @@+const aliasvaultColors = require('../../../core/models/src/colors/tailwind-preset.cjs');+/** @type {import('tailwindcss').Config} */module.exports = {content: [@@ -21,24 +23,10 @@ module.exports = {'bg-opacity-50','dark:bg-opacity-80'],+ presets: [aliasvaultColors],darkMode: "class",theme: {extend: {- colors: {- primary: {- "900": "#7b4a1e",- "800": "#9a5d26",- "700": "#b8702f",- "600": "#d68338",- "500": "#f49541",- "400": "#f6a752",- "300": "#f8b963",- "200": "#fbcb74",- "100": "#fdde85",- "50": "#ffe096"- }-- },fontFamily: {'sans': ['Inter', 'ui-sans-serif', 'system-ui', '-apple-system', 'system-ui', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', 'Noto Sans', 'sans-serif', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'],'body': ['Inter', 'ui-sans-serif', 'system-ui', '-apple-system', 'system-ui', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', 'Noto Sans', 'sans-serif', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'],diff --git a/apps/server/AliasVault.Admin/wwwroot/css/tailwind.css b/apps/server/AliasVault.Admin/wwwroot/css/tailwind.cssindex ea18c6e85..7891cea72 100644--- a/apps/server/AliasVault.Admin/wwwroot/css/tailwind.css+++ b/apps/server/AliasVault.Admin/wwwroot/css/tailwind.css@@ -952,15 +952,15 @@ video {width: 100%;}+.min-w-0 {+ min-width: 0px;+}+.min-w-max {min-width: -moz-max-content;min-width: max-content;}-.min-w-0 {- min-width: 0px;-}-.max-w-2xl {max-width: 42rem;}@@ -1266,11 +1266,6 @@ video {border-color: rgb(209 213 219 / var(--tw-border-opacity));}-.border-green-200 {- --tw-border-opacity: 1;- border-color: rgb(187 247 208 / var(--tw-border-opacity));-}-.border-orange-500 {--tw-border-opacity: 1;border-color: rgb(249 115 22 / var(--tw-border-opacity));@@ -1286,6 +1281,11 @@ video {border-color: rgb(244 149 65 / var(--tw-border-opacity));}+.border-primary-600 {+ --tw-border-opacity: 1;+ border-color: rgb(214 131 56 / var(--tw-border-opacity));+}+.border-red-200 {--tw-border-opacity: 1;border-color: rgb(254 202 202 / var(--tw-border-opacity));@@ -1301,11 +1301,6 @@ video {border-color: rgb(234 179 8 / var(--tw-border-opacity));}-.border-primary-600 {- --tw-border-opacity: 1;- border-color: rgb(214 131 56 / var(--tw-border-opacity));-}-.bg-blue-100 {--tw-bg-opacity: 1;background-color: rgb(219 234 254 / var(--tw-bg-opacity));@@ -1474,10 +1469,6 @@ video {--tw-bg-opacity: 0.5;}-.fill-current {- fill: currentColor;-}-.fill-primary-600 {fill: #d68338;}@@ -2081,11 +2072,6 @@ video {--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity));}-.focus\:ring-gray-500:focus {- --tw-ring-opacity: 1;- --tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity));-}-.focus\:ring-green-300:focus {--tw-ring-opacity: 1;--tw-ring-color: rgb(134 239 172 / var(--tw-ring-opacity));@@ -2398,11 +2384,6 @@ video {color: rgb(250 204 21 / var(--tw-text-opacity));}-.dark\:text-gray-500:is(.dark *) {- --tw-text-opacity: 1;- color: rgb(107 114 128 / var(--tw-text-opacity));-}-.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder {--tw-placeholder-opacity: 1;color: rgb(156 163 175 / var(--tw-placeholder-opacity));@@ -2465,11 +2446,6 @@ video {color: rgb(96 165 250 / var(--tw-text-opacity));}-.dark\:hover\:text-gray-200:hover:is(.dark *) {- --tw-text-opacity: 1;- color: rgb(229 231 235 / var(--tw-text-opacity));-}-.dark\:hover\:text-gray-300:hover:is(.dark *) {--tw-text-opacity: 1;color: rgb(209 213 219 / var(--tw-text-opacity));@@ -2555,10 +2531,6 @@ video {margin-bottom: 1.25rem;}- .sm\:mr-2 {- margin-right: 0.5rem;- }-.sm\:flex {display: flex;}diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.jsindex e45e1cae1..6de9d9f08 100644--- a/apps/web/eslint.config.js+++ b/apps/web/eslint.config.js@@ -149,7 +149,7 @@ export default [},},{- // Icons come from the shared catalog in core/models/src/icons (the Icon component, uiIconSvg), never inline SVG markup.+ // Brand style enforcement.files: ["src/**/*.{ts,tsx}"],ignores: ["src/components/shared/Icon.tsx", "src/**/__tests__/**"],rules: {@@ -157,6 +157,8 @@ export default [{ selector: "JSXOpeningElement[name.name='svg']", message: "Use the Icon component with an icon from core/models/src/icons instead of inline SVG." },{ selector: "TemplateElement[value.raw=/<svg/]", message: "Use uiIconSvg() from @aliasvault/models/icons instead of inline SVG markup." },{ selector: "Literal[value=/<svg/]", message: "Use uiIconSvg() from @aliasvault/models/icons instead of inline SVG markup." },+ { selector: "Literal[value=/(orange|indigo)-[0-9]/]", message: "Use the primary-* brand colors (core/models/src/colors) instead of Tailwind orange or indigo; use amber for warnings." },+ { selector: "TemplateElement[value.raw=/(orange|indigo)-[0-9]/]", message: "Use the primary-* brand colors (core/models/src/colors) instead of Tailwind orange or indigo; use amber for warnings." },],},},diff --git a/apps/web/src/components/alerts/MessageInfo.tsx b/apps/web/src/components/alerts/MessageInfo.tsxindex c65e1029b..18b85768a 100644--- a/apps/web/src/components/alerts/MessageInfo.tsx+++ b/apps/web/src/components/alerts/MessageInfo.tsx@@ -3,13 +3,13 @@ import React from 'react';import Icon from '@/components/shared/Icon';/**- * Orange info box with a title.+ * Amber info box with a title.*/const MessageInfo: React.FC<{ title?: string; children: React.ReactNode }> = ({ title, children }) => (- <div className="bg-orange-100 border-l-4 border-orange-500 text-orange-700 p-4 mb-6" role="alert">+ <div className="bg-amber-100 border-l-4 border-amber-500 text-amber-700 p-4 mb-6" role="alert"><div className="flex"><div className="py-1">- <Icon name="information-circle" className="h-6 w-6 text-orange-500 mr-4" />+ <Icon name="information-circle" className="h-6 w-6 text-amber-500 mr-4" /></div><div>{title && <p className="font-bold">{title}</p>}diff --git a/apps/web/src/components/auth/LanguageSwitcher.tsx b/apps/web/src/components/auth/LanguageSwitcher.tsxindex 288507b2b..292b53b00 100644--- a/apps/web/src/components/auth/LanguageSwitcher.tsx+++ b/apps/web/src/components/auth/LanguageSwitcher.tsx@@ -17,7 +17,7 @@ const LanguageSwitcher: React.FC = () => {value={i18n.language}onChange={(e) => void changeLanguage(e.target.value)}aria-label={t('settings.language')}- className="appearance-none cursor-pointer pl-3 pr-9 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">+ className="appearance-none cursor-pointer pl-3 pr-9 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 dark:focus:ring-offset-gray-800">{AVAILABLE_LANGUAGES.map((language) => (<option key={language.code} value={language.code}>{language.flag} {language.nativeName}</option>))}diff --git a/apps/web/src/components/email/EmailRow.tsx b/apps/web/src/components/email/EmailRow.tsxindex ef9afab96..557e4ffb0 100644--- a/apps/web/src/components/email/EmailRow.tsx+++ b/apps/web/src/components/email/EmailRow.tsx@@ -46,7 +46,7 @@ const EmailRowComponent: React.FC<EmailRowProps> = ({ email, onEmailClick, onEma<li className={`flex items-center transition duration-150 ease-in-out cursor-pointer ${isSelected ? 'bg-primary-50 dark:bg-primary-900/30 border-l-4 border-primary-500 hover:bg-primary-200 dark:hover:bg-primary-900/50' : 'hover:bg-gray-100 dark:hover:bg-gray-600'}`}><div className="pl-4 mr-2 flex-shrink-0"><input- className="form-checkbox h-4 w-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"+ className="form-checkbox h-4 w-4 text-primary-600 bg-gray-100 border-gray-300 rounded focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"type="checkbox"checked={isChecked}onChange={() => onEmailCheck(email.id)} />diff --git a/apps/web/src/components/folders/DeleteFolderModal.tsx b/apps/web/src/components/folders/DeleteFolderModal.tsxindex 358a9e999..84bb6b809 100644--- a/apps/web/src/components/folders/DeleteFolderModal.tsx+++ b/apps/web/src/components/folders/DeleteFolderModal.tsx@@ -49,13 +49,13 @@ const DeleteFolderModal: React.FC<DeleteFolderModalProps> = ({ isOpen, folderNamtype="button"onClick={() => run(onDeleteFolderOnly)}disabled={isDeleting}- className="w-full flex items-center gap-3 p-3 rounded-lg border border-orange-200 bg-orange-50 hover:bg-orange-100 dark:border-orange-800 dark:bg-orange-900/20 dark:hover:bg-orange-900/30 transition-colors disabled:opacity-50 disabled:cursor-not-allowed">- <div className="flex-shrink-0 w-10 h-10 flex items-center justify-center rounded-full bg-orange-100 dark:bg-orange-900/40">- <Icon name="folder-filled" className="w-5 h-5 text-orange-600 dark:text-orange-400" />+ className="w-full flex items-center gap-3 p-3 rounded-lg border border-primary-200 bg-primary-50 hover:bg-primary-100 dark:border-primary-800 dark:bg-primary-900/20 dark:hover:bg-primary-900/30 transition-colors disabled:opacity-50 disabled:cursor-not-allowed">+ <div className="flex-shrink-0 w-10 h-10 flex items-center justify-center rounded-full bg-primary-100 dark:bg-primary-900/40">+ <Icon name="folder-filled" className="w-5 h-5 text-primary-600 dark:text-primary-400" /></div><div className="flex-1 text-left">- <div className="font-medium text-orange-700 dark:text-orange-300">{t('items.folders.deleteFolderKeepItems')}</div>- <div className="text-sm text-orange-600/80 dark:text-orange-400/80">{t('items.folders.deleteFolderKeepItemsDescription')}</div>+ <div className="font-medium text-primary-700 dark:text-primary-300">{t('items.folders.deleteFolderKeepItems')}</div>+ <div className="text-sm text-primary-600/80 dark:text-primary-400/80">{t('items.folders.deleteFolderKeepItemsDescription')}</div></div></button>diff --git a/apps/web/src/components/folders/FolderModal.tsx b/apps/web/src/components/folders/FolderModal.tsxindex 70e1b01c1..befa6954e 100644--- a/apps/web/src/components/folders/FolderModal.tsx+++ b/apps/web/src/components/folders/FolderModal.tsx@@ -62,7 +62,7 @@ const FolderModal: React.FC<FolderModalProps> = ({ isOpen, mode, initialName = 'onClose={onClose}onConfirm={handleSave}icon={(- <Icon name="folder-filled" className="h-6 w-6 text-orange-600 dark:text-orange-400" />+ <Icon name="folder-filled" className="h-6 w-6 text-primary-600 dark:text-primary-400" />)}><label htmlFor="folder-name" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">{t('items.folders.folderName')}@@ -74,7 +74,7 @@ const FolderModal: React.FC<FolderModalProps> = ({ isOpen, mode, initialName = 'onChange={(e) => setFolderName(e.target.value)}placeholder={t('items.folders.modal.folderNamePlaceholder')}autoFocus- className="block w-full rounded-md border-0 py-2 px-3 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-orange-600 sm:text-sm sm:leading-6 dark:bg-gray-700 dark:text-white dark:ring-gray-600 dark:placeholder:text-gray-500 dark:focus:ring-orange-500" />+ className="block w-full rounded-md border-0 py-2 px-3 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 dark:bg-gray-700 dark:text-white dark:ring-gray-600 dark:placeholder:text-gray-500 dark:focus:ring-primary-500" />{errorMessage && (<p className="mt-2 text-sm text-red-600 dark:text-red-400">{errorMessage}</p>)}diff --git a/apps/web/src/components/items/FolderPill.tsx b/apps/web/src/components/items/FolderPill.tsxindex fd5918d89..4f2e7dc26 100644--- a/apps/web/src/components/items/FolderPill.tsx+++ b/apps/web/src/components/items/FolderPill.tsx@@ -18,8 +18,8 @@ export type FolderWithCount = {* Clickable folder pill.*/const FolderPill: React.FC<{ folder: FolderWithCount; onClick: () => void }> = ({ folder, onClick }) => (- <button onClick={onClick} className="inline-flex items-center gap-2 px-5 py-2.5 text-sm rounded-lg bg-white dark:bg-gray-700/50 border border-gray-200 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600/50 hover:border-gray-300 dark:hover:border-gray-500 transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-offset-1 dark:focus:ring-offset-gray-800">- <FolderIcon isShared={folder.isShared} className="w-4 h-4 text-orange-500" badgeClassName="bg-white dark:bg-gray-700 ring-gray-200 dark:ring-gray-600" />+ <button onClick={onClick} className="inline-flex items-center gap-2 px-5 py-2.5 text-sm rounded-lg bg-white dark:bg-gray-700/50 border border-gray-200 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600/50 hover:border-gray-300 dark:hover:border-gray-500 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1 dark:focus:ring-offset-gray-800">+ <FolderIcon isShared={folder.isShared} className="w-4 h-4 text-primary-500" badgeClassName="bg-white dark:bg-gray-700 ring-gray-200 dark:ring-gray-600" /><span className="text-gray-700 dark:text-gray-300 truncate max-w-[150px]" title={folder.name}>{folder.name}</span><span className="text-gray-400 dark:text-gray-500 text-xs">{folder.itemCount}</span></button>diff --git a/apps/web/src/components/items/FolderSelector.tsx b/apps/web/src/components/items/FolderSelector.tsxindex 41ade515f..f9ae5d8a8 100644--- a/apps/web/src/components/items/FolderSelector.tsx+++ b/apps/web/src/components/items/FolderSelector.tsx@@ -120,7 +120,7 @@ const FolderSelector: React.FC<FolderSelectorProps> = ({ selectedFolder, onSelec: 'text-gray-500 dark:text-gray-400 border border-dashed border-gray-300 dark:border-gray-600 hover:text-primary-600 dark:hover:text-primary-400 hover:border-primary-400 dark:hover:border-primary-500'}`}>{selectedFolder ? (- <FolderIcon isShared={selectedFolderRow !== undefined && isSharedFolder(selectedFolderRow, personalManifestId)} className="w-4 h-4 text-orange-500" badgeClassName="bg-gray-100 dark:bg-gray-700 ring-gray-200 dark:ring-gray-600" />+ <FolderIcon isShared={selectedFolderRow !== undefined && isSharedFolder(selectedFolderRow, personalManifestId)} className="w-4 h-4 text-primary-500" badgeClassName="bg-gray-100 dark:bg-gray-700 ring-gray-200 dark:ring-gray-600" />) : (<Icon name="folder" className="w-4 h-4 flex-shrink-0" />)}@@ -135,7 +135,7 @@ const FolderSelector: React.FC<FolderSelectorProps> = ({ selectedFolder, onSelecmaxWidth="sm"onClose={() => setShowFolderModal(false)}icon={(- <Icon name="folder-filled" className="h-6 w-6 text-orange-600 dark:text-orange-400" />+ <Icon name="folder-filled" className="h-6 w-6 text-primary-600 dark:text-primary-400" />)}><div className="space-y-1 max-h-64 overflow-y-auto -mx-2">diff --git a/apps/web/src/components/items/ItemFilterDropdown.tsx b/apps/web/src/components/items/ItemFilterDropdown.tsxindex 8c7139ea3..95fdbb5ac 100644--- a/apps/web/src/components/items/ItemFilterDropdown.tsx+++ b/apps/web/src/components/items/ItemFilterDropdown.tsx@@ -53,18 +53,18 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({ title, count, t* The classes of a type/feature filter row.*/const rowClass = (filter: ItemFilterType, withIcon: boolean): string =>- `w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600 ${withIcon ? 'flex items-center gap-2' : ''} ${isActive(filter) ? 'bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400' : 'text-gray-700 dark:text-gray-300'}`;+ `w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600 ${withIcon ? 'flex items-center gap-2' : ''} ${isActive(filter) ? 'bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400' : 'text-gray-700 dark:text-gray-300'}`;/*** The classes of a filter row icon.*/- const iconClass = (filter: ItemFilterType): string => `w-5 h-5 ${isActive(filter) ? 'text-orange-500 dark:text-orange-400' : 'text-gray-400 dark:text-gray-500'}`;+ const iconClass = (filter: ItemFilterType): string => `w-5 h-5 ${isActive(filter) ? 'text-primary-500 dark:text-primary-400' : 'text-gray-400 dark:text-gray-500'}`;return (<div className="relative flex items-center gap-2"><button ref={buttonRef} onClick={() => setIsOpen(!isOpen)} className="flex items-center gap-2 text-gray-900 dark:text-white hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none"><h1 className="flex items-baseline gap-1.5 text-xl font-semibold tracking-tight text-gray-900 dark:text-white sm:text-2xl">- {titleFolder && <FolderIcon isShared={titleFolder.isShared} className="w-5 h-5 self-center text-orange-500" />}+ {titleFolder && <FolderIcon isShared={titleFolder.isShared} className="w-5 h-5 self-center text-primary-500" />}<span>{title}</span>{count !== undefined && (<span className="text-base text-gray-500 dark:text-gray-400">({count})</span>@@ -78,8 +78,8 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({ title, count, t{isOpen && (<div ref={menuRef} className="absolute left-0 top-full z-40 mt-2 w-56 origin-top-left rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-700"><div className="py-1">- <div className={`flex items-center justify-between px-4 py-2 ${isActive(ItemFilter.All) ? 'bg-orange-50 dark:bg-orange-900/20' : ''}`}>- <button onClick={() => pickFilter(ItemFilter.All)} className={`text-left text-sm hover:text-gray-900 dark:hover:text-white ${isActive(ItemFilter.All) ? 'text-orange-600 dark:text-orange-400' : 'text-gray-700 dark:text-gray-300'}`}>+ <div className={`flex items-center justify-between px-4 py-2 ${isActive(ItemFilter.All) ? 'bg-primary-50 dark:bg-primary-900/20' : ''}`}>+ <button onClick={() => pickFilter(ItemFilter.All)} className={`text-left text-sm hover:text-gray-900 dark:hover:text-white ${isActive(ItemFilter.All) ? 'text-primary-600 dark:text-primary-400' : 'text-gray-700 dark:text-gray-300'}`}>{t('items.title')}</button>{showFoldersToggle && (@@ -87,7 +87,7 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({ title, count, te.stopPropagation(); setIsOpen(false); onToggleShowFolders();}} className="flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"><span>{t('items.filters.showFolders')}</span>- <Icon name={showFolders ? 'square-check' : 'square-feather'} className={`w-5 h-5 ${showFolders ? 'text-orange-500 dark:text-orange-400' : 'text-gray-400 dark:text-gray-500'}`} />+ <Icon name={showFolders ? 'square-check' : 'square-feather'} className={`w-5 h-5 ${showFolders ? 'text-primary-500 dark:text-primary-400' : 'text-gray-400 dark:text-gray-500'}`} /></button>)}</div>@@ -126,10 +126,10 @@ const ItemFilterDropdown: React.FC<ItemFilterDropdownProps> = ({ title, count, t<button onClick={() => {setIsOpen(false); onSelectRecentlyDeleted();- }} className={`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600 flex items-center justify-between ${isRecentlyDeletedActive ? 'bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400' : 'text-gray-700 dark:text-gray-300'}`}>+ }} className={`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600 flex items-center justify-between ${isRecentlyDeletedActive ? 'bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400' : 'text-gray-700 dark:text-gray-300'}`}><span>{t('items.recentlyDeleted.title')}</span>{recentlyDeletedCount > 0 && (- <span className={isRecentlyDeletedActive ? 'text-orange-500 dark:text-orange-400' : 'text-gray-400 dark:text-gray-500'}>{recentlyDeletedCount}</span>+ <span className={isRecentlyDeletedActive ? 'text-primary-500 dark:text-primary-400' : 'text-gray-400 dark:text-gray-500'}>{recentlyDeletedCount}</span>)}</button></div>diff --git a/apps/web/src/components/layout/ClipboardCountdownBar.tsx b/apps/web/src/components/layout/ClipboardCountdownBar.tsxindex f70511cac..38e68aadb 100644--- a/apps/web/src/components/layout/ClipboardCountdownBar.tsx+++ b/apps/web/src/components/layout/ClipboardCountdownBar.tsx@@ -27,7 +27,7 @@ const ClipboardCountdownBar: React.FC = () => {// Once the countdown ran out without a clear, the bar stays full (blue) until the clear goes through.const waiting = status === 'pending' || status === 'manual_clear_required' || progress <= 0;- const barColorClass = waiting ? 'bg-blue-500 dark:bg-blue-400' : 'bg-orange-500 dark:bg-orange-400';+ const barColorClass = waiting ? 'bg-blue-500 dark:bg-blue-400' : 'bg-primary-500 dark:bg-primary-400';const animationClass = waiting && status !== 'manual_clear_required' ? 'animate-pulse' : '';return (diff --git a/apps/web/src/components/settings/importexport/ExportPasswordModal.tsx b/apps/web/src/components/settings/importexport/ExportPasswordModal.tsxindex 6439dbea4..9ec1b761d 100644--- a/apps/web/src/components/settings/importexport/ExportPasswordModal.tsx+++ b/apps/web/src/components/settings/importexport/ExportPasswordModal.tsx@@ -110,7 +110,7 @@ const ExportPasswordModal: React.FC<ExportPasswordModalProps> = ({ isOpen, titlecloseOnOverlayClick={false}submitOnEnter={false}icon={(- <Icon name="upload" className="h-6 w-6 text-orange-600 dark:text-orange-400" />+ <Icon name="upload" className="h-6 w-6 text-primary-600 dark:text-primary-400" />)}footerContent={(<>diff --git a/apps/web/src/components/settings/importexport/ImportServiceCard.tsx b/apps/web/src/components/settings/importexport/ImportServiceCard.tsxindex dc4e443c6..fffe0c6df 100644--- a/apps/web/src/components/settings/importexport/ImportServiceCard.tsx+++ b/apps/web/src/components/settings/importexport/ImportServiceCard.tsx@@ -584,8 +584,8 @@ const ImportServiceCard: React.FC<ImportServiceCardProps> = ({ serviceName, desc<label htmlFor="decryptionPassword" className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">{t('importExport.serviceCard.decryptionPasswordLabel')}</label><input id="decryptionPassword" type="password" value={decryptionPassword} onChange={e => setDecryptionPassword(e.target.value)} onKeyDown={handlePasswordKeyDown} autoFocus autoComplete="off" className="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:outline-none focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" /></div>- <div className="mb-4 p-3 bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 rounded-lg">- <p className="text-sm text-orange-800 dark:text-orange-200">{t('importExport.serviceCard.decryptionPasswordHint')}</p>+ <div className="mb-4 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 rounded-lg">+ <p className="text-sm text-amber-800 dark:text-amber-200">{t('importExport.serviceCard.decryptionPasswordHint')}</p></div><div className="flex justify-end mt-6 space-x-2"><Button onClick={handlePreviousStep} color="secondary" arrow="back">{t('common.back')}</Button>diff --git a/apps/web/src/components/settings/security/ClipboardClearSection.tsx b/apps/web/src/components/settings/security/ClipboardClearSection.tsxindex 1f759dff8..eb2dbd3b7 100644--- a/apps/web/src/components/settings/security/ClipboardClearSection.tsx+++ b/apps/web/src/components/settings/security/ClipboardClearSection.tsx@@ -43,8 +43,8 @@ const ClipboardClearSection: React.FC = () => {<option value="15">{t('common.duration.15seconds')}</option></Select><span className="block text-sm font-normal text-gray-500 dark:text-gray-400">{t('settings.general.clipboardClearSecondsDescription')}</span>- <div className="mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-lg dark:bg-yellow-900/20 dark:border-yellow-800">- <p className="text-sm text-yellow-800 dark:text-yellow-200">{t('settings.general.clipboardClearLimitationNote')}</p>+ <div className="mt-2 p-3 bg-amber-50 border border-amber-200 rounded-lg dark:bg-amber-900/20 dark:border-amber-800">+ <p className="text-sm text-amber-800 dark:text-amber-200">{t('settings.general.clipboardClearLimitationNote')}</p></div></div></SecuritySection>diff --git a/apps/web/src/components/shared/FormModal.tsx b/apps/web/src/components/shared/FormModal.tsxindex cbdb86ea4..f989ba3a5 100644--- a/apps/web/src/components/shared/FormModal.tsx+++ b/apps/web/src/components/shared/FormModal.tsx@@ -43,7 +43,7 @@ const getMaxWidthClass = (maxWidth: FormModalProps['maxWidth']): string => {* Generic modal for forms and content.*/const FormModal: React.FC<FormModalProps> = ({- isOpen, title = '', icon, iconBackgroundClass = 'bg-orange-100 dark:bg-orange-900/30', children, footerContent, showDefaultFooter = true,+ isOpen, title = '', icon, iconBackgroundClass = 'bg-primary-100 dark:bg-primary-900/30', children, footerContent, showDefaultFooter = true,confirmText, cancelText, confirmDisabled = false, confirmButtonClass = 'bg-primary-600 hover:bg-primary-700', isLoading = false, maxWidth = 'lg',closeOnOverlayClick = true, closeOnEscape = true, submitOnEnter = true, onClose, onConfirm,}) => {diff --git a/apps/web/src/components/shared/PasswordConfirmationModal.tsx b/apps/web/src/components/shared/PasswordConfirmationModal.tsxindex 52050b803..49dc4efeb 100644--- a/apps/web/src/components/shared/PasswordConfirmationModal.tsx+++ b/apps/web/src/components/shared/PasswordConfirmationModal.tsx@@ -62,7 +62,7 @@ const PasswordConfirmationModal: React.FC<PasswordConfirmationModalProps> = ({ icloseOnOverlayClick={false}submitOnEnter={true}icon={(- <Icon name="lock-closed" className="h-6 w-6 text-orange-600 dark:text-orange-400" />+ <Icon name="lock-closed" className="h-6 w-6 text-primary-600 dark:text-primary-400" />)}><p className="text-sm text-gray-500 dark:text-gray-400 mb-4">{description}</p>diff --git a/apps/web/src/components/shared/PasswordStrengthIndicator.tsx b/apps/web/src/components/shared/PasswordStrengthIndicator.tsxindex abf2d08f7..522643c76 100644--- a/apps/web/src/components/shared/PasswordStrengthIndicator.tsx+++ b/apps/web/src/components/shared/PasswordStrengthIndicator.tsx@@ -3,8 +3,10 @@ import React from 'react';import { useTranslation } from 'react-i18next';const LABEL_KEYS = ['veryWeak', 'weak', 'fair', 'good', 'strong'];+/* eslint-disable no-restricted-syntax -- strength scale (orange = very weak), not the brand color */const BAR_CLASSES = ['bg-orange-400 dark:bg-orange-500', 'bg-yellow-500 dark:bg-yellow-600', 'bg-green-500 dark:bg-green-600', 'bg-green-600 dark:bg-green-700', 'bg-green-700 dark:bg-green-800'];const TEXT_CLASSES = ['text-orange-600 dark:text-orange-400', 'text-yellow-600 dark:text-yellow-400', 'text-green-600 dark:text-green-400', 'text-green-700 dark:text-green-300', 'text-green-800 dark:text-green-200'];+/* eslint-enable no-restricted-syntax *//*** Bar showing how strong a password is.diff --git a/apps/web/src/components/shared/Select.tsx b/apps/web/src/components/shared/Select.tsxindex 7efe62e27..71ffde91c 100644--- a/apps/web/src/components/shared/Select.tsx+++ b/apps/web/src/components/shared/Select.tsx@@ -4,7 +4,7 @@ import React from 'react';* Full width select with the form styling.*/const Select: React.FC<React.SelectHTMLAttributes<HTMLSelectElement>> = ({ children, ...rest }) => (- <select className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" {...rest}>+ <select className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" {...rest}>{children}</select>);diff --git a/apps/web/src/components/totp/TotpViewer.tsx b/apps/web/src/components/totp/TotpViewer.tsxindex 1411e6d15..dff0b69c0 100644--- a/apps/web/src/components/totp/TotpViewer.tsx+++ b/apps/web/src/components/totp/TotpViewer.tsx@@ -55,7 +55,7 @@ const TotpRow: React.FC<{ totpCode: TotpCode; item: ItemRef; tick: number }> = (</div></div><div className="w-1.5 h-8 bg-gray-200 rounded-full dark:bg-gray-600">- <div className="bg-blue-600 rounded-full transition-all" style={{ height: `${percentage}%`, width: '100%' }}></div>+ <div className="bg-primary-500 rounded-full transition-all" style={{ height: `${percentage}%`, width: '100%' }}></div></div></div></div>diff --git a/apps/web/src/pages/items/Home.tsx b/apps/web/src/pages/items/Home.tsxindex a0fc912d8..439228d4d 100644--- a/apps/web/src/pages/items/Home.tsx+++ b/apps/web/src/pages/items/Home.tsx@@ -318,8 +318,8 @@ const ItemsHome: React.FC = () => {* The class of the add folder button: dashed when there are no folders yet.*/const getAddFolderButtonClass = (): string => allFolders.length > 0- ? 'inline-flex items-center gap-1.5 px-5 py-2.5 text-sm rounded-lg transition-colors focus:outline-none text-gray-500 dark:text-gray-400 hover:text-orange-600 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700/50'- : 'inline-flex items-center gap-1.5 px-5 py-2.5 text-sm rounded-lg transition-colors focus:outline-none text-gray-400 dark:text-gray-500 border border-dashed border-gray-300 dark:border-gray-600 hover:border-orange-400 dark:hover:border-orange-500 hover:text-orange-600 dark:hover:text-orange-400';+ ? 'inline-flex items-center gap-1.5 px-5 py-2.5 text-sm rounded-lg transition-colors focus:outline-none text-gray-500 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-700/50'+ : 'inline-flex items-center gap-1.5 px-5 py-2.5 text-sm rounded-lg transition-colors focus:outline-none text-gray-400 dark:text-gray-500 border border-dashed border-gray-300 dark:border-gray-600 hover:border-primary-400 dark:hover:border-primary-500 hover:text-primary-600 dark:hover:text-primary-400';/*** Pick a filter.@@ -489,7 +489,7 @@ const ItemsHome: React.FC = () => {onToggleShowFolders={toggleShowFolders}titleActions={isInFolder && !currentFolderIsVirtual ? (<>- <button onClick={() => setShowEditFolderModal(true)} title={t('items.folders.editFolder')} className="p-1.5 text-gray-400 hover:text-orange-500 dark:text-gray-500 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors">+ <button onClick={() => setShowEditFolderModal(true)} title={t('items.folders.editFolder')} className="p-1.5 text-gray-400 hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"><Icon name="pencil-alt" className="w-5 h-5" /></button><button onClick={() => setShowDeleteFolderModal(true)} title={t('items.folders.deleteFolder')} className="p-1.5 text-gray-400 hover:text-red-500 dark:text-gray-500 dark:hover:text-red-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors">@@ -542,7 +542,7 @@ const ItemsHome: React.FC = () => {{filterType !== ItemFilter.All && (<div className="flex flex-wrap items-center gap-2 mb-4"><span className="text-sm text-gray-500 dark:text-gray-400">{t('items.home.filteringBy')}</span>- <button onClick={() => setFilter(ItemFilter.All)} className="inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-orange-100 dark:bg-orange-900/30 hover:bg-orange-200 dark:hover:bg-orange-900/50 text-orange-700 dark:text-orange-300 rounded-lg transition-colors">+ <button onClick={() => setFilter(ItemFilter.All)} className="inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-primary-100 dark:bg-primary-900/30 hover:bg-primary-200 dark:hover:bg-primary-900/50 text-primary-700 dark:text-primary-300 rounded-lg transition-colors"><span>{getFilterTitle()}</span><Icon name="x" className="w-4 h-4" /></button>diff --git a/apps/web/src/pages/items/View.tsx b/apps/web/src/pages/items/View.tsxindex cbb148d8f..2778b79dc 100644--- a/apps/web/src/pages/items/View.tsx+++ b/apps/web/src/pages/items/View.tsx@@ -203,7 +203,7 @@ const ItemView: React.FC = () => {))}{folder && (<Link to={folderRoute(folder)} className="inline-flex items-center gap-2 mt-2 px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors">- <FolderIcon isShared={isSharedFolder(folder, dbContext.sqliteClient?.getPersonalManifestId())} className="w-4 h-4 text-orange-500" badgeClassName="bg-gray-100 dark:bg-gray-700 ring-gray-200 dark:ring-gray-600" />+ <FolderIcon isShared={isSharedFolder(folder, dbContext.sqliteClient?.getPersonalManifestId())} className="w-4 h-4 text-primary-500" badgeClassName="bg-gray-100 dark:bg-gray-700 ring-gray-200 dark:ring-gray-600" /><span>{folder.Name}</span></Link>)}diff --git a/apps/web/src/pages/settings/FamilySharing.tsx b/apps/web/src/pages/settings/FamilySharing.tsxindex a46328ce7..95d8a21d6 100644--- a/apps/web/src/pages/settings/FamilySharing.tsx+++ b/apps/web/src/pages/settings/FamilySharing.tsx@@ -59,7 +59,7 @@ type InvitationCardProps = {const InvitationCard: React.FC<InvitationCardProps> = ({ vaultName, inviterUsername, isDisabled, onAccept, onDecline }) => (<Card variant="tile" className="flex flex-col gap-4 border-primary-400 ring-2 ring-primary-200 dark:border-primary-500 dark:ring-primary-900/60"><div className="flex items-center gap-2 min-w-0">- <FolderIcon isShared className="w-5 h-5 text-orange-500" />+ <FolderIcon isShared className="w-5 h-5 text-primary-500" /><div className="min-w-0"><p className="text-lg font-medium text-gray-900 dark:text-white truncate" title={vaultName}>{vaultName}</p><p className="text-sm text-gray-500 dark:text-gray-400">{familySharingText.invitedBy(inviterUsername)}</p>@@ -441,13 +441,13 @@ const FamilySharing: React.FC = () => {<div className="flex items-center gap-1 -mx-2 -mt-2 mb-2">{hasFolder ? (<Link to={folderRoute({ Id: folderId, ManifestId: folderId })} className="flex flex-1 items-center gap-2 min-w-0 px-2 py-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">- <FolderIcon isShared className="w-5 h-5 text-orange-500" />+ <FolderIcon isShared className="w-5 h-5 text-primary-500" /><span className="text-lg font-medium text-gray-900 dark:text-white truncate" title={vaultLabel(manifest)}>{vaultLabel(manifest)}</span><Icon name="chevron-right" className="w-4 h-4 ml-auto shrink-0 text-gray-400" /></Link>) : (<div className="flex flex-1 items-center gap-2 min-w-0 px-2 py-1.5">- <FolderIcon isShared className="w-5 h-5 text-orange-500" />+ <FolderIcon isShared className="w-5 h-5 text-primary-500" /><span className="text-lg font-medium text-gray-900 dark:text-white truncate" title={vaultLabel(manifest)}>{vaultLabel(manifest)}</span></div>)}diff --git a/apps/web/src/pages/settings/General.tsx b/apps/web/src/pages/settings/General.tsxindex d182d9a92..0040d8068 100644--- a/apps/web/src/pages/settings/General.tsx+++ b/apps/web/src/pages/settings/General.tsx@@ -130,7 +130,7 @@ const GeneralSettings: React.FC = () => {<input id="autoEmailRefresh" type="checkbox" checked={autoEmailRefresh} onChange={(e) => {setAutoEmailRefresh(e.target.checked);void updateSetting('AutoEmailRefresh', e.target.checked ? 'True' : 'False');- }} className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />+ }} className="w-4 h-4 text-primary-600 bg-gray-100 border-gray-300 rounded focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" /><label htmlFor="autoEmailRefresh" className="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">{t('settings.general.autoEmailRefreshLabel')}</label></div></Card>diff --git a/apps/web/src/pages/settings/importexport/ImportExport.tsx b/apps/web/src/pages/settings/importexport/ImportExport.tsxindex 9a327a32b..3c9b12af5 100644--- a/apps/web/src/pages/settings/importexport/ImportExport.tsx+++ b/apps/web/src/pages/settings/importexport/ImportExport.tsx@@ -225,11 +225,11 @@ const ImportExport: React.FC = () => {<p className="text-sm text-gray-500 dark:text-gray-400 mb-4">{t('importExport.exportSectionDescription')}</p><div className="space-y-3">- <div className="flex items-center justify-between p-3 border-2 border-orange-200 dark:border-orange-800 rounded-lg bg-orange-50 dark:bg-orange-900/20">+ <div className="flex items-center justify-between p-3 border-2 border-amber-200 dark:border-amber-800 rounded-lg bg-amber-50 dark:bg-amber-900/20"><div className="flex-1 min-w-0 mr-4"><div className="flex items-center gap-2 mb-1"><h4 className="text-sm font-semibold text-gray-900 dark:text-white">{t('importExport.exportAvexTitle')}</h4>- <span className="px-1.5 py-0.5 text-xs font-medium text-orange-700 dark:text-orange-300 bg-orange-100 dark:bg-orange-900 rounded">{t('importExport.recommendedLabel')}</span>+ <span className="px-1.5 py-0.5 text-xs font-medium text-amber-700 dark:text-amber-300 bg-amber-100 dark:bg-amber-900 rounded">{t('importExport.recommendedLabel')}</span></div><p className="text-sm text-gray-600 dark:text-gray-300">{t('importExport.exportAvexDescription')}</p></div>diff --git a/apps/web/src/pages/sync/Sync.tsx b/apps/web/src/pages/sync/Sync.tsxindex d12ade741..04c95db00 100644--- a/apps/web/src/pages/sync/Sync.tsx+++ b/apps/web/src/pages/sync/Sync.tsx@@ -251,8 +251,8 @@ const Sync: React.FC = () => {</button></div>{showVersionDescription && (- <div className="mb-4 p-3 bg-orange-50 dark:bg-orange-900/30 border border-orange-200 dark:border-orange-700 rounded-lg">- <p className="text-sm text-orange-800 dark:text-orange-200">+ <div className="mb-4 p-3 bg-amber-50 dark:bg-amber-900/30 border border-amber-200 dark:border-amber-700 rounded-lg">+ <p className="text-sm text-amber-800 dark:text-amber-200">{t('upgrade.upgradeRequiredDescription', { changes: latestVersion?.description ?? t('upgrade.noDescriptionAvailable') })}</p></div>@@ -260,7 +260,7 @@ const Sync: React.FC = () => {<div className="space-y-2"><p className="flex justify-between items-center"><span className="text-sm font-medium text-gray-600 dark:text-gray-400">{t('upgrade.yourVault')}</span>- <span className="text-base font-bold text-blue-600 dark:text-blue-400">{currentVersion?.compatibleUpToVersion ?? '...'}</span>+ <span className="text-base font-bold text-primary-600 dark:text-primary-400">{currentVersion?.compatibleUpToVersion ?? '...'}</span></p><p className="flex justify-between items-center"><span className="text-sm font-medium text-gray-600 dark:text-gray-400">{t('upgrade.newVersion')}</span>@@ -271,7 +271,7 @@ const Sync: React.FC = () => {)}{upgradeKind === 'storage-format' && (<div className="rounded-lg dark:bg-gray-900">- <div className="p-4 text-sm text-left bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-900 rounded-lg text-orange-800 dark:text-orange-300">+ <div className="p-4 text-sm text-left bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-900 rounded-lg text-amber-800 dark:text-amber-300">{t('upgrade.otherDevicesWarning', { version: AppInfo.API_VERSION })}</div></div>diff --git a/apps/web/tailwind.config.js b/apps/web/tailwind.config.jsindex e9c1a4fa2..1779d84be 100644--- a/apps/web/tailwind.config.js+++ b/apps/web/tailwind.config.js@@ -1,9 +1,12 @@+import aliasvaultColors from '../../core/models/src/colors/tailwind-preset.cjs';+/** @type {import('tailwindcss').Config} */export default {content: ['./index.html','./src/**/*.{js,jsx,ts,tsx,html}',],+ presets: [aliasvaultColors],darkMode: 'class',theme: {extend: {diff --git a/core/models/README.md b/core/models/README.mdindex b094e0377..2a7078652 100644--- a/core/models/README.md+++ b/core/models/README.md@@ -29,6 +29,7 @@ Icons (UI, item type and built-in logos) are generated from the SVG files in `sr| `scripts/generate-vault-table-registry.cjs` | `src/vault/VaultTableRegistry.ts` | the Rust codec's datamodel registry, the C# `VaultTableRegistry`, and `VaultDataBucketCategory` (C#, Swift, Kotlin) || `scripts/generate-key-vocabulary.cjs` | the `VOCABULARIES` table inside the script | `UnlockMethodType`, `ManifestKeyType`, `VaultKeyAlgorithm` || `scripts/generate-app-defaults.cjs` | `src/defaults/AppDefaults.ts` | the Swift and Kotlin `AppInfo` (minimum server version, default URLs) |+| `scripts/generate-colors.cjs` | `src/colors/palette.json` | the TS palette, the Tailwind preset, Swift `ColorConstants` and Android `av_colors.xml`; see [src/colors/README.md](src/colors/README.md) |The key vocabulary is the set of tokens naming how a vault key is protected, which unlock method encrypts auser's Account Key, how a manifest's VEK reaches a given user, and which algorithm a piece of key ciphertextdiff --git a/core/models/build.sh b/core/models/build.shindex 37c244435..96580a77e 100755--- a/core/models/build.sh+++ b/core/models/build.sh@@ -29,6 +29,9 @@ node scripts/generate-field-keys.cjsecho "- Generating icon catalogs (TS, C#, Swift, Kotlin, React Native)..."node scripts/generate-icons.cjs+echo "- Generating color palette (TS, Tailwind, Swift, Android)..."+node scripts/generate-colors.cjs+echo "- Generating password-generator defaults (Rust)..."node scripts/generate-password-defaults.cjsdiff --git a/core/models/package.json b/core/models/package.jsonindex cb445bc1c..d604cc9dc 100644--- a/core/models/package.json+++ b/core/models/package.json@@ -5,6 +5,8 @@"main": "dist/index.mjs","types": "dist/index.d.mts","exports": {+ "./colors": "./src/colors/index.ts",+ "./colors/tailwind-preset": "./src/colors/tailwind-preset.cjs","./defaults": "./src/defaults/index.ts","./icons": "./src/icons/index.ts","./identity": "./src/identity/index.ts",@@ -18,7 +20,8 @@"lint": "eslint src","lint:fix": "eslint src --fix","test": "vitest run --passWithNoTests",- "icons:generate": "node scripts/generate-icons.cjs"+ "icons:generate": "node scripts/generate-icons.cjs",+ "colors:generate": "node scripts/generate-colors.cjs"},"files": ["dist"diff --git a/core/models/scripts/generate-colors.cjs b/core/models/scripts/generate-colors.cjsnew file mode 100644index 000000000..ed9c948f7--- /dev/null+++ b/core/models/scripts/generate-colors.cjs@@ -0,0 +1,221 @@+#!/usr/bin/env node+/**+ * Generates the AliasVault color palette for every platform.+ *+ * Input: core/models/src/colors/palette.json+ * Outputs:+ * - core/models/src/colors/Palette.ts (TypeScript, imported as `@aliasvault/models/colors`)+ * - core/models/src/colors/tailwind-preset.cjs (Tailwind preset for the web app, browser extension and admin)+ * - apps/mobile-app/ios/VaultUI/ColorConstants.swift (Swift)+ * - apps/mobile-app/android/app/src/main/res/values/av_colors.xml and values-night/av_colors.xml (Android)+ */++const fs = require('fs');+const path = require('path');++const REPO_ROOT = path.join(__dirname, '../../..');+const SOURCE_REL = 'core/models/src/colors/palette.json';+const COLORS_DIR = path.join(REPO_ROOT, 'core/models/src/colors');+const TS_OUTPUT = path.join(COLORS_DIR, 'Palette.ts');+const TAILWIND_OUTPUT = path.join(COLORS_DIR, 'tailwind-preset.cjs');+const SWIFT_OUTPUT = path.join(REPO_ROOT, 'apps/mobile-app/ios/VaultUI/ColorConstants.swift');+const ANDROID_RES = path.join(REPO_ROOT, 'apps/mobile-app/android/app/src/main/res');+const ANDROID_LIGHT_OUTPUT = path.join(ANDROID_RES, 'values/av_colors.xml');+const ANDROID_DARK_OUTPUT = path.join(ANDROID_RES, 'values-night/av_colors.xml');++const GENERATED_HEADER = `This file is auto-generated from ${SOURCE_REL} by core/models/scripts/generate-colors.cjs.`;+const REGENERATE_HINT = "Do not edit this file directly. Run 'node core/models/scripts/generate-colors.cjs' to regenerate.";++/** Opacity of the Android ripple drawn on top of a primary-colored surface. */+const ANDROID_RIPPLE_ALPHA = '33';++/** Resolve a theme value: a hex color, or a `primary.<shade>` reference into the primary scale. */+function resolveColor(palette, value, where) {+ const ref = value.match(/^primary\.(\d+)$/);+ const color = ref ? palette.primary[ref[1]] : value;+ if (!/^#[0-9a-f]{6}$/.test(color ?? '')) {+ throw new Error(`${where}: '${value}' is not a lowercase #rrggbb color or a primary.<shade> reference`);+ }+ return color;+}++/** Read the palette and resolve every theme value to a hex color. */+function readPalette() {+ const palette = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, SOURCE_REL), 'utf8'));+ for (const [shade, color] of Object.entries(palette.primary)) {+ resolveColor(palette, color, `primary.${shade}`);+ }++ const lightKeys = Object.keys(palette.theme.light);+ const darkKeys = Object.keys(palette.theme.dark);+ if (lightKeys.join(',') !== darkKeys.join(',')) {+ throw new Error('theme.light and theme.dark must declare the same keys in the same order');+ }++ const theme = {};+ for (const mode of ['light', 'dark']) {+ theme[mode] = Object.fromEntries(Object.entries(palette.theme[mode]).map(([key, value]) => [key, resolveColor(palette, value, `theme.${mode}.${key}`)]));+ }+ return { primary: palette.primary, theme, keys: lightKeys };+}++/** Convert camelCase to snake_case (textMuted -> text_muted). */+function toSnakeCase(name) {+ return name.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`);+}++/** Render an object as indented `key: 'value',` lines. */+function tsObjectLines(obj, indent) {+ return Object.entries(obj).map(([key, value]) => `${indent}${/^\d/.test(key) ? `'${key}'` : key}: '${value}',`).join('\n');+}++function generateTs({ primary, theme }) {+ return `/*+ * <auto-generated />+ * ${GENERATED_HEADER}+ * ${REGENERATE_HINT}+ */++/**+ * The AliasVault primary (brand) color scale, as used by the Tailwind \`primary-*\` classes.+ */+export const PrimaryColors = {+${tsObjectLines(primary, ' ')}+} as const;++/**+ * The semantic theme colors of the mobile apps, per color scheme.+ */+export const ThemeColors = {+ light: {+${tsObjectLines(theme.light, ' ')}+ },+ dark: {+${tsObjectLines(theme.dark, ' ')}+ },+} as const;++export type ThemeColorKey = keyof typeof ThemeColors.light;+`;+}++function generateTailwindPreset({ primary }) {+ const shades = Object.entries(primary).map(([shade, color]) => ` '${shade}': '${color}',`).join('\n');+ return `/*+ * <auto-generated />+ * ${GENERATED_HEADER}+ * ${REGENERATE_HINT}+ */++/** Tailwind preset with the AliasVault brand colors. */+module.exports = {+ theme: {+ extend: {+ colors: {+ primary: {+${shades}+ },+ },+ },+ },+};+`;+}++function generateSwift({ theme, keys }) {+ const members = (mode) => keys.map((key) => ` public static let ${key} = SwiftUI.Color(hex: "${theme[mode][key]}")`).join('\n');+ const protocolMembers = keys.map((key) => ` static var ${key}: Color { get }`).join('\n');++ return `// <auto-generated />+// ${GENERATED_HEADER}+// ${REGENERATE_HINT}++import SwiftUI++/// Color constants for the app+public struct ColorConstants {+ /// Light mode colors+ public struct Light {+${members('light')}+ }++ /// Dark mode colors+ public struct Dark {+${members('dark')}+ }++ /// Get colors for the specified color scheme+ /// - Parameter colorScheme: The current color scheme+ /// - Returns: The appropriate color constants (Light or Dark)+ public static func colors(for colorScheme: ColorScheme) -> Colors.Type {+ colorScheme == .dark ? Dark.self : Light.self+ }++ /// Protocol to enable generic access to color properties+ public protocol Colors {+${protocolMembers}+ }+}++// Conform Light and Dark to the Colors protocol+extension ColorConstants.Light: ColorConstants.Colors {}+extension ColorConstants.Dark: ColorConstants.Colors {}++// Add Color extension for hex support+extension SwiftUI.Color {+ init(hex: String) {+ let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)+ var int: UInt64 = 0+ Scanner(string: hex).scanHexInt64(&int)+ let colorA, colorR, colorG, colorB: UInt64+ switch hex.count {+ case 3: (colorA, colorR, colorG, colorB) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)+ case 6: (colorA, colorR, colorG, colorB) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF)+ case 8: (colorA, colorR, colorG, colorB) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF)+ default: (colorA, colorR, colorG, colorB) = (255, 0, 0, 0)+ }+ self.init(+ .sRGB,+ red: Double(colorR) / 255,+ green: Double(colorG) / 255,+ blue: Double(colorB) / 255,+ opacity: Double(colorA) / 255+ )+ }+}+`;+}++function generateAndroid({ theme, keys }, mode) {+ const colors = keys.map((key) => ` <color name="av_${toSnakeCase(key)}">${theme[mode][key]}</color>`);+ colors.push(` <color name="av_primary_ripple">#${ANDROID_RIPPLE_ALPHA}${theme[mode].primary.slice(1)}</color>`);++ return `<?xml version="1.0" encoding="utf-8"?>+<!--+ <auto-generated />+ ${GENERATED_HEADER}+ ${REGENERATE_HINT}+-->+<resources>+${colors.join('\n')}+</resources>+`;+}++/** Write a generated file, creating its directory when missing. */+function writeFile(filePath, contents) {+ fs.mkdirSync(path.dirname(filePath), { recursive: true });+ fs.writeFileSync(filePath, contents);+ console.log(` ✓ Generated ${path.relative(REPO_ROOT, filePath)}`);+}++function main() {+ const palette = readPalette();+ writeFile(TS_OUTPUT, generateTs(palette));+ writeFile(TAILWIND_OUTPUT, generateTailwindPreset(palette));+ writeFile(SWIFT_OUTPUT, generateSwift(palette));+ writeFile(ANDROID_LIGHT_OUTPUT, generateAndroid(palette, 'light'));+ writeFile(ANDROID_DARK_OUTPUT, generateAndroid(palette, 'dark'));+}++main();diff --git a/core/models/src/colors/Palette.ts b/core/models/src/colors/Palette.tsnew file mode 100644index 000000000..1c4ab16fe--- /dev/null+++ b/core/models/src/colors/Palette.ts@@ -0,0 +1,67 @@+/*+ * <auto-generated />+ * This file is auto-generated from core/models/src/colors/palette.json by core/models/scripts/generate-colors.cjs.+ * Do not edit this file directly. Run 'node core/models/scripts/generate-colors.cjs' to regenerate.+ */++/**+ * The AliasVault primary (brand) color scale, as used by the Tailwind `primary-*` classes.+ */+export const PrimaryColors = {+ '50': '#ffe096',+ '100': '#fdde85',+ '200': '#fbcb74',+ '300': '#f8b963',+ '400': '#f6a752',+ '500': '#f49541',+ '600': '#d68338',+ '700': '#b8702f',+ '800': '#9a5d26',+ '900': '#7b4a1e',+} as const;++/**+ * The semantic theme colors of the mobile apps, per color scheme.+ */+export const ThemeColors = {+ light: {+ text: '#11181c',+ textMuted: '#4b5563',+ background: '#f3f2f7',+ accentBackground: '#ffffff',+ accentBorder: '#d1d5db',+ primary: '#f49541',+ primarySurfaceText: '#ffffff',+ secondary: '#6b7280',+ tertiary: '#eabf69',+ icon: '#687076',+ success: '#10b981',+ successBackground: '#dcfce7',+ warning: '#d97706',+ warningBackground: '#fef3c7',+ info: '#2563eb',+ infoBackground: '#dbeafe',+ destructive: '#ef4444',+ },+ dark: {+ text: '#ecedee',+ textMuted: '#9ba1a6',+ background: '#000000',+ accentBackground: '#202020',+ accentBorder: '#444444',+ primary: '#f49541',+ primarySurfaceText: '#ffffff',+ secondary: '#6b7280',+ tertiary: '#eabf69',+ icon: '#9ba1a6',+ success: '#10b981',+ successBackground: '#1a3d2b',+ warning: '#f59e0b',+ warningBackground: '#422006',+ info: '#3b82f6',+ infoBackground: '#1e3a5f',+ destructive: '#ef4444',+ },+} as const;++export type ThemeColorKey = keyof typeof ThemeColors.light;diff --git a/core/models/src/colors/README.md b/core/models/src/colors/README.mdnew file mode 100644index 000000000..029b2a1e9--- /dev/null+++ b/core/models/src/colors/README.md@@ -0,0 +1,15 @@+# Colors++`palette.json` is the single source of truth for the AliasVault colors on every platform:++- `primary`: the brand color scale (`primary-50` to `primary-900`), used for every primary action, link, active state and brand accent.+- `theme.light` / `theme.dark`: the semantic theme colors of the mobile apps. A value is a `#rrggbb` color or a `primary.<shade>` reference.++Run `node core/models/scripts/generate-colors.cjs` (also part of `core/models/build.sh`) after a change. It writes:++| Output | Used by |+|--------|---------|+| `Palette.ts` | TypeScript, as `@aliasvault/models/colors` (mobile `constants/Colors.ts`) |+| `tailwind-preset.cjs` | the Tailwind configs of the web app, browser extension and admin |+| `apps/mobile-app/ios/VaultUI/ColorConstants.swift` | native iOS screens (autofill, passkeys) |+| `apps/mobile-app/android/app/src/main/res/values{,-night}/av_colors.xml` | native Android screens, as `@color/av_*` |diff --git a/core/models/src/colors/index.ts b/core/models/src/colors/index.tsnew file mode 100644index 000000000..9131a1178--- /dev/null+++ b/core/models/src/colors/index.ts@@ -0,0 +1,5 @@+/**+ * The color palette shared by all apps, generated from ./palette.json (see README.md).+ */+export { PrimaryColors, ThemeColors } from './Palette';+export type { ThemeColorKey } from './Palette';diff --git a/core/models/src/colors/palette.json b/core/models/src/colors/palette.jsonnew file mode 100644index 000000000..9010c0108--- /dev/null+++ b/core/models/src/colors/palette.json@@ -0,0 +1,54 @@+{+ "primary": {+ "50": "#ffe096",+ "100": "#fdde85",+ "200": "#fbcb74",+ "300": "#f8b963",+ "400": "#f6a752",+ "500": "#f49541",+ "600": "#d68338",+ "700": "#b8702f",+ "800": "#9a5d26",+ "900": "#7b4a1e"+ },+ "theme": {+ "light": {+ "text": "#11181c",+ "textMuted": "#4b5563",+ "background": "#f3f2f7",+ "accentBackground": "#ffffff",+ "accentBorder": "#d1d5db",+ "primary": "primary.500",+ "primarySurfaceText": "#ffffff",+ "secondary": "#6b7280",+ "tertiary": "#eabf69",+ "icon": "#687076",+ "success": "#10b981",+ "successBackground": "#dcfce7",+ "warning": "#d97706",+ "warningBackground": "#fef3c7",+ "info": "#2563eb",+ "infoBackground": "#dbeafe",+ "destructive": "#ef4444"+ },+ "dark": {+ "text": "#ecedee",+ "textMuted": "#9ba1a6",+ "background": "#000000",+ "accentBackground": "#202020",+ "accentBorder": "#444444",+ "primary": "primary.500",+ "primarySurfaceText": "#ffffff",+ "secondary": "#6b7280",+ "tertiary": "#eabf69",+ "icon": "#9ba1a6",+ "success": "#10b981",+ "successBackground": "#1a3d2b",+ "warning": "#f59e0b",+ "warningBackground": "#422006",+ "info": "#3b82f6",+ "infoBackground": "#1e3a5f",+ "destructive": "#ef4444"+ }+ }+}diff --git a/core/models/src/colors/tailwind-preset.cjs b/core/models/src/colors/tailwind-preset.cjsnew file mode 100644index 000000000..ae3d68b73--- /dev/null+++ b/core/models/src/colors/tailwind-preset.cjs@@ -0,0 +1,27 @@+/*+ * <auto-generated />+ * This file is auto-generated from core/models/src/colors/palette.json by core/models/scripts/generate-colors.cjs.+ * Do not edit this file directly. Run 'node core/models/scripts/generate-colors.cjs' to regenerate.+ */++/** Tailwind preset with the AliasVault brand colors. */+module.exports = {+ theme: {+ extend: {+ colors: {+ primary: {+ '50': '#ffe096',+ '100': '#fdde85',+ '200': '#fbcb74',+ '300': '#f8b963',+ '400': '#f6a752',+ '500': '#f49541',+ '600': '#d68338',+ '700': '#b8702f',+ '800': '#9a5d26',+ '900': '#7b4a1e',+ },+ },+ },+ },+};