@react95/core 8.0.0-alpha.8 → 8.0.0
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/README.md +18 -42
- package/cjs/Avatar/Avatar.cjs +2 -19
- package/cjs/Button/Button.cjs +1 -1
- package/cjs/Fieldset/Fieldset.cjs +1 -1
- package/cjs/Frame/Frame.cjs +1 -0
- package/cjs/Input/Input.cjs +1 -20
- package/cjs/List/List.cjs +3 -5
- package/cjs/List/ListDivider.cjs +1 -11
- package/cjs/Modal/Modal.cjs +17 -36
- package/cjs/Modal/ModalProvider.cjs +6 -21
- package/cjs/Range/Range.cjs +9 -28
- package/cjs/Tabs/Tabs.cjs +16 -19
- package/cjs/TextArea/TextArea.cjs +2 -19
- package/cjs/TitleBar/TitleBar.cjs +10 -8
- package/cjs/Tooltip/Tooltip.cjs +6 -23
- package/cjs/Tree/Node.cjs +10 -27
- package/cjs/Tree/Tree.css.ts.vanilla.css +1 -1
- package/cjs/Video/Video.cjs +28 -44
- package/cjs/Video/buttons/Fullscreen.cjs +2 -19
- package/cjs/Video/buttons/Pause.cjs +2 -19
- package/cjs/Video/buttons/Play.cjs +2 -19
- package/cjs/Video/buttons/Stop.cjs +2 -19
- package/esm/Alert/Alert.mjs +6 -6
- package/esm/Avatar/Avatar.mjs +2 -2
- package/esm/Button/Button.mjs +4 -4
- package/esm/Checkbox/Checkbox.mjs +3 -3
- package/esm/Dropdown/Dropdown.mjs +2 -2
- package/esm/Fieldset/Fieldset.mjs +2 -2
- package/esm/Frame/Frame.mjs +4 -3
- package/esm/Input/Input.mjs +2 -4
- package/esm/List/List.mjs +3 -5
- package/esm/List/ListDivider.mjs +2 -12
- package/esm/List/ListItem.mjs +3 -3
- package/esm/Modal/Modal.mjs +9 -11
- package/esm/Modal/ModalProvider.mjs +6 -4
- package/esm/ProgressBar/ProgressBar.mjs +4 -4
- package/esm/RadioButton/RadioButton.mjs +3 -3
- package/esm/Range/Range.mjs +11 -13
- package/esm/Tabs/Tab.mjs +2 -2
- package/esm/Tabs/Tabs.mjs +21 -24
- package/esm/TaskBar/Clock.mjs +3 -3
- package/esm/TaskBar/TaskBar.mjs +9 -9
- package/esm/TaskBar/WindowButton.mjs +3 -3
- package/esm/TextArea/TextArea.mjs +2 -2
- package/esm/TitleBar/TitleBar.mjs +16 -14
- package/esm/Tooltip/Tooltip.mjs +5 -5
- package/esm/Tree/Node.mjs +2 -2
- package/esm/Tree/Tree.css.ts.vanilla.css +1 -1
- package/esm/Tree/Tree.mjs +2 -2
- package/esm/Video/Video.mjs +14 -13
- package/esm/Video/buttons/Fullscreen.mjs +1 -1
- package/esm/Video/buttons/Pause.mjs +1 -1
- package/esm/Video/buttons/Play.mjs +1 -1
- package/esm/Video/buttons/Stop.mjs +1 -1
- package/package.json +5 -4
- package/types/Avatar/Avatar.d.ts +9 -0
- package/types/Button/Button.d.ts +7 -0
- package/{@types → types}/Checkbox/Checkbox.d.ts +3 -2
- package/{@types → types}/Dropdown/Dropdown.d.ts +2 -1
- package/{@types → types}/Fieldset/Fieldset.d.ts +2 -1
- package/{@types → types}/Frame/Frame.d.ts +7 -4
- package/{@types → types}/Input/Input.d.ts +1 -1
- package/{@types → types}/List/ListItem.d.ts +3 -2
- package/{@types → types}/Modal/Modal.d.ts +8 -8
- package/{@types → types}/Modal/ModalContext.d.ts +2 -2
- package/types/Modal/ModalProvider.d.ts +3 -0
- package/types/ProgressBar/ProgressBar.d.ts +9 -0
- package/{@types → types}/RadioButton/RadioButton.d.ts +2 -1
- package/{@types → types}/Range/Range.d.ts +1 -1
- package/{@types → types}/Tabs/Tab.d.ts +3 -2
- package/{@types → types}/Tabs/Tabs.d.ts +3 -2
- package/{@types → types}/TaskBar/TaskBar.d.ts +2 -1
- package/{@types → types}/TaskBar/WindowButton.d.ts +2 -1
- package/{@types → types}/TextArea/TextArea.d.ts +1 -1
- package/{@types → types}/TitleBar/TitleBar.d.ts +5 -4
- package/{@types → types}/Tooltip/Tooltip.d.ts +3 -2
- package/{@types → types}/Tree/Node.d.ts +7 -6
- package/{@types → types}/Tree/Tree.d.ts +2 -2
- package/types/Video/Video.d.ts +17 -0
- package/types/Video/buttons/Fullscreen.d.ts +4 -0
- package/types/Video/buttons/Pause.d.ts +4 -0
- package/types/Video/buttons/Play.d.ts +4 -0
- package/types/Video/buttons/Stop.d.ts +4 -0
- package/@types/Avatar/Avatar.d.ts +0 -6
- package/@types/Button/Button.d.ts +0 -4
- package/@types/Modal/ModalProvider.d.ts +0 -3
- package/@types/ProgressBar/ProgressBar.d.ts +0 -6
- package/@types/Video/Video.d.ts +0 -16
- package/@types/Video/buttons/Fullscreen.d.ts +0 -3
- package/@types/Video/buttons/Pause.d.ts +0 -3
- package/@types/Video/buttons/Play.d.ts +0 -3
- package/@types/Video/buttons/Stop.d.ts +0 -3
- package/{@types → types}/Alert/Alert.css.d.ts +0 -0
- package/{@types → types}/Alert/Alert.d.ts +0 -0
- package/{@types → types}/Avatar/Avatar.css.d.ts +0 -0
- package/{@types → types}/Button/Button.css.d.ts +0 -0
- package/{@types → types}/Checkbox/Checkbox.css.d.ts +0 -0
- package/{@types → types}/Cursor/Cursor.css.d.ts +0 -0
- package/{@types → types}/Dropdown/Dropdown.css.d.ts +0 -0
- package/{@types → types}/Fieldset/Fieldset.css.d.ts +0 -0
- package/{@types → types}/Frame/Frame.css.d.ts +0 -0
- package/{@types → types}/Frame/props.d.ts +0 -0
- package/{@types → types}/Input/Input.css.d.ts +0 -0
- package/{@types → types}/List/List.css.d.ts +0 -0
- package/{@types → types}/List/List.d.ts +1 -1
- /package/{@types → types}/List/ListDivider.d.ts +0 -0
- /package/{@types → types}/Modal/Modal.css.d.ts +0 -0
- /package/{@types → types}/ProgressBar/ProgressBar.css.d.ts +0 -0
- /package/{@types → types}/RadioButton/RadioButton.css.d.ts +0 -0
- /package/{@types → types}/RadioButton/radioButtonStates.d.ts +0 -0
- /package/{@types → types}/Range/Range.css.d.ts +0 -0
- /package/{@types → types}/Tabs/Tabs.css.d.ts +0 -0
- /package/{@types → types}/TaskBar/Clock.d.ts +0 -0
- /package/{@types → types}/TaskBar/TaskBar.css.d.ts +0 -0
- /package/{@types → types}/TitleBar/TitleBar.css.d.ts +0 -0
- /package/{@types → types}/Tooltip/Tooltip.css.d.ts +0 -0
- /package/{@types → types}/Tree/Tree.css.d.ts +0 -0
- /package/{@types → types}/Video/Video.css.d.ts +0 -0
- /package/{@types → types}/Video/buttons/index.d.ts +0 -0
- /package/{@types → types}/index.d.ts +0 -0
- /package/{@types → types}/shared/font-names.d.ts +0 -0
- /package/{@types → types}/themes/all.d.ts +0 -0
- /package/{@types → types}/themes/azureOrange.css.d.ts +0 -0
- /package/{@types → types}/themes/baseTheme.d.ts +0 -0
- /package/{@types → types}/themes/bee.css.d.ts +0 -0
- /package/{@types → types}/themes/blackAndWhite.css.d.ts +0 -0
- /package/{@types → types}/themes/brick.css.d.ts +0 -0
- /package/{@types → types}/themes/candy.css.d.ts +0 -0
- /package/{@types → types}/themes/coldGray.css.d.ts +0 -0
- /package/{@types → types}/themes/contract.css.d.ts +0 -0
- /package/{@types → types}/themes/counterStrike.css.d.ts +0 -0
- /package/{@types → types}/themes/eggplant.css.d.ts +0 -0
- /package/{@types → types}/themes/highContrast.css.d.ts +0 -0
- /package/{@types → types}/themes/lilac.css.d.ts +0 -0
- /package/{@types → types}/themes/lilacRoseDark.css.d.ts +0 -0
- /package/{@types → types}/themes/maple.css.d.ts +0 -0
- /package/{@types → types}/themes/marine.css.d.ts +0 -0
- /package/{@types → types}/themes/matrix.css.d.ts +0 -0
- /package/{@types → types}/themes/millenium.css.d.ts +0 -0
- /package/{@types → types}/themes/modernDark.css.d.ts +0 -0
- /package/{@types → types}/themes/molecule.css.d.ts +0 -0
- /package/{@types → types}/themes/ninjaTurtles.css.d.ts +0 -0
- /package/{@types → types}/themes/olive.css.d.ts +0 -0
- /package/{@types → types}/themes/pamelaAnderson.css.d.ts +0 -0
- /package/{@types → types}/themes/plum.css.d.ts +0 -0
- /package/{@types → types}/themes/rainyDay.css.d.ts +0 -0
- /package/{@types → types}/themes/rose.css.d.ts +0 -0
- /package/{@types → types}/themes/slate.css.d.ts +0 -0
- /package/{@types → types}/themes/spruce.css.d.ts +0 -0
- /package/{@types → types}/themes/storm.css.d.ts +0 -0
- /package/{@types → types}/themes/theSixtiesUSA.css.d.ts +0 -0
- /package/{@types → types}/themes/tokyoDark.css.d.ts +0 -0
- /package/{@types → types}/themes/tooSexy.css.d.ts +0 -0
- /package/{@types → types}/themes/travel.css.d.ts +0 -0
- /package/{@types → types}/themes/vaporTeal.css.d.ts +0 -0
- /package/{@types → types}/themes/vermillion.css.d.ts +0 -0
- /package/{@types → types}/themes/violetDark.css.d.ts +0 -0
- /package/{@types → types}/themes/water.css.d.ts +0 -0
- /package/{@types → types}/themes/win95.css.d.ts +0 -0
package/cjs/Tree/Node.cjs
CHANGED
|
@@ -5,23 +5,6 @@ const icons$1 = require("@react95/icons");
|
|
|
5
5
|
const Tree_css = require("./Tree.css.cjs");
|
|
6
6
|
const Frame = require("../Frame/Frame.cjs");
|
|
7
7
|
const cn = require("classnames");
|
|
8
|
-
function _interopNamespaceDefault(e) {
|
|
9
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
|
-
if (e) {
|
|
11
|
-
for (const k in e) {
|
|
12
|
-
if (k !== "default") {
|
|
13
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: () => e[k]
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
n.default = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
25
8
|
const icons = {
|
|
26
9
|
FILE_MEDIA: icons$1.MediaCd,
|
|
27
10
|
FILE_TEXT: icons$1.FileText,
|
|
@@ -37,10 +20,10 @@ const NodeIcon = ({
|
|
|
37
20
|
isOpen
|
|
38
21
|
}) => {
|
|
39
22
|
if (!hasChildren) {
|
|
40
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ React.createElement(icons$1.Bat, { variant: "16x16_4", "data-testid": "react95-default-icon-bat" });
|
|
41
24
|
}
|
|
42
25
|
if (isOpen) {
|
|
43
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ React.createElement(
|
|
44
27
|
icons$1.FolderOpen,
|
|
45
28
|
{
|
|
46
29
|
variant: "16x16_4",
|
|
@@ -48,7 +31,7 @@ const NodeIcon = ({
|
|
|
48
31
|
}
|
|
49
32
|
);
|
|
50
33
|
}
|
|
51
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ React.createElement(icons$1.Folder, { variant: "16x16_4", "data-testid": "react95-default-icon-folder" });
|
|
52
35
|
};
|
|
53
36
|
const Node = ({
|
|
54
37
|
children = [],
|
|
@@ -59,7 +42,7 @@ const Node = ({
|
|
|
59
42
|
},
|
|
60
43
|
...rest
|
|
61
44
|
}) => {
|
|
62
|
-
const [isOpen, setIsOpen] =
|
|
45
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
63
46
|
const hasChildren = children.length > 0;
|
|
64
47
|
const onClickHandler = (event) => {
|
|
65
48
|
onClick(event, {
|
|
@@ -75,14 +58,14 @@ const Node = ({
|
|
|
75
58
|
onClickHandler(event);
|
|
76
59
|
}
|
|
77
60
|
};
|
|
78
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ React.createElement(Frame.Frame, { as: "li", ...rest, className: Tree_css.node }, /* @__PURE__ */ React.createElement("div", { className: Tree_css.nodeContent }, hasChildren && /* @__PURE__ */ React.createElement(
|
|
79
62
|
"div",
|
|
80
63
|
{
|
|
81
64
|
className: Tree_css.folderStatus,
|
|
82
65
|
onClick: () => setIsOpen(!isOpen)
|
|
83
66
|
},
|
|
84
67
|
isOpen ? "-" : "+"
|
|
85
|
-
), /* @__PURE__ */
|
|
68
|
+
), /* @__PURE__ */ React.createElement("div", { className: Tree_css.iconContainer({ hasChildren }) }, icon || /* @__PURE__ */ React.createElement(NodeIcon, { hasChildren, isOpen })), /* @__PURE__ */ React.createElement(
|
|
86
69
|
"label",
|
|
87
70
|
{
|
|
88
71
|
className: Tree_css.label,
|
|
@@ -92,7 +75,7 @@ const Node = ({
|
|
|
92
75
|
onKeyDown: onKeyDownHandler
|
|
93
76
|
},
|
|
94
77
|
label
|
|
95
|
-
)), hasChildren && isOpen && /* @__PURE__ */
|
|
78
|
+
)), hasChildren && isOpen && /* @__PURE__ */ React.createElement("ul", { className: Tree_css.tree }, children == null ? void 0 : children.map((dataNode) => /* @__PURE__ */ React.createElement(Node, { key: dataNode.id, ...dataNode }))));
|
|
96
79
|
};
|
|
97
80
|
const NodeRoot = ({
|
|
98
81
|
id,
|
|
@@ -114,7 +97,7 @@ const NodeRoot = ({
|
|
|
114
97
|
onClickHandler(event);
|
|
115
98
|
}
|
|
116
99
|
};
|
|
117
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, className: cn(Tree_css.node, Tree_css.nodeRoot) }, /* @__PURE__ */ React.createElement("div", { className: Tree_css.nodeContent }, /* @__PURE__ */ React.createElement(
|
|
118
101
|
"div",
|
|
119
102
|
{
|
|
120
103
|
className: cn(
|
|
@@ -122,8 +105,8 @@ const NodeRoot = ({
|
|
|
122
105
|
Tree_css.iconContainer.classNames.variants.hasChildren.true
|
|
123
106
|
)
|
|
124
107
|
},
|
|
125
|
-
icon || /* @__PURE__ */
|
|
126
|
-
), /* @__PURE__ */
|
|
108
|
+
icon || /* @__PURE__ */ React.createElement(NodeIcon, { hasChildren: false, isOpen: true })
|
|
109
|
+
), /* @__PURE__ */ React.createElement(
|
|
127
110
|
"label",
|
|
128
111
|
{
|
|
129
112
|
className: Tree_css.label,
|
package/cjs/Video/Video.cjs
CHANGED
|
@@ -12,25 +12,8 @@ const Pause = require("./buttons/Pause.cjs");
|
|
|
12
12
|
const Stop = require("./buttons/Stop.cjs");
|
|
13
13
|
const Fullscreen = require("./buttons/Fullscreen.cjs");
|
|
14
14
|
const cn = require("classnames");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (e) {
|
|
18
|
-
for (const k in e) {
|
|
19
|
-
if (k !== "default") {
|
|
20
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: () => e[k]
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
n.default = e;
|
|
29
|
-
return Object.freeze(n);
|
|
30
|
-
}
|
|
31
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
32
|
-
const Source = ({ src }) => /* @__PURE__ */ React__namespace.createElement("source", { src, type: `video/${src.substring(src.length - 3)}` });
|
|
33
|
-
const PlayOrPause = ({ playing }) => playing ? /* @__PURE__ */ React__namespace.createElement(Pause, null) : /* @__PURE__ */ React__namespace.createElement(Play, null);
|
|
15
|
+
const Source = ({ src }) => /* @__PURE__ */ React.createElement("source", { src, type: `video/${src.substring(src.length - 3)}` });
|
|
16
|
+
const PlayOrPause = ({ playing }) => playing ? /* @__PURE__ */ React.createElement(Pause, null) : /* @__PURE__ */ React.createElement(Play, null);
|
|
34
17
|
const arrayFy = (str) => [].concat(str);
|
|
35
18
|
function updateProgressBar(player, updateProgress) {
|
|
36
19
|
const percentage = Math.floor(100 / player.duration * player.currentTime);
|
|
@@ -47,20 +30,20 @@ function parseCurrentTime(secs) {
|
|
|
47
30
|
return [hours, minutes, seconds].map((v) => v < 10 ? `0${v}` : v).filter((v, i) => v !== "00" || i > 0).join(":");
|
|
48
31
|
}
|
|
49
32
|
const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
50
|
-
const [playing, setPlaying] =
|
|
51
|
-
const [loadeddata, setLoadeddata] =
|
|
52
|
-
const [progress, setProgress] =
|
|
53
|
-
const player =
|
|
54
|
-
const progressRef =
|
|
55
|
-
const wrapperRef =
|
|
56
|
-
const playPauseRef =
|
|
57
|
-
const stopRef =
|
|
58
|
-
const fullScreenRef =
|
|
33
|
+
const [playing, setPlaying] = React.useState(false);
|
|
34
|
+
const [loadeddata, setLoadeddata] = React.useState(false);
|
|
35
|
+
const [progress, setProgress] = React.useState(0);
|
|
36
|
+
const player = React.useRef(null);
|
|
37
|
+
const progressRef = React.useRef(null);
|
|
38
|
+
const wrapperRef = React.useRef(null);
|
|
39
|
+
const playPauseRef = React.useRef(null);
|
|
40
|
+
const stopRef = React.useRef(null);
|
|
41
|
+
const fullScreenRef = React.useRef(null);
|
|
59
42
|
const paths = arrayFy(src);
|
|
60
43
|
const [pathname] = paths;
|
|
61
44
|
const normalizedName = name || pathname.replace(/^.*[\\/]/, "");
|
|
62
45
|
const title = `${normalizedName}${!loadeddata ? " (Opening)" : ""}`;
|
|
63
|
-
|
|
46
|
+
React.useImperativeHandle(ref, () => ({
|
|
64
47
|
get video() {
|
|
65
48
|
return player;
|
|
66
49
|
},
|
|
@@ -80,7 +63,7 @@ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
|
80
63
|
return fullScreenRef;
|
|
81
64
|
}
|
|
82
65
|
}));
|
|
83
|
-
|
|
66
|
+
React.useEffect(() => {
|
|
84
67
|
var _a, _b, _c, _d;
|
|
85
68
|
(_a = player.current) == null ? void 0 : _a.addEventListener(
|
|
86
69
|
"ended",
|
|
@@ -114,7 +97,7 @@ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
|
114
97
|
false
|
|
115
98
|
);
|
|
116
99
|
}, [player.current]);
|
|
117
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ React.createElement(
|
|
118
101
|
Frame.Frame,
|
|
119
102
|
{
|
|
120
103
|
...props,
|
|
@@ -123,18 +106,18 @@ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
|
123
106
|
backgroundColor: "$material",
|
|
124
107
|
ref: wrapperRef
|
|
125
108
|
},
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ React.createElement(TitleBar.TitleBar, { icon: /* @__PURE__ */ React.createElement(icons.Mplayer113, { variant: "16x16_4" }), title }),
|
|
110
|
+
/* @__PURE__ */ React.createElement(
|
|
128
111
|
"video",
|
|
129
112
|
{
|
|
130
113
|
className: Video_css.videoTag({ visible: loadeddata }),
|
|
131
114
|
...videoProps,
|
|
132
115
|
ref: player
|
|
133
116
|
},
|
|
134
|
-
paths.map((s) => /* @__PURE__ */
|
|
117
|
+
paths.map((s) => /* @__PURE__ */ React.createElement(Source, { key: s, src: s }))
|
|
135
118
|
),
|
|
136
|
-
loadeddata && /* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
119
|
+
loadeddata && /* @__PURE__ */ React.createElement("span", { className: Video_css.divider }),
|
|
120
|
+
/* @__PURE__ */ React.createElement(Frame.Frame, { maxWidth: "250px", mx: "auto", mb: "$4" }, /* @__PURE__ */ React.createElement("div", { className: Video_css.countDownContainer }, /* @__PURE__ */ React.createElement(Frame.Frame, { display: "flex", flexDirection: "column", w: "40%" }, /* @__PURE__ */ React.createElement(
|
|
138
121
|
"div",
|
|
139
122
|
{
|
|
140
123
|
className: Video_css.videoFont,
|
|
@@ -143,9 +126,10 @@ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
|
143
126
|
}
|
|
144
127
|
},
|
|
145
128
|
player.current && parseCurrentTime(player.current.duration)
|
|
146
|
-
), /* @__PURE__ */
|
|
129
|
+
), /* @__PURE__ */ React.createElement("div", { className: Video_css.videoFont, style: { height: 12 } }, !loadeddata && "Openning")), /* @__PURE__ */ React.createElement(Frame.Frame, { display: "flex", flexDirection: "column", w: "40%" }, /* @__PURE__ */ React.createElement("div", { className: cn(Video_css.videoFont, Video_css.currentTime) }, player.current && parseCurrentTime(player.current.currentTime)), /* @__PURE__ */ React.createElement("div", { className: cn(Video_css.videoFont, Video_css.elapsedTime) }, "time"))), /* @__PURE__ */ React.createElement("div", { className: Video_css.controls }, /* @__PURE__ */ React.createElement(
|
|
147
130
|
Button.Button,
|
|
148
131
|
{
|
|
132
|
+
as: "button",
|
|
149
133
|
className: Video_css.controlBtn,
|
|
150
134
|
disabled: !loadeddata,
|
|
151
135
|
onClick: () => {
|
|
@@ -159,14 +143,14 @@ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
|
159
143
|
},
|
|
160
144
|
ref: playPauseRef
|
|
161
145
|
},
|
|
162
|
-
loadeddata ? /* @__PURE__ */
|
|
146
|
+
loadeddata ? /* @__PURE__ */ React.createElement(PlayOrPause, { playing }) : /* @__PURE__ */ React.createElement(
|
|
163
147
|
icons.User4,
|
|
164
148
|
{
|
|
165
149
|
style: { borderRight: "none", borderBottom: "none" },
|
|
166
150
|
variant: "32x32_4"
|
|
167
151
|
}
|
|
168
152
|
)
|
|
169
|
-
), /* @__PURE__ */
|
|
153
|
+
), /* @__PURE__ */ React.createElement(
|
|
170
154
|
Button.Button,
|
|
171
155
|
{
|
|
172
156
|
className: Video_css.controlBtn,
|
|
@@ -180,8 +164,8 @@ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
|
180
164
|
},
|
|
181
165
|
ref: stopRef
|
|
182
166
|
},
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
), /* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ React.createElement(Stop, null)
|
|
168
|
+
), /* @__PURE__ */ React.createElement(
|
|
185
169
|
Button.Button,
|
|
186
170
|
{
|
|
187
171
|
className: Video_css.controlBtn,
|
|
@@ -192,8 +176,8 @@ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
|
192
176
|
},
|
|
193
177
|
ref: fullScreenRef
|
|
194
178
|
},
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
), /* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ React.createElement(Fullscreen, null)
|
|
180
|
+
), /* @__PURE__ */ React.createElement(
|
|
197
181
|
Range.Range,
|
|
198
182
|
{
|
|
199
183
|
className: Video_css.range,
|
|
@@ -219,5 +203,5 @@ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
|
|
|
219
203
|
)))
|
|
220
204
|
);
|
|
221
205
|
};
|
|
222
|
-
const Video =
|
|
206
|
+
const Video = React.forwardRef(VideoRenderer);
|
|
223
207
|
exports.Video = Video;
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const React = require("react");
|
|
3
|
-
|
|
4
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
5
|
-
if (e) {
|
|
6
|
-
for (const k in e) {
|
|
7
|
-
if (k !== "default") {
|
|
8
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: () => e[k]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
n.default = e;
|
|
17
|
-
return Object.freeze(n);
|
|
18
|
-
}
|
|
19
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
20
|
-
const Fullscreen = (props) => /* @__PURE__ */ React__namespace.createElement(
|
|
3
|
+
const Fullscreen = (props) => /* @__PURE__ */ React.createElement(
|
|
21
4
|
"svg",
|
|
22
5
|
{
|
|
23
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -27,7 +10,7 @@ const Fullscreen = (props) => /* @__PURE__ */ React__namespace.createElement(
|
|
|
27
10
|
"aria-label": "fullscreen",
|
|
28
11
|
...props
|
|
29
12
|
},
|
|
30
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ React.createElement(
|
|
31
14
|
"path",
|
|
32
15
|
{
|
|
33
16
|
d: "M24 9h-2v-5h-7v-2h9v7zm-9 13v-2h7v-5h2v7h-9zm-15-7h2v5h7v2h-9v-7zm9-13v2h-7v5h-2v-7h9zm11 4h-16v12h16v-12z",
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const React = require("react");
|
|
3
|
-
|
|
4
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
5
|
-
if (e) {
|
|
6
|
-
for (const k in e) {
|
|
7
|
-
if (k !== "default") {
|
|
8
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: () => e[k]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
n.default = e;
|
|
17
|
-
return Object.freeze(n);
|
|
18
|
-
}
|
|
19
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
20
|
-
const Pause = (props) => /* @__PURE__ */ React__namespace.createElement(
|
|
3
|
+
const Pause = (props) => /* @__PURE__ */ React.createElement(
|
|
21
4
|
"svg",
|
|
22
5
|
{
|
|
23
6
|
height: "6",
|
|
@@ -27,7 +10,7 @@ const Pause = (props) => /* @__PURE__ */ React__namespace.createElement(
|
|
|
27
10
|
"aria-label": "pause",
|
|
28
11
|
...props
|
|
29
12
|
},
|
|
30
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ React.createElement("path", { d: "M256.471 2h176.765v424.236H256.471zM2 2h176.765v424.236H2z" })
|
|
31
14
|
);
|
|
32
15
|
const Pause$1 = Pause;
|
|
33
16
|
module.exports = Pause$1;
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const React = require("react");
|
|
3
|
-
|
|
4
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
5
|
-
if (e) {
|
|
6
|
-
for (const k in e) {
|
|
7
|
-
if (k !== "default") {
|
|
8
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: () => e[k]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
n.default = e;
|
|
17
|
-
return Object.freeze(n);
|
|
18
|
-
}
|
|
19
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
20
|
-
const Play = (props) => /* @__PURE__ */ React__namespace.createElement(
|
|
3
|
+
const Play = (props) => /* @__PURE__ */ React.createElement(
|
|
21
4
|
"svg",
|
|
22
5
|
{
|
|
23
6
|
height: "6",
|
|
@@ -27,7 +10,7 @@ const Play = (props) => /* @__PURE__ */ React__namespace.createElement(
|
|
|
27
10
|
"aria-label": "play",
|
|
28
11
|
...props
|
|
29
12
|
},
|
|
30
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ React.createElement("path", { d: "M35.353 0l424.236 247.471L35.353 494.942z" })
|
|
31
14
|
);
|
|
32
15
|
const Play$1 = Play;
|
|
33
16
|
module.exports = Play$1;
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const React = require("react");
|
|
3
|
-
|
|
4
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
5
|
-
if (e) {
|
|
6
|
-
for (const k in e) {
|
|
7
|
-
if (k !== "default") {
|
|
8
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: () => e[k]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
n.default = e;
|
|
17
|
-
return Object.freeze(n);
|
|
18
|
-
}
|
|
19
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
20
|
-
const Stop = (props) => /* @__PURE__ */ React__namespace.createElement(
|
|
3
|
+
const Stop = (props) => /* @__PURE__ */ React.createElement(
|
|
21
4
|
"svg",
|
|
22
5
|
{
|
|
23
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -26,7 +9,7 @@ const Stop = (props) => /* @__PURE__ */ React__namespace.createElement(
|
|
|
26
9
|
"aria-label": "stop",
|
|
27
10
|
...props
|
|
28
11
|
},
|
|
29
|
-
/* @__PURE__ */
|
|
12
|
+
/* @__PURE__ */ React.createElement("path", { d: "M0 0h306v306H0z" })
|
|
30
13
|
);
|
|
31
14
|
const Stop$1 = Stop;
|
|
32
15
|
module.exports = Stop$1;
|
package/esm/Alert/Alert.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef, useEffect } from "react";
|
|
2
2
|
import { User4, User2, User3, User5 } from "@react95/icons";
|
|
3
3
|
import { dialog, icon, message } from "./Alert.css.mjs";
|
|
4
4
|
import { Modal } from "../Modal/Modal.mjs";
|
|
@@ -6,14 +6,14 @@ import sound from "./assets/chord.mp3.mjs";
|
|
|
6
6
|
const RenderImage = ({ option }) => {
|
|
7
7
|
switch (option) {
|
|
8
8
|
case "info":
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ React.createElement(User5, { width: 32, height: 32, variant: "32x32_4" });
|
|
10
10
|
case "question":
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ React.createElement(User3, { width: 32, height: 32, variant: "32x32_4" });
|
|
12
12
|
case "warning":
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ React.createElement(User2, { width: 32, height: 32, variant: "32x32_4" });
|
|
14
14
|
case "error":
|
|
15
15
|
default:
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ React.createElement(User4, { width: 32, height: 32, variant: "32x32_4" });
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
const Alert = forwardRef(
|
|
@@ -24,7 +24,7 @@ const Alert = forwardRef(
|
|
|
24
24
|
audio.play();
|
|
25
25
|
}, []);
|
|
26
26
|
}
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ React.createElement(Modal, { height: "120", hasWindowButton: false, ...rest, ref }, /* @__PURE__ */ React.createElement("div", { className: dialog }, /* @__PURE__ */ React.createElement("div", { className: icon }, /* @__PURE__ */ React.createElement(RenderImage, { option: type })), /* @__PURE__ */ React.createElement("div", { className: message }, message$1)));
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
Alert.defaultProps = {
|
package/esm/Avatar/Avatar.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import { avatar, imgStyle } from "./Avatar.css.mjs";
|
|
3
3
|
import { Frame } from "../Frame/Frame.mjs";
|
|
4
|
-
const Avatar =
|
|
4
|
+
const Avatar = forwardRef(
|
|
5
5
|
({ src, srcSet, alt, circle, children, size = "48px", ...otherProps }, ref) => /* @__PURE__ */ React.createElement(Frame, { className: avatar({ circle }), ref, ...otherProps, size }, src || srcSet ? /* @__PURE__ */ React.createElement("img", { className: imgStyle, src, srcSet, alt }) : children)
|
|
6
6
|
);
|
|
7
7
|
export {
|
package/esm/Button/Button.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import cn from "classnames";
|
|
3
3
|
import { button } from "./Button.css.mjs";
|
|
4
|
-
import { Frame } from "../Frame/Frame.mjs";
|
|
5
|
-
const Button =
|
|
4
|
+
import { fixedForwardRef, Frame } from "../Frame/Frame.mjs";
|
|
5
|
+
const Button = fixedForwardRef(
|
|
6
6
|
(props, ref) => {
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ React.createElement(
|
|
8
8
|
Frame,
|
|
9
9
|
{
|
|
10
10
|
as: "button",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import { label, field, icon, text } from "./Checkbox.css.mjs";
|
|
3
3
|
const Checkbox = forwardRef(
|
|
4
|
-
({ children, style, label: label$1, disabled = false, ...rest }, ref) => /* @__PURE__ */
|
|
4
|
+
({ children, style, label: label$1, disabled = false, ...rest }, ref) => /* @__PURE__ */ React.createElement("label", { style, className: label }, /* @__PURE__ */ React.createElement(
|
|
5
5
|
"input",
|
|
6
6
|
{
|
|
7
7
|
className: field,
|
|
@@ -10,7 +10,7 @@ const Checkbox = forwardRef(
|
|
|
10
10
|
...rest,
|
|
11
11
|
ref
|
|
12
12
|
}
|
|
13
|
-
), /* @__PURE__ */
|
|
13
|
+
), /* @__PURE__ */ React.createElement("span", { className: icon }), /* @__PURE__ */ React.createElement("span", { className: text }, children || label$1))
|
|
14
14
|
);
|
|
15
15
|
export {
|
|
16
16
|
Checkbox
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import cn from "classnames";
|
|
3
3
|
import { wrapper, select } from "./Dropdown.css.mjs";
|
|
4
4
|
import { Frame } from "../Frame/Frame.mjs";
|
|
@@ -12,7 +12,7 @@ const defaultOptions = [
|
|
|
12
12
|
const Dropdown = forwardRef(
|
|
13
13
|
({ options = defaultOptions, ...rest }, ref) => {
|
|
14
14
|
const { style, otherProps, className } = sprinkles(rest);
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ React.createElement(Frame, { style, className: cn(wrapper, className) }, /* @__PURE__ */ React.createElement("select", { ...otherProps, className: cn(select), ref }, options && options.map((option) => /* @__PURE__ */ React.createElement("option", { key: option, value: option }, option))));
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import { field, legend } from "./Fieldset.css.mjs";
|
|
3
3
|
import { Frame } from "../Frame/Frame.mjs";
|
|
4
4
|
const Fieldset = forwardRef(
|
|
5
|
-
({ legend: legend$1, children, ...rest }, ref) => /* @__PURE__ */
|
|
5
|
+
({ legend: legend$1, children, ...rest }, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, as: "fieldset", ref, className: field }, legend$1 && /* @__PURE__ */ React.createElement("legend", { className: legend }, legend$1), children)
|
|
6
6
|
);
|
|
7
7
|
export {
|
|
8
8
|
Fieldset
|
package/esm/Frame/Frame.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import { sprinkles } from "./Frame.css.mjs";
|
|
3
3
|
import cn from "classnames";
|
|
4
4
|
const fixedForwardRef = forwardRef;
|
|
@@ -6,7 +6,7 @@ const FrameComponent = (props, ref) => {
|
|
|
6
6
|
const { as, children, ...rest } = props;
|
|
7
7
|
const Component = as || "div";
|
|
8
8
|
const { className, style, otherProps } = sprinkles(rest);
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ React.createElement(
|
|
10
10
|
Component,
|
|
11
11
|
{
|
|
12
12
|
...otherProps,
|
|
@@ -19,5 +19,6 @@ const FrameComponent = (props, ref) => {
|
|
|
19
19
|
};
|
|
20
20
|
const Frame = fixedForwardRef(FrameComponent);
|
|
21
21
|
export {
|
|
22
|
-
Frame
|
|
22
|
+
Frame,
|
|
23
|
+
fixedForwardRef
|
|
23
24
|
};
|
package/esm/Input/Input.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import { Frame } from "../Frame/Frame.mjs";
|
|
3
3
|
import { input } from "./Input.css.mjs";
|
|
4
|
-
const Input = React.
|
|
5
|
-
(rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: input, as: "input" })
|
|
6
|
-
);
|
|
4
|
+
const Input = forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: input, as: "input" }));
|
|
7
5
|
export {
|
|
8
6
|
Input
|
|
9
7
|
};
|
package/esm/List/List.mjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import cn from "classnames";
|
|
1
3
|
import { ListItem } from "./ListItem.mjs";
|
|
2
4
|
import { Divider } from "./ListDivider.mjs";
|
|
3
5
|
import { Frame } from "../Frame/Frame.mjs";
|
|
4
|
-
import React__default from "react";
|
|
5
6
|
import { list } from "./List.css.mjs";
|
|
6
|
-
|
|
7
|
-
const ListRenderer = React__default.forwardRef(
|
|
8
|
-
(rest, ref) => /* @__PURE__ */ React__default.createElement(Frame, { ...rest, ref, className: cn(list, rest.className), as: "ul" })
|
|
9
|
-
);
|
|
7
|
+
const ListRenderer = forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: cn(list, rest.className), as: "ul" }));
|
|
10
8
|
const List = Object.assign(ListRenderer, {
|
|
11
9
|
Item: ListItem,
|
|
12
10
|
Divider
|
package/esm/List/ListDivider.mjs
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import { Frame } from "../Frame/Frame.mjs";
|
|
3
3
|
import { divider } from "./List.css.mjs";
|
|
4
4
|
import cn from "classnames";
|
|
5
|
-
const Divider =
|
|
6
|
-
(rest, ref) => /* @__PURE__ */ React__default.createElement(
|
|
7
|
-
Frame,
|
|
8
|
-
{
|
|
9
|
-
...rest,
|
|
10
|
-
ref,
|
|
11
|
-
className: cn(divider, rest.className),
|
|
12
|
-
as: "li"
|
|
13
|
-
}
|
|
14
|
-
)
|
|
15
|
-
);
|
|
5
|
+
const Divider = forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: cn(divider, rest.className), as: "li" }));
|
|
16
6
|
Divider.displayName = "List.Divider";
|
|
17
7
|
export {
|
|
18
8
|
Divider
|
package/esm/List/ListItem.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import cn from "classnames";
|
|
3
3
|
import { Frame } from "../Frame/Frame.mjs";
|
|
4
4
|
import { listItem } from "./List.css.mjs";
|
|
5
|
-
const Item =
|
|
5
|
+
const Item = forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: cn(listItem, rest.className), as: "li" }));
|
|
6
6
|
const ListItem = forwardRef(
|
|
7
|
-
({ icon, children = [], ...rest }, ref) => /* @__PURE__ */
|
|
7
|
+
({ icon, children = [], ...rest }, ref) => /* @__PURE__ */ React.createElement(Item, { ...rest, ref }, icon, children)
|
|
8
8
|
);
|
|
9
9
|
ListItem.displayName = "List.Item";
|
|
10
10
|
export {
|