feat(ui): expand reusable component foundation

- add Base UI and shadcn primitives for overlays, forms, navigation, feedback, and data display

- add optimized DOM ripple hooks with ref composition and integrate the behavior into interactive controls

- add AnchoredSurface SVG geometry and arrow-aware popover, dropdown, and tooltip rendering

- extend responsive breakpoint and style utilities, declare component dependencies, and remove the redundant package ESLint config
This commit is contained in:
Maofeng
2026-07-29 21:22:31 +08:00
parent cf8a7631e2
commit 7b9270ef67
68 changed files with 9209 additions and 144 deletions
+14
View File
@@ -4,3 +4,17 @@ import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
export function separate<T, R>({ items, iterator, separator }: {
items: ReadonlyArray<T>,
iterator: (item: T, index: number) => R,
separator: (index: number) => R,
}): R[] {
return items.reduce<R[]>((acc, item, index) => {
if (index > 0) {
acc.push(separator(index))
}
acc.push(iterator(item, index))
return acc
}, [])
}