# Filter Row — Figma Assembly Rules

<!-- figma-assembly.v2
{ "schemaVersion":"figma-assembly.v2", "id":"component.filter-row", "level":"organism", "kind":"published", "aliases":["Filter-row","Filter Row","wbl-filters"], "uxSpec":"specs/ux/components/organisms/wbl-filter-row.md", "inventoryTarget":"filters", "componentKeys":["a66771d2cfb607d2e8383c5fb45c3842a8fe8bd7"], "dependencies":["component.filter-chip"], "optionalDependencies":["component.button"], "coveredBy":[] }
-->

Status: active Figma assembly contract.

## Scope

Use this contract for the `Filter-row` filter-management region. Search,
switches, column controls, and other trailing controls normally belong to the
enclosing list/table composition. When `Actions=true`, the published component
owns its trailing action slot.

## Source Evidence

- Current direct Figma evidence: `🟣 🚛 Filter-row` `21003:107046` passed
  context, screenshot, and variable checks; its behavior specification is
  `12367:83559`. The current node supersedes the stale visual guidance from
  `14713:34219`.
- The existing marker key is preserved as historical published-marker evidence.
  The current exact-node read did not expose a replacement master component key;
  do not change or manufacture a key until a verified Figma read resolves it.
- The current Row contains Filter Chip instances. The Chip's inventory-linked
  local-composition sidecar records their verified anatomy and the unavailable
  main component key; the key gap does not prevent this required Row dependency.

## Required Assembly

- Dependency classification: `component.filter-chip` is required because the
  Row's left region is defined by Filter Chip instances. `component.button` is
  optional because `+ Фильтр` depends on the configured Row state. Badge is not
  direct Row anatomy: its conditional `Selected=Many` use belongs only to the
  Filter Chip contract.
- Rule ID: `filter-row.published` — use the canonical Filter Row for the left
  filter region and right action region; never redraw either locally.
- The left region contains the independently wrapping Chip list, `+ Фильтр`,
  and reset. The right region contains switches, columns, and actions; it stays
  shrink-to-fit while the left region wraps. A filter addition opens its new
  optional Chip; an empty optional Chip disappears when its overlay closes.
- Required, pinned, optional, disabled, invalid, empty, one-value, and
  many-value Chip states are distinct. Required clears and its owner may expose
  an error when empty; pinned resets but stays visible; optional clears and
  removes. Do not draw an ad-hoc close icon or local error treatment.
- Reset is visible only after a non-default change, appears after a divider in
  the left region, reads «Сбросить фильтры», restores pinned defaults, removes
  optional filters, and closes active overlays. `+ Фильтр` is a secondary Button
  and remains visible while its menu is open.
- Figma property names such as `f1`, `clear`, and `Actions` are construction
  evidence only. They do not define Angular inputs.

## Tokens And Sizing

- In the right region every group (Switch-container, Columns, CTA) begins
  with a 1×20 `div` line, `--space-200` before its controls; groups are
  `--space-200` apart; `CTA1` and `more` have no gap.
- Use `--space-900` between left and right regions, `--space-400` inside the
  left filter group, and `--space-200` for Chip wrapping and standard 8px
  padding. Chips use `--radius-s`, `--space-300` inline-start padding,
  `--space-50` within the label/value/chevron body, and 16px icon/separator
  geometry from the existing spacing scale.
- Map default, selected/opened, hover, pressed, disabled, error, and
  error-hover through the existing semantic background, text-icon, stroke, and
  danger token families; do not substitute raw Figma colors.

## Verification Checklist

- `filter-row.published`: the Row and nested canonical controls remain
  instances, with the left wrapping region and right static region intact.
- Required, pinned, optional, disabled, and invalid conditions have no ad-hoc
  close controls or local color treatments.
- Filter values, defaults, lifecycle, overlay ownership, and actions remain
  screen-specific configuration.
