@react95/core 9.6.3 → 9.6.4
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/cjs/Alert/Alert.cjs +5 -6
- package/cjs/Modal/Modal.cjs +4 -2
- package/cjs/Tree/Node.cjs +2 -1
- package/esm/Alert/Alert.mjs +5 -6
- package/esm/Modal/Modal.mjs +4 -2
- package/esm/Tree/Node.mjs +2 -1
- package/package.json +2 -2
package/cjs/Alert/Alert.cjs
CHANGED
|
@@ -20,12 +20,11 @@ const RenderImage = ({ option }) => {
|
|
|
20
20
|
};
|
|
21
21
|
const Alert = React.forwardRef(
|
|
22
22
|
({ type = "error", message, hasSound = false, dragOptions, ...rest }, ref) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
if (!hasSound) return;
|
|
25
|
+
const audio = new Audio(chord);
|
|
26
|
+
audio.play();
|
|
27
|
+
}, [hasSound]);
|
|
29
28
|
return /* @__PURE__ */ React.createElement(
|
|
30
29
|
Modal.Modal,
|
|
31
30
|
{
|
package/cjs/Modal/Modal.cjs
CHANGED
|
@@ -11,6 +11,8 @@ const cn = require("classnames");
|
|
|
11
11
|
const usehooksTs = require("usehooks-ts");
|
|
12
12
|
const useModal = require("../shared/use-modal.cjs");
|
|
13
13
|
const modalTypes = require("../shared/modal-types.cjs");
|
|
14
|
+
const EMPTY_BUTTONS = [];
|
|
15
|
+
const EMPTY_MENU = [];
|
|
14
16
|
const ModalContent = Frame.fixedForwardRef(
|
|
15
17
|
(rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: cn(Modal_css.content, rest.className) })
|
|
16
18
|
);
|
|
@@ -38,11 +40,11 @@ const ModalMinimize = Frame.fixedForwardRef(
|
|
|
38
40
|
const ModalRenderer = ({
|
|
39
41
|
id: providedId,
|
|
40
42
|
hasWindowButton: hasButton = true,
|
|
41
|
-
buttons =
|
|
43
|
+
buttons = EMPTY_BUTTONS,
|
|
42
44
|
buttonsAlignment = "flex-end",
|
|
43
45
|
children,
|
|
44
46
|
icon,
|
|
45
|
-
menu =
|
|
47
|
+
menu = EMPTY_MENU,
|
|
46
48
|
title,
|
|
47
49
|
dragOptions,
|
|
48
50
|
titleBarOptions,
|
package/cjs/Tree/Node.cjs
CHANGED
|
@@ -33,8 +33,9 @@ const NodeIcon = ({
|
|
|
33
33
|
}
|
|
34
34
|
return /* @__PURE__ */ React.createElement(icons$1.Folder, { variant: "16x16_4", "data-testid": "react95-default-icon-folder" });
|
|
35
35
|
};
|
|
36
|
+
const EMPTY_CHILDREN = [];
|
|
36
37
|
const Node = ({
|
|
37
|
-
children =
|
|
38
|
+
children = EMPTY_CHILDREN,
|
|
38
39
|
id,
|
|
39
40
|
icon,
|
|
40
41
|
label,
|
package/esm/Alert/Alert.mjs
CHANGED
|
@@ -18,12 +18,11 @@ const RenderImage = ({ option }) => {
|
|
|
18
18
|
};
|
|
19
19
|
const Alert = forwardRef(
|
|
20
20
|
({ type = "error", message: message$1, hasSound = false, dragOptions, ...rest }, ref) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!hasSound) return;
|
|
23
|
+
const audio = new Audio(sound);
|
|
24
|
+
audio.play();
|
|
25
|
+
}, [hasSound]);
|
|
27
26
|
return /* @__PURE__ */ React.createElement(
|
|
28
27
|
Modal,
|
|
29
28
|
{
|
package/esm/Modal/Modal.mjs
CHANGED
|
@@ -9,6 +9,8 @@ import cn from "classnames";
|
|
|
9
9
|
import { useOnClickOutside } from "usehooks-ts";
|
|
10
10
|
import { useModal } from "../shared/use-modal.mjs";
|
|
11
11
|
import { ModalEvents } from "../shared/modal-types.mjs";
|
|
12
|
+
const EMPTY_BUTTONS = [];
|
|
13
|
+
const EMPTY_MENU = [];
|
|
12
14
|
const ModalContent = fixedForwardRef(
|
|
13
15
|
(rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: cn(content, rest.className) })
|
|
14
16
|
);
|
|
@@ -36,11 +38,11 @@ const ModalMinimize = fixedForwardRef(
|
|
|
36
38
|
const ModalRenderer = ({
|
|
37
39
|
id: providedId,
|
|
38
40
|
hasWindowButton: hasButton = true,
|
|
39
|
-
buttons =
|
|
41
|
+
buttons = EMPTY_BUTTONS,
|
|
40
42
|
buttonsAlignment = "flex-end",
|
|
41
43
|
children,
|
|
42
44
|
icon,
|
|
43
|
-
menu =
|
|
45
|
+
menu = EMPTY_MENU,
|
|
44
46
|
title,
|
|
45
47
|
dragOptions,
|
|
46
48
|
titleBarOptions,
|
package/esm/Tree/Node.mjs
CHANGED
|
@@ -31,8 +31,9 @@ const NodeIcon = ({
|
|
|
31
31
|
}
|
|
32
32
|
return /* @__PURE__ */ React.createElement(Folder, { variant: "16x16_4", "data-testid": "react95-default-icon-folder" });
|
|
33
33
|
};
|
|
34
|
+
const EMPTY_CHILDREN = [];
|
|
34
35
|
const Node = ({
|
|
35
|
-
children =
|
|
36
|
+
children = EMPTY_CHILDREN,
|
|
36
37
|
id,
|
|
37
38
|
icon,
|
|
38
39
|
label: label$1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react95/core",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.4",
|
|
4
4
|
"description": "Windows 95 styleguide",
|
|
5
5
|
"main": "cjs/index.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"url": "https://github.com/React95/React95/issues"
|
|
197
197
|
},
|
|
198
198
|
"homepage": "https://github.com/React95/React95#readme",
|
|
199
|
-
"gitHead": "
|
|
199
|
+
"gitHead": "b86957af42c2da30977c9b5c7942fb73d3a3b11e",
|
|
200
200
|
"module": "esm/index.mjs",
|
|
201
201
|
"private": false,
|
|
202
202
|
"types": "types/index.d.ts"
|