@adamjanicki/ui 1.3.6 → 1.3.7
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.
|
@@ -34,6 +34,6 @@ var Animated = function (_a) {
|
|
|
34
34
|
}
|
|
35
35
|
return function () { return clearTimeout(timeoutId); };
|
|
36
36
|
}, [visible, shouldRender, duration, keepMountedOnExit]);
|
|
37
|
-
return (_jsx("div", { className: classNames(className, animationState === "entering" ? enter === null || enter === void 0 ? void 0 : enter.className : exit === null || exit === void 0 ? void 0 : exit.className), style: __assign(__assign(__assign({}, style), (animationState === "entering" ? enter === null || enter === void 0 ? void 0 : enter.style : exit === null || exit === void 0 ? void 0 : exit.style)), { transition: "all ".concat(duration, "ms ease-in-out") }), children: shouldRender && children }));
|
|
37
|
+
return (_jsx("div", { className: classNames(className, animationState === "entering" ? enter === null || enter === void 0 ? void 0 : enter.className : exit === null || exit === void 0 ? void 0 : exit.className), style: __assign(__assign(__assign({}, style), (animationState === "entering" ? enter === null || enter === void 0 ? void 0 : enter.style : exit === null || exit === void 0 ? void 0 : exit.style)), { transition: "all ".concat(duration, "ms ease-in-out") }), "aria-hidden": !visible, children: shouldRender && children }));
|
|
38
38
|
};
|
|
39
39
|
export default Animated;
|
|
@@ -54,11 +54,13 @@ var Layer = function (_a) {
|
|
|
54
54
|
// Lock and unlock on mount and unmount
|
|
55
55
|
useScrollLock();
|
|
56
56
|
useEffect(function () {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
(
|
|
61
|
-
|
|
57
|
+
return function () {
|
|
58
|
+
var _a;
|
|
59
|
+
var activeEl = document.activeElement;
|
|
60
|
+
if (!returnFocusOnEscape) {
|
|
61
|
+
(_a = activeEl === null || activeEl === void 0 ? void 0 : activeEl.blur) === null || _a === void 0 ? void 0 : _a.call(activeEl);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
62
64
|
}, [returnFocusOnEscape]);
|
|
63
65
|
return _jsx(BaseLayer, __assign({}, props, { visible: true }));
|
|
64
66
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adamjanicki/ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "Basic UI components and hooks for React in TypeScript",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "git+https://github.com/adamjanicki2/ui.git"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build": "tsc; cp src/style.css ./style.css
|
|
14
|
+
"build": "tsc; cp src/style.css ./style.css",
|
|
15
15
|
"clean": "./clean.sh",
|
|
16
16
|
"dev": "nodemon --watch src --ext ts,tsx,css --exec \"npm run build\"",
|
|
17
17
|
"test": "jest --config jest.config.js",
|
package/style.css
CHANGED
|
@@ -170,11 +170,11 @@ button:not([disabled]):focus-visible {
|
|
|
170
170
|
|
|
171
171
|
/* Badge */
|
|
172
172
|
.ajui-badge {
|
|
173
|
-
padding:
|
|
173
|
+
padding: 2px 6px;
|
|
174
174
|
border-style: solid;
|
|
175
175
|
border-width: 1px;
|
|
176
176
|
font-weight: 600;
|
|
177
|
-
font-size:
|
|
177
|
+
font-size: 14px;
|
|
178
178
|
width: fit-content;
|
|
179
179
|
}
|
|
180
180
|
|