@idealyst/components 1.2.112 → 1.2.114
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.114",
|
|
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.114",
|
|
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.114",
|
|
111
|
+
"@idealyst/tooling": "^1.2.114",
|
|
112
112
|
"@mdi/react": "^1.6.1",
|
|
113
113
|
"@types/react": "^19.1.0",
|
|
114
114
|
"react": "^19.1.0",
|
|
@@ -100,10 +100,11 @@ const Switch = forwardRef<IdealystElement, SwitchProps>(({
|
|
|
100
100
|
marginHorizontal,
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
const
|
|
103
|
+
const dynamicProps = { size, checked, disabled, hasError, intent, labelPosition };
|
|
104
|
+
const trackProps = getWebProps([(switchStyles.switchTrack as any)(dynamicProps)]);
|
|
105
|
+
const thumbProps = getWebProps([(switchStyles.switchThumb as any)(dynamicProps)]);
|
|
106
|
+
const thumbIconProps = getWebProps([(switchStyles.thumbIcon as any)(dynamicProps)]);
|
|
107
|
+
const labelProps = getWebProps([(switchStyles.label as any)(dynamicProps)]);
|
|
107
108
|
|
|
108
109
|
// Wrapper and helperText styles
|
|
109
110
|
const wrapperStyleComputed = (switchStyles.wrapper as any)({});
|
|
@@ -134,10 +135,10 @@ const Switch = forwardRef<IdealystElement, SwitchProps>(({
|
|
|
134
135
|
};
|
|
135
136
|
|
|
136
137
|
// Computed button props with static style references
|
|
137
|
-
const computedButtonProps = getWebProps([switchStyles.switchContainer as any]);
|
|
138
|
+
const computedButtonProps = getWebProps([(switchStyles.switchContainer as any)(dynamicProps)]);
|
|
138
139
|
|
|
139
140
|
// Computed container props (for when label exists)
|
|
140
|
-
const computedContainerProps = getWebProps([switchStyles.container as any, !needsWrapper && flattenStyle(style)].filter(Boolean));
|
|
141
|
+
const computedContainerProps = getWebProps([(switchStyles.container as any)(dynamicProps), !needsWrapper && flattenStyle(style)].filter(Boolean));
|
|
141
142
|
|
|
142
143
|
const mergedButtonRef = useMergeRefs(ref as React.Ref<HTMLButtonElement>, computedButtonProps.ref);
|
|
143
144
|
const mergedContainerRef = useMergeRefs(ref as React.Ref<HTMLDivElement>, computedContainerProps.ref);
|