feat(client): add Timestamp component, ESLint 10 + Prettier, and code quality fixes

- add Timestamp component with moment relative time and ISO tooltip
- add Timestamp stories (JustNow, MinutesAgo, HoursAgo, DaysAgo, MonthsAgo)
- add ESLint 10 with typescript-eslint, react-hooks, react-refresh, prettier
- add Prettier config with singleQuote, semi, trailingComma all, printWidth 100
- add lint, lint:fix, format, test:storybook scripts to package.json
- fix react-hooks/set-state-in-effect in all page components
- auto-fix 113 Prettier formatting issues across src and .storybook
This commit is contained in:
2026-04-09 10:25:15 +03:00
parent 50b942801f
commit 32beec2229
29 changed files with 1175 additions and 280 deletions
+19 -3
View File
@@ -15,7 +15,15 @@ export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectE
placeholder?: string;
}
export function Select({ label, hint, error, options, placeholder, className, ...props }: SelectProps) {
export function Select({
label,
hint,
error,
options,
placeholder,
className,
...props
}: SelectProps) {
const id = useId();
return (
<div className={styles.wrapper}>
@@ -27,7 +35,9 @@ export function Select({ label, hint, error, options, placeholder, className, ..
<div className={styles.control}>
<select
id={id}
className={[styles.select, error ? styles.hasError : '', className].filter(Boolean).join(' ')}
className={[styles.select, error ? styles.hasError : '', className]
.filter(Boolean)
.join(' ')}
aria-describedby={error ? `${id}-error` : hint ? `${id}-hint` : undefined}
aria-invalid={error ? true : undefined}
{...props}
@@ -45,7 +55,13 @@ export function Select({ label, hint, error, options, placeholder, className, ..
</select>
<span className={styles.chevron} aria-hidden="true">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
<path d="M2 4L6 8L10 4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
<path
d="M2 4L6 8L10 4"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</span>
</div>