@rescui/select 0.15.1-RUI-280-Update-select-component-downshift-cd2a98813.66 → 0.15.1-RUI-280-Update-select-component-downshift-2f40ef205.67

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.
@@ -1,15 +1,15 @@
1
1
  var styles = {
2
- "icon": "_icon_3cnwak_4",
3
- "sizeXS": "_sizeXS_3cnwak_14",
4
- "sizeS": "_sizeS_3cnwak_18",
5
- "sizeM": "_sizeM_3cnwak_22",
6
- "sizeL": "_sizeL_3cnwak_26",
7
- "light": "_light_3cnwak_30",
8
- "dark": "_dark_3cnwak_34",
9
- "allVariants": "_allVariants_3cnwak_48",
10
- "variant16": "_variant16_3cnwak_53",
11
- "variant20": "_variant20_3cnwak_54",
12
- "variant24": "_variant24_3cnwak_55",
13
- "variant28": "_variant28_3cnwak_58"
2
+ "icon": "_icon_1oaepe8_4",
3
+ "sizeXS": "_sizeXS_1oaepe8_14",
4
+ "sizeS": "_sizeS_1oaepe8_18",
5
+ "sizeM": "_sizeM_1oaepe8_22",
6
+ "sizeL": "_sizeL_1oaepe8_26",
7
+ "light": "_light_1oaepe8_30",
8
+ "dark": "_dark_1oaepe8_34",
9
+ "allVariants": "_allVariants_1oaepe8_48",
10
+ "variant16": "_variant16_1oaepe8_53",
11
+ "variant20": "_variant20_1oaepe8_54",
12
+ "variant24": "_variant24_1oaepe8_55",
13
+ "variant28": "_variant28_1oaepe8_58"
14
14
  };
15
15
  export { styles as default };
@@ -0,0 +1,10 @@
1
+ export declare type UseFocusParams = {
2
+ isDisabled?: boolean;
3
+ };
4
+ export declare const useFocus: ({ isDisabled }: UseFocusParams) => {
5
+ isFocused: boolean;
6
+ focusProps: {
7
+ onFocus: () => void;
8
+ onBlur: () => void;
9
+ };
10
+ };
@@ -0,0 +1,17 @@
1
+ import { useState } from 'react';
2
+
3
+ const useFocus = _ref => {
4
+ let {
5
+ isDisabled
6
+ } = _ref;
7
+ const [isFocused, setIsFocused] = useState(false);
8
+ return {
9
+ isFocused,
10
+ focusProps: {
11
+ onFocus: () => setIsFocused(!isDisabled),
12
+ onBlur: () => setIsFocused(false)
13
+ }
14
+ };
15
+ };
16
+
17
+ export { useFocus };
@@ -0,0 +1,10 @@
1
+ export declare type UseHoverParams = {
2
+ isDisabled?: boolean;
3
+ };
4
+ export declare const useHover: ({ isDisabled }: UseHoverParams) => {
5
+ isHovered: boolean;
6
+ hoverProps: {
7
+ onMouseEnter: () => void;
8
+ onMouseLeave: () => void;
9
+ };
10
+ };
@@ -0,0 +1,17 @@
1
+ import { useState } from 'react';
2
+
3
+ const useHover = _ref => {
4
+ let {
5
+ isDisabled
6
+ } = _ref;
7
+ const [isHovered, setIsHovered] = useState(false);
8
+ return {
9
+ isHovered,
10
+ hoverProps: {
11
+ onMouseEnter: () => setIsHovered(!isDisabled),
12
+ onMouseLeave: () => setIsHovered(false)
13
+ }
14
+ };
15
+ };
16
+
17
+ export { useHover };