@vitus-labs/attrs 1.4.1 → 1.4.2
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/lib/index.js +9 -17
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -129,23 +129,15 @@ const attrsComponent = (options) => {
|
|
|
129
129
|
});
|
|
130
130
|
const needsRef = ref ?? $attrsRef;
|
|
131
131
|
const needsFiltering = options.filterAttrs && options.filterAttrs.length > 0;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
};
|
|
142
|
-
return filteredProps;
|
|
143
|
-
}, [
|
|
144
|
-
props,
|
|
145
|
-
needsRef,
|
|
146
|
-
internalRef,
|
|
147
|
-
needsFiltering
|
|
148
|
-
]) });
|
|
132
|
+
const baseProps = needsRef ? {
|
|
133
|
+
...props,
|
|
134
|
+
ref: internalRef
|
|
135
|
+
} : props;
|
|
136
|
+
const filteredProps = needsFiltering ? omit(baseProps, options.filterAttrs) : baseProps;
|
|
137
|
+
return /* @__PURE__ */ jsx(RenderComponent, { ...process.env.NODE_ENV !== "production" ? {
|
|
138
|
+
...filteredProps,
|
|
139
|
+
"data-attrs": componentName
|
|
140
|
+
} : filteredProps });
|
|
149
141
|
});
|
|
150
142
|
const AttrsComponent = compose(...hocsFuncs)(EnhancedComponent);
|
|
151
143
|
AttrsComponent.IS_ATTRS = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/attrs",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Vit Bokisch <vit@bokisch.cz>",
|
|
6
6
|
"maintainers": [
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"react": ">= 19"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@vitus-labs/core": "1.4.
|
|
63
|
-
"@vitus-labs/elements": "1.4.
|
|
62
|
+
"@vitus-labs/core": "1.4.2",
|
|
63
|
+
"@vitus-labs/elements": "1.4.2",
|
|
64
64
|
"@vitus-labs/tools-rolldown": "^1.6.0",
|
|
65
65
|
"@vitus-labs/tools-storybook": "^1.6.0",
|
|
66
66
|
"@vitus-labs/tools-typescript": "^1.6.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "f12f43c61149964ff4f3f4b80cb6f92da2825915"
|
|
69
69
|
}
|