@activecollab/components 1.0.32 → 1.0.33
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/dist/cjs/hooks/index.js +13 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/index.d.ts.map +1 -1
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/index.js +24 -24
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -16,4 +16,17 @@ Object.keys(_useInitScrollRef).forEach(function (key) {
|
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
|
+
|
|
20
|
+
var _useHeight = require("./useHeight");
|
|
21
|
+
|
|
22
|
+
Object.keys(_useHeight).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _useHeight[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _useHeight[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
19
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./useInitScrollRef\";\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/hooks/index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./useInitScrollRef\";\nexport * from \"./useHeight\";\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAd","sourcesContent":["export * from \"./useInitScrollRef\";\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAd;AACA,cAAc,aAAd","sourcesContent":["export * from \"./useInitScrollRef\";\nexport * from \"./useHeight\";\n"],"file":"index.js"}
|
package/dist/index.js
CHANGED
|
@@ -4120,6 +4120,30 @@
|
|
|
4120
4120
|
return ref;
|
|
4121
4121
|
};
|
|
4122
4122
|
|
|
4123
|
+
var useHeight = function useHeight(ref) {
|
|
4124
|
+
var _useState = React.useState(0),
|
|
4125
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
4126
|
+
height = _useState2[0],
|
|
4127
|
+
setHeight = _useState2[1];
|
|
4128
|
+
|
|
4129
|
+
React.useEffect(function () {
|
|
4130
|
+
if (ref && ref.current) {
|
|
4131
|
+
var element = ref.current;
|
|
4132
|
+
var prevMaxHeight = element.style.maxHeight;
|
|
4133
|
+
var prevVisibility = element.style.visibility;
|
|
4134
|
+
element.style.visibility = "hidden";
|
|
4135
|
+
element.style.maxHeight = "none";
|
|
4136
|
+
var elementHeight = element.clientHeight;
|
|
4137
|
+
element.style.visibility = prevVisibility;
|
|
4138
|
+
element.style.maxHeight = prevMaxHeight;
|
|
4139
|
+
return setHeight(elementHeight);
|
|
4140
|
+
}
|
|
4141
|
+
}, [ref]);
|
|
4142
|
+
return height;
|
|
4143
|
+
};
|
|
4144
|
+
|
|
4145
|
+
var useHeight$1 = useHeight;
|
|
4146
|
+
|
|
4123
4147
|
var _excluded$q = ["as", "className", "invert"];
|
|
4124
4148
|
var ScrollElement = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
4125
4149
|
var _ref$as = _ref.as,
|
|
@@ -8045,30 +8069,6 @@
|
|
|
8045
8069
|
};
|
|
8046
8070
|
AccordionItemHead.displayName = "AccordionItemHead";
|
|
8047
8071
|
|
|
8048
|
-
var useHeight = function useHeight(ref) {
|
|
8049
|
-
var _useState = React.useState(0),
|
|
8050
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
8051
|
-
height = _useState2[0],
|
|
8052
|
-
setHeight = _useState2[1];
|
|
8053
|
-
|
|
8054
|
-
React.useEffect(function () {
|
|
8055
|
-
if (ref && ref.current) {
|
|
8056
|
-
var element = ref.current;
|
|
8057
|
-
var prevMaxHeight = element.style.maxHeight;
|
|
8058
|
-
var prevVisibility = element.style.visibility;
|
|
8059
|
-
element.style.visibility = "hidden";
|
|
8060
|
-
element.style.maxHeight = "none";
|
|
8061
|
-
var elementHeight = element.clientHeight;
|
|
8062
|
-
element.style.visibility = prevVisibility;
|
|
8063
|
-
element.style.maxHeight = prevMaxHeight;
|
|
8064
|
-
return setHeight(elementHeight);
|
|
8065
|
-
}
|
|
8066
|
-
}, [ref]);
|
|
8067
|
-
return height;
|
|
8068
|
-
};
|
|
8069
|
-
|
|
8070
|
-
var useHeight$1 = useHeight;
|
|
8071
|
-
|
|
8072
8072
|
var AccordionItemBody = function AccordionItemBody(_ref) {
|
|
8073
8073
|
var children = _ref.children,
|
|
8074
8074
|
className = _ref.className;
|