Files
kaiser-natron/dist/assets/RadiiSection-C8GF-dAV.js
Dorian 7b44260fbc feat(search): product search component + navbar triggers
Adds a client-side fuzzy product search to the design system:

- `src/api/products.js`: fixture catalogue (22 products across the Kaiser
  Natron, Holste, Gazelle, Grüne Tante and Linda ranges) plus a scored,
  diacritic-folded search (ß→ss, ä→ae, NFKD) with weighted fields
  (title 5, brand/keywords 3, size/category 2, id 1) and prefix bonus.
- `Search.vue`: tone-driven (brand/paper/cream) full-screen overlay on
  mobile, centered modal on md+. Auto-focus, arrow-key nav, Enter/Esc,
  suggested-products empty state, keyboard-hint footer on desktop, safe-
  area aware, scroll-locks the document while open.
- Navbar now hosts two triggers: a pill-shaped "Search products"
  lookalike (desktop, in the same LanguageSwitcher-style container) and
  a green/accent shadow-sm floating button bottom-left on mobile. Both
  open the same overlay.
- HomePage feeds the products list into Navbar.
- Design-system showcase (`/design/search`) with live demo + canned
  result preview + usage snippet. Sidebar + mobile bottom-nav entries
  and DE/EN i18n added.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 13:40:21 +01:00

1 line
1.0 KiB
JavaScript

import{C as e,L as t,c as n,et as r,k as i,r as a,s as o,tt as s,u as c,x as l}from"./runtime-core.esm-bundler-CjdnoyKJ.js";import{t as u}from"./i18n-DuB4OiH1.js";import{t as d}from"./SectionShell-aXzaQlw9.js";var f={class:`grid grid-cols-2 sm:grid-cols-3 gap-6`},p={class:`font-mono text-[12px] text-ink block`},m={class:`text-[12px] text-muted mt-1`},h={__name:`RadiiSection`,setup(h){let{t:g}=u(),_=[{name:`xs`,value:`6px`},{name:`sm`,value:`10px`},{name:`md`,value:`16px`},{name:`lg`,value:`20px`},{name:`xl`,value:`28px`},{name:`pill`,value:`100px`}];return(u,h)=>(l(),n(d,{eyebrow:t(g)(`ds.eyebrow.tokens`),title:t(g)(`ds.radii.title`),description:t(g)(`ds.radii.description`)},{default:i(()=>[o(`div`,f,[(l(),c(a,null,e(_,e=>o(`div`,{key:e.name,class:`flex flex-col items-center`},[o(`div`,{class:`h-32 w-full bg-paper border border-line mb-4 shadow-sm`,style:r({borderRadius:`var(--radius-${e.name})`})},null,4),o(`code`,p,`--radius-`+s(e.name),1),o(`span`,m,s(e.value),1)])),64))])]),_:1},8,[`eyebrow`,`title`,`description`]))}};export{h as default};