feat: chip stagger animation, IB green color theme

This commit is contained in:
2026-05-12 20:04:58 +03:00
parent cae952cd87
commit 5d6023bd48
2 changed files with 59 additions and 1 deletions
+6
View File
@@ -199,10 +199,13 @@
const categoryQ = normalize(state.categorySearch);
el.vendorList.innerHTML = "";
let vi = 0;
for (const vendor of state.data.vendors) {
if (vendorQ && !normalize(vendor.name).includes(vendorQ)) continue;
const node = document.createElement("button");
node.className = "chip";
node.style.animationDelay = Math.min(vi * 16, 320) + 'ms';
vi++;
if (state.selectedVendors.has(vendor.id)) node.classList.add("active");
else if (!allowedVendors.has(vendor.id)) node.classList.add("dim");
node.textContent = vendor.name;
@@ -229,11 +232,14 @@
el.categoryList.innerHTML = "";
const showOnlyLinkedCategories = state.selectedVendors.size > 0;
let ci = 0;
for (const category of state.data.categories) {
if (categoryQ && !normalize(category.name).includes(categoryQ)) continue;
if (showOnlyLinkedCategories && !allowedCategories.has(category.id) && !state.selectedCategories.has(category.id)) continue;
const node = document.createElement("button");
node.className = "chip";
node.style.animationDelay = Math.min(ci * 14, 280) + 'ms';
ci++;
if (state.selectedCategories.has(category.id)) node.classList.add("active");
else if (!allowedCategories.has(category.id)) node.classList.add("dim");
node.textContent = category.name;