@idealyst/components 1.0.94 → 1.0.95
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": "@idealyst/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.95",
|
|
4
4
|
"description": "Shared component library for React and React Native",
|
|
5
5
|
"documentation": "https://github.com/IdealystIO/idealyst-framework/tree/main/packages/components#readme",
|
|
6
6
|
"readme": "README.md",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publish:npm": "npm publish"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@idealyst/theme": "^1.0.
|
|
44
|
+
"@idealyst/theme": "^1.0.95",
|
|
45
45
|
"@mdi/js": ">=7.0.0",
|
|
46
46
|
"@mdi/react": ">=1.0.0",
|
|
47
47
|
"@react-native-vector-icons/common": ">=12.0.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@idealyst/theme": "^1.0.
|
|
94
|
+
"@idealyst/theme": "^1.0.95",
|
|
95
95
|
"@mdi/react": "^1.6.1",
|
|
96
96
|
"@types/react": "^19.1.0",
|
|
97
97
|
"react": "^19.1.0",
|
package/src/Input/Input.web.tsx
CHANGED
|
@@ -58,7 +58,9 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(({
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
const handleFocus = () => {
|
|
61
|
+
const handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
e.stopPropagation();
|
|
62
64
|
setIsFocused(true);
|
|
63
65
|
if (onFocus) {
|
|
64
66
|
onFocus();
|
|
@@ -113,7 +113,8 @@ function buildDynamicTriggerStyles(theme: Theme) {
|
|
|
113
113
|
true: {
|
|
114
114
|
borderColor: theme.intents.primary.primary,
|
|
115
115
|
_web: {
|
|
116
|
-
border: `
|
|
116
|
+
border: `1px solid ${theme.intents.primary.primary}`,
|
|
117
|
+
boxShadow: `0 0 0 2px ${theme.intents.primary.primary}20`,
|
|
117
118
|
outline: 'none',
|
|
118
119
|
},
|
|
119
120
|
},
|
|
@@ -109,6 +109,14 @@ const Select = forwardRef<HTMLDivElement, SelectProps>(({
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
+
const handleTriggerFocus = () => {
|
|
113
|
+
if (!disabled && !isOpen) {
|
|
114
|
+
setIsOpen(true);
|
|
115
|
+
setSearchTerm('');
|
|
116
|
+
setFocusedIndex(-1);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
112
120
|
const handleOptionSelect = (option: SelectOption) => {
|
|
113
121
|
if (!option.disabled) {
|
|
114
122
|
onValueChange(option.value);
|
|
@@ -151,6 +159,7 @@ const Select = forwardRef<HTMLDivElement, SelectProps>(({
|
|
|
151
159
|
<button
|
|
152
160
|
{...triggerWebProps}
|
|
153
161
|
onClick={handleTriggerClick}
|
|
162
|
+
onFocus={handleTriggerFocus}
|
|
154
163
|
disabled={disabled}
|
|
155
164
|
aria-label={accessibilityLabel || label}
|
|
156
165
|
aria-expanded={isOpen}
|