{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "search",
  "type": "registry:ui",
  "title": "Search",
  "description": "Deprecated: compose a search field from TextInput instead. Search is a TextInput with a fixed leading search icon and type=\"search\" on the underlying input.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/styles.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/components/search/Search.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/search/Search.tsx",
      "content": "'use client';\n\nimport { RiSearchLine } from '@remixicon/react';\nimport React from 'react';\n\nimport { TextInput } from '../text-input/TextInput';\nimport type { SearchProps } from './Search.types';\n\n/**\n * @deprecated Search will be removed in a future minor release. Compose the field from\n * `TextInput` instead (the TextInput \"Search\" example):\n *\n * ```tsx\n * <TextInput value={query} onChange={(event) => setQuery(event.target.value)}>\n *   <TextInput.Prefix inner>\n *     <TextInput.Icon icon={RiSearchLine} />\n *   </TextInput.Prefix>\n *   <TextInput.Input type=\"search\" aria-label=\"Search invoices\" />\n *   <TextInput.Suffix inner>\n *     <TextInput.ClearButton onClear={handleClear} />\n *   </TextInput.Suffix>\n * </TextInput>\n * ```\n *\n * - `showClearButton={false}`: leave out the `TextInput.Suffix` with the clear button.\n * - `clearAriaLabel`: `aria-label` on `TextInput.ClearButton` (defaults to `'Clear'`).\n * - The root's `data-slot` becomes `text-input` (was `search`); pass `data-slot=\"search\"` to\n *   `TextInput` to keep `[data-slot=search]` selectors working.\n */\nexport const Search = React.forwardRef<HTMLInputElement, SearchProps>(\n  (\n    {\n      preset = 'border',\n      size,\n      variant,\n      className,\n      showClearButton = true,\n      value,\n      onChange,\n      onClear,\n      clearAriaLabel,\n      disabled,\n      defaultMotion,\n      ...rest\n    },\n    ref,\n  ) => {\n    // The other props and the ref go to the `<input>` through TextInput; the part marker\n    // belongs to the root, and a composing component (Select.Search) passes its own.\n    const { 'data-slot': dataSlot = 'search', ...inputProps } = rest as typeof rest & {\n      'data-slot'?: string;\n    };\n    return (\n      <TextInput\n        data-slot={dataSlot}\n        ref={ref}\n        preset={preset}\n        size={size}\n        variant={variant}\n        className={className}\n        value={value}\n        onChange={onChange}\n        disabled={disabled}\n        defaultMotion={defaultMotion}\n        {...inputProps}\n      >\n        <TextInput.Prefix inner>\n          <TextInput.Icon icon={RiSearchLine} />\n        </TextInput.Prefix>\n        <TextInput.Input type=\"search\" />\n        {showClearButton && (\n          <TextInput.Suffix inner>\n            <TextInput.ClearButton onClear={onClear} aria-label={clearAriaLabel} />\n          </TextInput.Suffix>\n        )}\n      </TextInput>\n    );\n  },\n);\n\nSearch.displayName = 'Search';\n"
    },
    {
      "path": "src/components/search/Search.types.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/search/Search.types.ts",
      "content": "import type { TextInputProps } from '../text-input/TextInput.types';\n\n/**\n * Props forwarded to `Search`.\n * Inherits the full `TextInput` API except for `children` (the composition is fixed:\n * leading search icon, input, optional clear button) and `type` (locked to `\"search\"`\n * for native semantics).\n *\n * @deprecated Use `TextInputProps` and compose the field from `TextInput`; see `Search`.\n */\nexport type SearchProps = Omit<TextInputProps, 'children' | 'type'> & {\n  /** Renders the clear button while the input holds a value and is enabled. Defaults to `true`. */\n  showClearButton?: boolean;\n  /** Called after the value is cleared via the clear button, in both controlled and uncontrolled modes. */\n  onClear?: () => void;\n  /** Accessible label for the clear button. Defaults to `'Clear'`. */\n  clearAriaLabel?: string;\n};\n"
    }
  ],
  "meta": {
    "version": "1.0.0",
    "commit": "8bb3627"
  }
}
