@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.
Files changed (2) hide show
  1. package/lib/index.js +9 -17
  2. 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
- return /* @__PURE__ */ jsx(RenderComponent, { ...useMemo(() => {
133
- const baseProps = needsRef ? {
134
- ...props,
135
- ref: internalRef
136
- } : props;
137
- const filteredProps = needsFiltering ? omit(baseProps, options.filterAttrs) : baseProps;
138
- if (process.env.NODE_ENV !== "production") return {
139
- ...filteredProps,
140
- "data-attrs": componentName
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.1",
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.0",
63
- "@vitus-labs/elements": "1.4.1",
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": "2f86d2bd6fd95c07ebcc13329251ecf8ac7c6b19"
68
+ "gitHead": "f12f43c61149964ff4f3f4b80cb6f92da2825915"
69
69
  }