- Migrated from Python pre-commit to NodeJS-native solution - Reorganized documentation structure - Set up Husky + lint-staged for efficient pre-commit hooks - Fixed Dockerfile healthcheck issue - Added comprehensive documentation index
547 lines
13 KiB
TypeScript
547 lines
13 KiB
TypeScript
import React from 'react';
|
|
|
|
export const PillIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z' />
|
|
<path d='m8.5 8.5 7 7' />
|
|
</svg>
|
|
);
|
|
|
|
export const ClockIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<circle cx='12' cy='12' r='10' />
|
|
<polyline points='12 6 12 12 16 14' />
|
|
</svg>
|
|
);
|
|
|
|
export const CheckCircleIcon: React.FC<
|
|
React.SVGProps<SVGSVGElement>
|
|
> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z' />
|
|
<path d='m9 12 2 2 4-4' />
|
|
</svg>
|
|
);
|
|
|
|
export const XCircleIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<circle cx='12' cy='12' r='10' />
|
|
<line x1='15' y1='9' x2='9' y2='15' />
|
|
<line x1='9' y1='9' x2='15' y2='15' />
|
|
</svg>
|
|
);
|
|
|
|
export const PlusIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<line x1='12' y1='5' x2='12' y2='19' />
|
|
<line x1='5' y1='12' x2='19' y2='12' />
|
|
</svg>
|
|
);
|
|
|
|
export const TrashIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<polyline points='3 6 5 6 21 6' />
|
|
<path d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2' />
|
|
<line x1='10' y1='11' x2='10' y2='17' />
|
|
<line x1='14' y1='11' x2='14' y2='17' />
|
|
</svg>
|
|
);
|
|
|
|
export const EditIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'></path>
|
|
<path d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'></path>
|
|
</svg>
|
|
);
|
|
|
|
export const MenuIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<line x1='4' x2='20' y1='12' y2='12' />
|
|
<line x1='4' x2='20' y1='6' y2='6' />
|
|
<line x1='4' x2='20' y1='18' y2='18' />
|
|
</svg>
|
|
);
|
|
|
|
export const HistoryIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8' />
|
|
<path d='M3 3v5h5' />
|
|
<path d='M12 7v5l4 2' />
|
|
</svg>
|
|
);
|
|
|
|
export const InfoIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<circle cx='12' cy='12' r='10'></circle>
|
|
<line x1='12' y1='16' x2='12' y2='12'></line>
|
|
<line x1='12' y1='8' x2='12.01' y2='8'></line>
|
|
</svg>
|
|
);
|
|
|
|
export const SunIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<circle cx='12' cy='12' r='4'></circle>
|
|
<path d='M12 2v2'></path>
|
|
<path d='M12 20v2'></path>
|
|
<path d='m4.93 4.93 1.41 1.41'></path>
|
|
<path d='m17.66 17.66 1.41 1.41'></path>
|
|
<path d='M2 12h2'></path>
|
|
<path d='M20 12h2'></path>
|
|
<path d='m6.34 17.66-1.41 1.41'></path>
|
|
<path d='m19.07 4.93-1.41 1.41'></path>
|
|
</svg>
|
|
);
|
|
|
|
export const SunsetIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M12 10V2' />
|
|
<path d='m4.93 10.93 1.41 1.41' />
|
|
<path d='M2 18h2' />
|
|
<path d='M20 18h2' />
|
|
<path d='m19.07 10.93-1.41 1.41' />
|
|
<path d='M22 22H2' />
|
|
<path d='m16 6-4 4-4-4' />
|
|
<path d='M16 18a4 4 0 0 0-8 0' />
|
|
</svg>
|
|
);
|
|
|
|
export const MoonIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'></path>
|
|
</svg>
|
|
);
|
|
|
|
export const DesktopIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<rect width='20' height='14' x='2' y='3' rx='2' />
|
|
<line x1='8' x2='16' y1='21' y2='21' />
|
|
<line x1='12' x2='12' y1='17' y2='21' />
|
|
</svg>
|
|
);
|
|
|
|
export const SearchIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<circle cx='11' cy='11' r='8'></circle>
|
|
<line x1='21' y1='21' x2='16.65' y2='16.65'></line>
|
|
</svg>
|
|
);
|
|
|
|
export const CapsuleIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M8.5 16.5a5 5 0 1 0 0-9' />
|
|
<path d='M15.5 7.5a5 5 0 1 0 0 9' />
|
|
<line x1='8.5' y1='7.5' x2='15.5' y2='7.5' />
|
|
<line x1='8.5' y1='16.5' x2='15.5' y2='16.5' />
|
|
</svg>
|
|
);
|
|
|
|
export const SyringeIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='m18 2 4 4' />
|
|
<path d='m18 6 2.5-2.5' />
|
|
<path d='m13.5 7.5 7.5-7.5' />
|
|
<path d='M3 21l6-6' />
|
|
<path d='m3 11 8 8' />
|
|
<path d='m7 7 4 4' />
|
|
</svg>
|
|
);
|
|
|
|
export const BottleIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M9 11h6' />
|
|
<path d='M12 8v6' />
|
|
<path d='M20 10.5A6.5 6.5 0 0 0 7.5 4H7a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1h-.5A6.5 6.5 0 0 0 20 10.5Z' />
|
|
</svg>
|
|
);
|
|
|
|
export const TabletIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<circle cx='12' cy='12' r='10' />
|
|
<path d='m14.2 7.8-8.4 8.4' />
|
|
</svg>
|
|
);
|
|
|
|
export const SettingsIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 0 2l-.15.08a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1 0-2l.15-.08a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z' />
|
|
<circle cx='12' cy='12' r='3' />
|
|
</svg>
|
|
);
|
|
|
|
export const UserIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2' />
|
|
<circle cx='12' cy='7' r='4' />
|
|
</svg>
|
|
);
|
|
|
|
export const CameraIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z' />
|
|
<circle cx='12' cy='13' r='3' />
|
|
</svg>
|
|
);
|
|
|
|
export const BellIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9' />
|
|
<path d='M10.3 21a1.94 1.94 0 0 0 3.4 0' />
|
|
</svg>
|
|
);
|
|
|
|
export const ZzzIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M4 12h4l4 8 4-16h4' />
|
|
</svg>
|
|
);
|
|
|
|
export const WaterDropIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z' />
|
|
</svg>
|
|
);
|
|
|
|
export const CoffeeIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<path d='M10 2v2' />
|
|
<path d='M14 2v2' />
|
|
<path d='M16 8a4 4 0 0 1-4 4H8a4 4 0 0 1 0-8h8' />
|
|
<path d='M6 22V8h14v10a4 4 0 0 1-4 4H6' />
|
|
</svg>
|
|
);
|
|
|
|
export const BarChartIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (
|
|
<svg
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width='24'
|
|
height='24'
|
|
viewBox='0 0 24 24'
|
|
fill='none'
|
|
stroke='currentColor'
|
|
strokeWidth='2'
|
|
strokeLinecap='round'
|
|
strokeLinejoin='round'
|
|
{...props}
|
|
>
|
|
<line x1='12' y1='20' x2='12' y2='10' />
|
|
<line x1='18' y1='20' x2='18' y2='4' />
|
|
<line x1='6' y1='20' x2='6' y2='16' />
|
|
</svg>
|
|
);
|
|
|
|
export const medicationIcons: {
|
|
[key: string]: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
} = {
|
|
pill: PillIcon,
|
|
tablet: TabletIcon,
|
|
capsule: CapsuleIcon,
|
|
syringe: SyringeIcon,
|
|
bottle: BottleIcon,
|
|
};
|
|
|
|
export const getMedicationIcon = (
|
|
iconName?: string
|
|
): React.FC<React.SVGProps<SVGSVGElement>> => {
|
|
return (iconName && medicationIcons[iconName]) || PillIcon;
|
|
};
|
|
|
|
export const reminderIcons: {
|
|
[key: string]: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
} = {
|
|
bell: BellIcon,
|
|
water: WaterDropIcon,
|
|
break: CoffeeIcon,
|
|
};
|
|
|
|
export const getReminderIcon = (
|
|
iconName?: string
|
|
): React.FC<React.SVGProps<SVGSVGElement>> => {
|
|
return (iconName && reminderIcons[iconName]) || BellIcon;
|
|
};
|