@idealyst/components 1.2.80 → 1.2.82
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.2.
|
|
3
|
+
"version": "1.2.82",
|
|
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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"publish:npm": "npm publish"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@idealyst/theme": "^1.2.
|
|
59
|
+
"@idealyst/theme": "^1.2.82",
|
|
60
60
|
"@mdi/js": ">=7.0.0",
|
|
61
61
|
"@mdi/react": ">=1.0.0",
|
|
62
62
|
"@react-native-vector-icons/common": ">=12.0.0",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@idealyst/blur": "^1.2.40",
|
|
110
|
-
"@idealyst/theme": "^1.2.
|
|
111
|
-
"@idealyst/tooling": "^1.2.
|
|
110
|
+
"@idealyst/theme": "^1.2.82",
|
|
111
|
+
"@idealyst/tooling": "^1.2.82",
|
|
112
112
|
"@mdi/react": "^1.6.1",
|
|
113
113
|
"@types/react": "^19.1.0",
|
|
114
114
|
"react": "^19.1.0",
|
|
@@ -22,7 +22,13 @@ export type PressableDynamicProps = {
|
|
|
22
22
|
* Pressable styles with spacing variants.
|
|
23
23
|
*/
|
|
24
24
|
export const pressableStyles = defineStyle('Pressable', (theme: Theme) => ({
|
|
25
|
-
pressable: (
|
|
25
|
+
pressable: (props: PressableDynamicProps & { disabled?: boolean }) => ({
|
|
26
|
+
cursor: props.disabled ? 'default' : 'pointer',
|
|
27
|
+
outline: 'none',
|
|
28
|
+
userSelect: 'none',
|
|
29
|
+
WebkitUserSelect: 'none',
|
|
30
|
+
WebkitTapHighlightColor: 'transparent',
|
|
31
|
+
opacity: props.disabled ? 0.5 : 1,
|
|
26
32
|
variants: {
|
|
27
33
|
// $iterator expands for each view size
|
|
28
34
|
padding: {
|
|
@@ -63,16 +63,7 @@ const Pressable = forwardRef<IdealystElement, PressableProps>(({
|
|
|
63
63
|
paddingHorizontal,
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
const webProps = getWebProps([(pressableStyles.pressable as any)({}), flattenStyle(style)]);
|
|
67
|
-
|
|
68
|
-
const baseStyle: React.CSSProperties = {
|
|
69
|
-
cursor: disabled ? 'default' : 'pointer',
|
|
70
|
-
outline: 'none',
|
|
71
|
-
userSelect: 'none',
|
|
72
|
-
WebkitUserSelect: 'none',
|
|
73
|
-
WebkitTapHighlightColor: 'transparent',
|
|
74
|
-
opacity: disabled ? 0.5 : 1,
|
|
75
|
-
};
|
|
66
|
+
const webProps = getWebProps([(pressableStyles.pressable as any)({ disabled }), flattenStyle(style)]);
|
|
76
67
|
|
|
77
68
|
// Merge ref from getWebProps with forwarded ref
|
|
78
69
|
const mergedRef = useMergeRefs(ref as any, webProps.ref as any);
|
|
@@ -84,7 +75,6 @@ const Pressable = forwardRef<IdealystElement, PressableProps>(({
|
|
|
84
75
|
id={id}
|
|
85
76
|
role={accessibilityRole}
|
|
86
77
|
tabIndex={disabled ? -1 : 0}
|
|
87
|
-
style={baseStyle}
|
|
88
78
|
onMouseDown={handleMouseDown}
|
|
89
79
|
onMouseUp={handleMouseUp}
|
|
90
80
|
onMouseLeave={handleMouseUp} // Handle mouse leave as press out
|