@snapdragonsnursery/react-components 1.17.8 → 1.17.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapdragonsnursery/react-components",
3
- "version": "1.17.8",
3
+ "version": "1.17.9",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -26,12 +26,17 @@
26
26
  // - showSiteName?: boolean // show site below name (default: true)
27
27
  // - showEmployeeId?: boolean // show employee ID below name (default: false)
28
28
  // - showEmail?: boolean // show email below name (default: false)
29
- // - placeholder?: string
29
+ // - placeholder?: string // select trigger placeholder (default: 'Select employee…')
30
+ // - searchPlaceholder?: string // search input placeholder (default: 'Search employees...')
30
31
  // - disabled?: boolean
31
32
  // - className?: string
32
33
  // - allowAll?: boolean // include "All employees" option
33
34
  // - allLabel?: string // custom label for all option
34
35
  // - maxHeight?: string // max height for dropdown (default: '160px')
36
+ // - enableServerSearch?: boolean // enable server-side search (default: false)
37
+ // - onSearchChange?: (query: string) => void // callback for search query changes
38
+ // - searchResults?: Array<employee> // search results from server
39
+ // - isSearching?: boolean // loading state for server search
35
40
 
36
41
  import React from "react";
37
42
  import { Users, Search } from "lucide-react";
@@ -56,6 +61,7 @@ export const EmployeeSelect = ({
56
61
  showEmployeeId = false,
57
62
  showEmail = false,
58
63
  placeholder = "Select employee…",
64
+ searchPlaceholder = "Search employees...",
59
65
  disabled = false,
60
66
  className,
61
67
  allowAll = false,
@@ -252,7 +258,7 @@ export const EmployeeSelect = ({
252
258
  <input
253
259
  ref={searchInputRef}
254
260
  type="text"
255
- placeholder={enableServerSearch ? "Search employees..." : "Search employees..."}
261
+ placeholder={searchPlaceholder}
256
262
  value={searchTerm}
257
263
  onChange={(e) => setSearchTerm(e.target.value)}
258
264
  className="w-full pl-8 pr-3 py-2 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 bg-background"