{
  "$schema": "https://registry.ui.frontic.com/item.schema.json",
  "title": "Search",
  "description": "A search field whose panel offers products, categories and suggestions while the shopper types, with a \"Search for\" row that submits; inline under the field or in an overlay.",
  "components": {
    "Search": "Groups all parts of the search: a field whose panel offers results, suggestions and a \"Search for\" row.",
    "SearchEmpty": "A line of text in the panel, such as \"No results for …\"; the shop decides when it shows.",
    "SearchGroup": "A headed section of the panel: products, categories, brands, or suggestions.",
    "SearchHighlight": "Text with every match of the search terms in bold; the terms default to the typed query.",
    "SearchInput": "The search field: a search icon, the input, and a button that clears it.",
    "SearchItem": "One row of the panel that opens something: a link, so middle-click and open-in-new-tab work.",
    "SearchLoading": "Skeleton rows and \"Searching…\" while the shop's search answers; shows only while Search is loading.",
    "SearchOverlay": "Shows the search in an overlay: near the top on wide screens, full screen on phones with a Cancel button.",
    "SearchOverlayTrigger": "Opens the search overlay; focus returns to it when the overlay closes, also after a click that never focused it.",
    "SearchQuery": "The first row while the shopper types: \"Search for …\", which submits the query to the results page.",
    "SearchResults": "The panel of results, suggestions and the \"Search for\" row, under the field or inside the overlay.",
    "SearchTag": "A suggested search, drawn as a tag; opening it runs that search."
  },
  "recipes": {
    "search-cancel": {
      "composes": ["focus-ring"],
      "base": {
        "typography": "{typography.small}"
      }
    },
    "search-empty": {
      "base": {
        "typography": "{typography.small}",
        "textColor": "{colors.muted-foreground}",
        "paddingX": "{spacing.3}",
        "paddingY": "{spacing.3}"
      }
    },
    "search-group": {
      "base": {
        "paddingY": "{spacing.1}",
        "display": "flex",
        "flexDirection": "column"
      }
    },
    "search-group-heading": {
      "base": {
        "extends": "menu-label",
        "paddingX": "{spacing.3}",
        "paddingY": "{spacing.2}"
      }
    },
    "search-highlight": {
      "base": {
        "backgroundColor": "transparent",
        "fontWeight": "semibold"
      }
    },
    "search-input": {
      "base": {
        "extends": "control-box",
        "backgroundColor": "{colors.background}",
        "height": "{spacing.10}",
        "paddingX": "{spacing.3}",
        "gap": "{spacing.2}",
        "display": "flex",
        "minWidth": "{spacing.0}",
        "flex": "1",
        "alignItems": "center",
        "icon": {
          "size": "{spacing.4}"
        },
        "focusWithin": {
          "borderColor": "{colors.ring}",
          "outline": "{ring.wide}",
          "outlineColor": "{colors.ring}"
        }
      }
    },
    "search-input-clear": {
      "composes": ["focus-ring"],
      "base": {
        "opacity": "{opacity.60}",
        "size": "{spacing.5}",
        "hover": {
          "opacity": "{opacity.100}"
        }
      }
    },
    "search-item": {
      "composes": ["disabled"],
      "base": {
        "extends": "option-item",
        "gap": "{spacing.3}",
        "paddingX": "{spacing.3}",
        "paddingY": "{spacing.2}",
        "display": "flex",
        "alignItems": "center",
        "icon": {
          "size": "{spacing.4}"
        }
      }
    },
    "search-loading": {
      "base": {
        "gap": "{spacing.3}",
        "paddingX": "{spacing.3}",
        "paddingY": "{spacing.2}",
        "display": "flex",
        "flexDirection": "column"
      }
    },
    "search-loading-label": {
      "base": {
        "typography": "{typography.small}",
        "textColor": "{colors.muted-foreground}"
      }
    },
    "search-loading-row": {
      "base": {
        "gap": "{spacing.3}"
      }
    },
    "search-overlay": {
      "base": {
        "extends": "overlay-modal",
        "gap": "{spacing.2}",
        "padding": "{spacing.4}",
        "display": "flex",
        "flexDirection": "column"
      }
    },
    "search-overlay-backdrop": {
      "base": {
        "extends": "overlay-backdrop"
      }
    },
    "search-query": {
      "base": {
        "extends": "option-item",
        "gap": "{spacing.2}",
        "paddingX": "{spacing.3}",
        "paddingY": "{spacing.2.5}",
        "display": "flex",
        "alignItems": "center",
        "icon": {
          "size": "{spacing.4}"
        }
      }
    },
    "search-query-term": {
      "base": {
        "fontWeight": "semibold"
      }
    },
    "search-results": {
      "base": {
        "display": "flex",
        "flexDirection": "column"
      },
      "variants": {
        "position": {
          "popper": {
            "extends": "overlay"
          },
          "inline": {}
        }
      },
      "defaults": {
        "position": "popper"
      }
    },
    "search-results-viewport": {
      "base": {
        "scrollbar": "none",
        "paddingY": "{spacing.1.5}"
      }
    },
    "search-tag": {
      "base": {
        "extends": "tag",
        "height": "{spacing.8}",
        "paddingX": "{spacing.3}",
        "display": "inline-flex",
        "flexShrink": "0",
        "alignItems": "center",
        "highlighted": {
          "backgroundColor": "{colors.muted}",
          "borderColor": "{colors.foreground}"
        }
      }
    }
  }
}
