@idealyst/components 1.2.79 → 1.2.81
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 +4 -4
- package/src/Menu/Menu.native.tsx +0 -1
- package/src/Menu/Menu.styles.tsx +1 -0
- package/src/Menu/MenuItem.native.tsx +1 -0
- package/src/Menu/MenuItem.styles.tsx +1 -0
- package/src/Pressable/Pressable.styles.tsx +7 -1
- package/src/Pressable/Pressable.web.tsx +1 -11
- package/src/internal/PositionedPortal.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idealyst/components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.81",
|
|
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.81",
|
|
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.81",
|
|
111
|
+
"@idealyst/tooling": "^1.2.81",
|
|
112
112
|
"@mdi/react": "^1.6.1",
|
|
113
113
|
"@types/react": "^19.1.0",
|
|
114
114
|
"react": "^19.1.0",
|
package/src/Menu/Menu.native.tsx
CHANGED
package/src/Menu/Menu.styles.tsx
CHANGED
|
@@ -111,6 +111,7 @@ export const menuItemStyles = defineStyle('MenuItem', (theme: Theme) => ({
|
|
|
111
111
|
justifyContent: 'center' as const,
|
|
112
112
|
flexShrink: 0,
|
|
113
113
|
marginRight: 12,
|
|
114
|
+
color: theme.colors.text.primary,
|
|
114
115
|
variants: {
|
|
115
116
|
size: {
|
|
116
117
|
width: theme.sizes.$menu.iconSize,
|
|
@@ -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
|
|
@@ -240,7 +240,7 @@ export const PositionedPortal: React.FC<PositionedPortalProps> = ({
|
|
|
240
240
|
position: 'fixed',
|
|
241
241
|
top: position.top,
|
|
242
242
|
left: position.left,
|
|
243
|
-
width: position.width,
|
|
243
|
+
...(position.width != null && { width: position.width }),
|
|
244
244
|
zIndex,
|
|
245
245
|
opacity: isPositioned ? 1 : 0,
|
|
246
246
|
pointerEvents: isPositioned ? 'auto' : 'none',
|