@agility/plenum-ui 2.0.0-rc48 → 2.0.0-rc49

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.
@@ -22,6 +22,8 @@ export interface ISelectProps {
22
22
  isRequired?: boolean;
23
23
  value?: string;
24
24
  className?: string;
25
+ onFocus?: () => void;
26
+ onBlur?: () => void;
25
27
  }
26
28
  declare const Select: React.FC<ISelectProps>;
27
29
  export default Select;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agility/plenum-ui",
3
- "version": "2.0.0-rc48",
3
+ "version": "2.0.0-rc49",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -80,4 +80,4 @@
80
80
  "react-dom": "18.2.0",
81
81
  "react-icons": "^4.10.1"
82
82
  }
83
- }
83
+ }
@@ -28,6 +28,10 @@ export interface ISelectProps {
28
28
  value?: string
29
29
 
30
30
  className?: string
31
+
32
+ onFocus?: () => void
33
+
34
+ onBlur?: () => void
31
35
  }
32
36
  const Select: React.FC<ISelectProps> = ({
33
37
  label,
@@ -39,7 +43,9 @@ const Select: React.FC<ISelectProps> = ({
39
43
  isError,
40
44
  isRequired,
41
45
  value,
42
- className
46
+ className,
47
+ onFocus,
48
+ onBlur
43
49
  }) => {
44
50
  const [selectedOption, setSelectedOption] = useState<string>(value || options[0].value)
45
51
  const uniqueID = useId()
@@ -84,6 +90,8 @@ const Select: React.FC<ISelectProps> = ({
84
90
  onChange={handleChange}
85
91
  disabled={isDisabled}
86
92
  value={selectedOption}
93
+ onFocus={onFocus}
94
+ onBlur={onBlur}
87
95
  >
88
96
  {options.map(({ value, label }) => {
89
97
  return (