@react95/core 8.0.0-alpha.10 → 8.0.0-alpha.11

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 (81) hide show
  1. package/cjs/Avatar/Avatar.cjs +2 -19
  2. package/cjs/Button/Button.cjs +1 -1
  3. package/cjs/Fieldset/Fieldset.cjs +1 -1
  4. package/cjs/Frame/Frame.cjs +1 -0
  5. package/cjs/Input/Input.cjs +1 -20
  6. package/cjs/List/List.cjs +3 -5
  7. package/cjs/List/ListDivider.cjs +1 -11
  8. package/cjs/Modal/Modal.cjs +17 -36
  9. package/cjs/Modal/ModalProvider.cjs +6 -21
  10. package/cjs/Range/Range.cjs +9 -28
  11. package/cjs/Tabs/Tabs.cjs +16 -19
  12. package/cjs/TextArea/TextArea.cjs +2 -19
  13. package/cjs/TitleBar/TitleBar.cjs +10 -8
  14. package/cjs/Tooltip/Tooltip.cjs +6 -23
  15. package/cjs/Tree/Node.cjs +10 -27
  16. package/cjs/Video/Video.cjs +28 -44
  17. package/cjs/Video/buttons/Fullscreen.cjs +2 -19
  18. package/cjs/Video/buttons/Pause.cjs +2 -19
  19. package/cjs/Video/buttons/Play.cjs +2 -19
  20. package/cjs/Video/buttons/Stop.cjs +2 -19
  21. package/esm/Alert/Alert.mjs +6 -6
  22. package/esm/Avatar/Avatar.mjs +2 -2
  23. package/esm/Button/Button.mjs +4 -4
  24. package/esm/Checkbox/Checkbox.mjs +3 -3
  25. package/esm/Dropdown/Dropdown.mjs +2 -2
  26. package/esm/Fieldset/Fieldset.mjs +2 -2
  27. package/esm/Frame/Frame.mjs +4 -3
  28. package/esm/Input/Input.mjs +2 -4
  29. package/esm/List/List.mjs +3 -5
  30. package/esm/List/ListDivider.mjs +2 -12
  31. package/esm/List/ListItem.mjs +3 -3
  32. package/esm/Modal/Modal.mjs +9 -11
  33. package/esm/Modal/ModalProvider.mjs +6 -4
  34. package/esm/ProgressBar/ProgressBar.mjs +4 -4
  35. package/esm/RadioButton/RadioButton.mjs +3 -3
  36. package/esm/Range/Range.mjs +11 -13
  37. package/esm/Tabs/Tab.mjs +2 -2
  38. package/esm/Tabs/Tabs.mjs +21 -24
  39. package/esm/TaskBar/Clock.mjs +3 -3
  40. package/esm/TaskBar/TaskBar.mjs +9 -9
  41. package/esm/TaskBar/WindowButton.mjs +3 -3
  42. package/esm/TextArea/TextArea.mjs +2 -2
  43. package/esm/TitleBar/TitleBar.mjs +16 -14
  44. package/esm/Tooltip/Tooltip.mjs +5 -5
  45. package/esm/Tree/Node.mjs +2 -2
  46. package/esm/Tree/Tree.mjs +2 -2
  47. package/esm/Video/Video.mjs +14 -13
  48. package/esm/Video/buttons/Fullscreen.mjs +1 -1
  49. package/esm/Video/buttons/Pause.mjs +1 -1
  50. package/esm/Video/buttons/Play.mjs +1 -1
  51. package/esm/Video/buttons/Stop.mjs +1 -1
  52. package/package.json +2 -2
  53. package/types/Avatar/Avatar.d.ts +7 -4
  54. package/types/Button/Button.d.ts +5 -2
  55. package/types/Checkbox/Checkbox.d.ts +3 -2
  56. package/types/Dropdown/Dropdown.d.ts +2 -1
  57. package/types/Fieldset/Fieldset.d.ts +2 -1
  58. package/types/Frame/Frame.d.ts +7 -4
  59. package/types/Input/Input.d.ts +1 -1
  60. package/types/List/List.d.ts +1 -1
  61. package/types/List/ListItem.d.ts +3 -2
  62. package/types/Modal/Modal.d.ts +8 -8
  63. package/types/Modal/ModalContext.d.ts +2 -2
  64. package/types/Modal/ModalProvider.d.ts +2 -2
  65. package/types/ProgressBar/ProgressBar.d.ts +6 -3
  66. package/types/RadioButton/RadioButton.d.ts +2 -1
  67. package/types/Range/Range.d.ts +1 -1
  68. package/types/Tabs/Tab.d.ts +3 -2
  69. package/types/Tabs/Tabs.d.ts +3 -2
  70. package/types/TaskBar/TaskBar.d.ts +2 -1
  71. package/types/TaskBar/WindowButton.d.ts +2 -1
  72. package/types/TextArea/TextArea.d.ts +1 -1
  73. package/types/TitleBar/TitleBar.d.ts +5 -4
  74. package/types/Tooltip/Tooltip.d.ts +3 -2
  75. package/types/Tree/Node.d.ts +7 -6
  76. package/types/Tree/Tree.d.ts +2 -2
  77. package/types/Video/Video.d.ts +10 -9
  78. package/types/Video/buttons/Fullscreen.d.ts +3 -2
  79. package/types/Video/buttons/Pause.d.ts +3 -2
  80. package/types/Video/buttons/Play.d.ts +3 -2
  81. package/types/Video/buttons/Stop.d.ts +3 -2
@@ -3,24 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const Avatar_css = require("./Avatar.css.cjs");
5
5
  const Frame = require("../Frame/Frame.cjs");
6
- function _interopNamespaceDefault(e) {
7
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
- if (e) {
9
- for (const k in e) {
10
- if (k !== "default") {
11
- const d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: () => e[k]
15
- });
16
- }
17
- }
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
23
- const Avatar = React__namespace.forwardRef(
24
- ({ src, srcSet, alt, circle, children, size = "48px", ...otherProps }, ref) => /* @__PURE__ */ React__namespace.createElement(Frame.Frame, { className: Avatar_css.avatar({ circle }), ref, ...otherProps, size }, src || srcSet ? /* @__PURE__ */ React__namespace.createElement("img", { className: Avatar_css.imgStyle, src, srcSet, alt }) : children)
6
+ const Avatar = React.forwardRef(
7
+ ({ src, srcSet, alt, circle, children, size = "48px", ...otherProps }, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { className: Avatar_css.avatar({ circle }), ref, ...otherProps, size }, src || srcSet ? /* @__PURE__ */ React.createElement("img", { className: Avatar_css.imgStyle, src, srcSet, alt }) : children)
25
8
  );
26
9
  exports.Avatar = Avatar;
@@ -4,7 +4,7 @@ const React = require("react");
4
4
  const cn = require("classnames");
5
5
  const Button_css = require("./Button.css.cjs");
6
6
  const Frame = require("../Frame/Frame.cjs");
7
- const Button = React.forwardRef(
7
+ const Button = Frame.fixedForwardRef(
8
8
  (props, ref) => {
9
9
  return /* @__PURE__ */ React.createElement(
10
10
  Frame.Frame,
@@ -4,6 +4,6 @@ const React = require("react");
4
4
  const Fieldset_css = require("./Fieldset.css.cjs");
5
5
  const Frame = require("../Frame/Frame.cjs");
6
6
  const Fieldset = React.forwardRef(
7
- ({ legend, children, ...rest }, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { as: "fieldset", ...rest, ref, className: Fieldset_css.field }, legend && /* @__PURE__ */ React.createElement("legend", { className: Fieldset_css.legend }, legend), children)
7
+ ({ legend, children, ...rest }, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, as: "fieldset", ref, className: Fieldset_css.field }, legend && /* @__PURE__ */ React.createElement("legend", { className: Fieldset_css.legend }, legend), children)
8
8
  );
9
9
  exports.Fieldset = Fieldset;
@@ -21,3 +21,4 @@ const FrameComponent = (props, ref) => {
21
21
  };
22
22
  const Frame = fixedForwardRef(FrameComponent);
23
23
  exports.Frame = Frame;
24
+ exports.fixedForwardRef = fixedForwardRef;
@@ -3,24 +3,5 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const Frame = require("../Frame/Frame.cjs");
5
5
  const Input_css = require("./Input.css.cjs");
6
- function _interopNamespaceDefault(e) {
7
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
- if (e) {
9
- for (const k in e) {
10
- if (k !== "default") {
11
- const d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: () => e[k]
15
- });
16
- }
17
- }
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
23
- const Input = React__namespace.forwardRef(
24
- (rest, ref) => /* @__PURE__ */ React__namespace.createElement(Frame.Frame, { ...rest, ref, className: Input_css.input, as: "input" })
25
- );
6
+ const Input = React.forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: Input_css.input, as: "input" }));
26
7
  exports.Input = Input;
package/cjs/List/List.cjs CHANGED
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const cn = require("classnames");
3
5
  const ListItem = require("./ListItem.cjs");
4
6
  const ListDivider = require("./ListDivider.cjs");
5
7
  const Frame = require("../Frame/Frame.cjs");
6
- const React = require("react");
7
8
  const List_css = require("./List.css.cjs");
8
- const cn = require("classnames");
9
- const ListRenderer = React.forwardRef(
10
- (rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: cn(List_css.list, rest.className), as: "ul" })
11
- );
9
+ const ListRenderer = React.forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: cn(List_css.list, rest.className), as: "ul" }));
12
10
  const List = Object.assign(ListRenderer, {
13
11
  Item: ListItem.ListItem,
14
12
  Divider: ListDivider.Divider
@@ -4,16 +4,6 @@ const React = require("react");
4
4
  const Frame = require("../Frame/Frame.cjs");
5
5
  const List_css = require("./List.css.cjs");
6
6
  const cn = require("classnames");
7
- const Divider = React.forwardRef(
8
- (rest, ref) => /* @__PURE__ */ React.createElement(
9
- Frame.Frame,
10
- {
11
- ...rest,
12
- ref,
13
- className: cn(List_css.divider, rest.className),
14
- as: "li"
15
- }
16
- )
17
- );
7
+ const Divider = React.forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: cn(List_css.divider, rest.className), as: "li" }));
18
8
  Divider.displayName = "List.Divider";
19
9
  exports.Divider = Divider;
@@ -9,23 +9,6 @@ const Modal_css = require("./Modal.css.cjs");
9
9
  const Frame = require("../Frame/Frame.cjs");
10
10
  const close = require("./close.svg.cjs");
11
11
  const help = require("./help.svg.cjs");
12
- function _interopNamespaceDefault(e) {
13
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
14
- if (e) {
15
- for (const k in e) {
16
- if (k !== "default") {
17
- const d = Object.getOwnPropertyDescriptor(e, k);
18
- Object.defineProperty(n, k, d.get ? d : {
19
- enumerable: true,
20
- get: () => e[k]
21
- });
22
- }
23
- }
24
- }
25
- n.default = e;
26
- return Object.freeze(n);
27
- }
28
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
29
12
  const ModalRenderer = ({
30
13
  hasWindowButton: hasButton = true,
31
14
  buttons = [],
@@ -49,11 +32,11 @@ const ModalRenderer = ({
49
32
  updateWindow,
50
33
  setActiveWindow,
51
34
  activeWindow
52
- } = React__namespace.useContext(ModalContext.ModalContext);
53
- const [id, setId] = React__namespace.useState(null);
54
- const [menuOpened, setMenuOpened] = React__namespace.useState("");
55
- const [isActive, setIsActive] = React__namespace.useState(false);
56
- React__namespace.useEffect(() => {
35
+ } = React.useContext(ModalContext.ModalContext);
36
+ const [id, setId] = React.useState(null);
37
+ const [menuOpened, setMenuOpened] = React.useState("");
38
+ const [isActive, setIsActive] = React.useState(false);
39
+ React.useEffect(() => {
57
40
  if (!id) {
58
41
  const newId = addWindows({ icon, title, hasButton });
59
42
  if (newId) {
@@ -64,15 +47,15 @@ const ModalRenderer = ({
64
47
  updateWindow(id, { icon, title, hasButton });
65
48
  }
66
49
  }, [id, icon, title, hasButton]);
67
- React__namespace.useEffect(() => {
50
+ React.useEffect(() => {
68
51
  return () => {
69
52
  if (id) {
70
53
  removeWindow(id);
71
54
  }
72
55
  };
73
56
  }, [id]);
74
- React__namespace.useEffect(() => setIsActive(id === activeWindow), [id, activeWindow]);
75
- return /* @__PURE__ */ React__namespace.createElement(
57
+ React.useEffect(() => setIsActive(id === activeWindow), [id, activeWindow]);
58
+ return /* @__PURE__ */ React.createElement(
76
59
  Draggable,
77
60
  {
78
61
  handle: ".draggable",
@@ -80,7 +63,7 @@ const ModalRenderer = ({
80
63
  positionOffset,
81
64
  onMouseDown: id ? () => setActiveWindow(id) : void 0
82
65
  },
83
- /* @__PURE__ */ React__namespace.createElement(
66
+ /* @__PURE__ */ React.createElement(
84
67
  Frame.Frame,
85
68
  {
86
69
  ...rest,
@@ -89,7 +72,7 @@ const ModalRenderer = ({
89
72
  className: Modal_css.modalWrapper({ active: isActive }),
90
73
  ref
91
74
  },
92
- /* @__PURE__ */ React__namespace.createElement(
75
+ /* @__PURE__ */ React.createElement(
93
76
  TitleBar.TitleBar,
94
77
  {
95
78
  active: isActive,
@@ -97,11 +80,11 @@ const ModalRenderer = ({
97
80
  title,
98
81
  className: "draggable"
99
82
  },
100
- /* @__PURE__ */ React__namespace.createElement(TitleBar.TitleBar.OptionsBox, null, onHelp && /* @__PURE__ */ React__namespace.createElement(TitleBar.TitleBar.Option, null, /* @__PURE__ */ React__namespace.createElement("img", { src: help, alt: "help", onClick: onHelp })), /* @__PURE__ */ React__namespace.createElement(TitleBar.TitleBar.Option, { onClick: onClose }, /* @__PURE__ */ React__namespace.createElement("img", { src: close, alt: "close" })))
83
+ /* @__PURE__ */ React.createElement(TitleBar.TitleBar.OptionsBox, null, onHelp && /* @__PURE__ */ React.createElement(TitleBar.TitleBar.Option, null, /* @__PURE__ */ React.createElement("img", { src: help, alt: "help", onClick: onHelp })), /* @__PURE__ */ React.createElement(TitleBar.TitleBar.Option, { onClick: onClose }, /* @__PURE__ */ React.createElement("img", { src: close, alt: "close" })))
101
84
  ),
102
- menu && menu.length > 0 && /* @__PURE__ */ React__namespace.createElement("ul", { className: Modal_css.menuWrapper }, menu.map(({ name, list }) => {
85
+ menu && menu.length > 0 && /* @__PURE__ */ React.createElement("ul", { className: Modal_css.menuWrapper }, menu.map(({ name, list }) => {
103
86
  const active = menuOpened === name;
104
- return /* @__PURE__ */ React__namespace.createElement(
87
+ return /* @__PURE__ */ React.createElement(
105
88
  "li",
106
89
  {
107
90
  key: name,
@@ -112,14 +95,14 @@ const ModalRenderer = ({
112
95
  active && list
113
96
  );
114
97
  })),
115
- /* @__PURE__ */ React__namespace.createElement("div", { className: Modal_css.content, onClick: () => setMenuOpened("") }, children),
116
- buttons && buttons.length > 0 && /* @__PURE__ */ React__namespace.createElement(
98
+ /* @__PURE__ */ React.createElement("div", { className: Modal_css.content, onClick: () => setMenuOpened("") }, children),
99
+ buttons && buttons.length > 0 && /* @__PURE__ */ React.createElement(
117
100
  Frame.Frame,
118
101
  {
119
102
  className: Modal_css.buttonWrapper,
120
103
  justifyContent: buttonsAlignment
121
104
  },
122
- buttons.map((button) => /* @__PURE__ */ React__namespace.createElement(
105
+ buttons.map((button) => /* @__PURE__ */ React.createElement(
123
106
  Button.Button,
124
107
  {
125
108
  key: button.value,
@@ -132,9 +115,7 @@ const ModalRenderer = ({
132
115
  )
133
116
  );
134
117
  };
135
- const Modal = React__namespace.forwardRef(
136
- ModalRenderer
137
- );
118
+ const Modal = React.forwardRef(ModalRenderer);
138
119
  Modal.displayName = "Modal";
139
120
  Modal.defaultProps = {
140
121
  icon: void 0,
@@ -3,23 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const nanoid = require("nanoid");
4
4
  const React = require("react");
5
5
  const ModalContext = require("./ModalContext.cjs");
6
- function _interopNamespaceDefault(e) {
7
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
- if (e) {
9
- for (const k in e) {
10
- if (k !== "default") {
11
- const d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: () => e[k]
15
- });
16
- }
17
- }
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
23
6
  const windowStackReducer = (state, action) => {
24
7
  const newWindows = { ...state };
25
8
  switch (action.type) {
@@ -39,9 +22,11 @@ const windowStackReducer = (state, action) => {
39
22
  return state;
40
23
  }
41
24
  };
42
- const ModalProvider = ({ children }) => {
43
- const [windows, dispatch] = React__namespace.useReducer(windowStackReducer, {});
44
- const [activeWindow, setActiveWindow] = React__namespace.useState();
25
+ const ModalProvider = ({
26
+ children
27
+ }) => {
28
+ const [windows, dispatch] = React.useReducer(windowStackReducer, {});
29
+ const [activeWindow, setActiveWindow] = React.useState();
45
30
  const addWindows = (window) => {
46
31
  const id = nanoid.nanoid();
47
32
  dispatch({ type: "ADD_WINDOW", id, window });
@@ -53,7 +38,7 @@ const ModalProvider = ({ children }) => {
53
38
  const updateWindow = (id, window) => {
54
39
  dispatch({ type: "UPDATE_WINDOW", id, window });
55
40
  };
56
- return /* @__PURE__ */ React__namespace.createElement(
41
+ return /* @__PURE__ */ React.createElement(
57
42
  ModalContext.ModalContext.Provider,
58
43
  {
59
44
  value: {
@@ -4,33 +4,14 @@ const React = require("react");
4
4
  const Frame = require("../Frame/Frame.cjs");
5
5
  const Range_css = require("./Range.css.cjs");
6
6
  const cn = require("classnames");
7
- function _interopNamespaceDefault(e) {
8
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
- if (e) {
10
- for (const k in e) {
11
- if (k !== "default") {
12
- const d = Object.getOwnPropertyDescriptor(e, k);
13
- Object.defineProperty(n, k, d.get ? d : {
14
- enumerable: true,
15
- get: () => e[k]
16
- });
17
- }
18
- }
7
+ const Range = React.forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(
8
+ Frame.Frame,
9
+ {
10
+ ...rest,
11
+ ref,
12
+ className: cn(Range_css.range, rest.className),
13
+ as: "input",
14
+ type: "range"
19
15
  }
20
- n.default = e;
21
- return Object.freeze(n);
22
- }
23
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
24
- const Range = React__namespace.forwardRef(
25
- (rest, ref) => /* @__PURE__ */ React__namespace.createElement(
26
- Frame.Frame,
27
- {
28
- ...rest,
29
- ref,
30
- className: cn(Range_css.range, rest.className),
31
- as: "input",
32
- type: "range"
33
- }
34
- )
35
- );
16
+ ));
36
17
  exports.Range = Range;
package/cjs/Tabs/Tabs.cjs CHANGED
@@ -19,28 +19,25 @@ const Tabs = React.forwardRef(
19
19
  as: "ol",
20
20
  ref
21
21
  },
22
- React.Children.map(
23
- children,
24
- (child) => {
25
- const { title, disabled } = child.props;
26
- return /* @__PURE__ */ React.createElement(
27
- Tab.Tab,
28
- {
29
- key: title,
30
- ...child.props,
31
- activeTab,
32
- onClick: (e) => {
33
- if (!disabled) {
34
- if (onChange) {
35
- onChange(title, e);
36
- }
37
- setActiveTab(title);
22
+ React.Children.map(children, (child) => {
23
+ const { title, disabled } = child.props;
24
+ return /* @__PURE__ */ React.createElement(
25
+ Tab.Tab,
26
+ {
27
+ key: title,
28
+ ...child.props,
29
+ activeTab,
30
+ onClick: (e) => {
31
+ if (!disabled) {
32
+ if (onChange) {
33
+ onChange(title, e);
38
34
  }
35
+ setActiveTab(title);
39
36
  }
40
37
  }
41
- );
42
- }
43
- )
38
+ }
39
+ );
40
+ })
44
41
  ), /* @__PURE__ */ React.createElement(Frame.Frame, { className: Tabs_css.navContainer, width: rest.width || rest.w }, React.Children.map(
45
42
  children,
46
43
  (child) => child.props.title === activeTab && child.props.children
@@ -3,24 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const Frame = require("../Frame/Frame.cjs");
5
5
  const Input_css = require("../Input/Input.css.cjs");
6
- function _interopNamespaceDefault(e) {
7
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
- if (e) {
9
- for (const k in e) {
10
- if (k !== "default") {
11
- const d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: () => e[k]
15
- });
16
- }
17
- }
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
23
- const TextArea = React__namespace.forwardRef(
24
- (rest, ref) => /* @__PURE__ */ React__namespace.createElement(Frame.Frame, { ...rest, ref, className: Input_css.input, as: "textarea" })
6
+ const TextArea = React.forwardRef(
7
+ (rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: Input_css.input, as: "textarea" })
25
8
  );
26
9
  exports.TextArea = TextArea;
@@ -5,14 +5,16 @@ const Frame = require("../Frame/Frame.cjs");
5
5
  const TitleBar_css = require("./TitleBar.css.cjs");
6
6
  const Button_css = require("../Button/Button.css.cjs");
7
7
  const cn = require("classnames");
8
- const OptionsBox = React.forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(
9
- Frame.Frame,
10
- {
11
- ...rest,
12
- ref,
13
- className: cn(TitleBar_css.optionsBox, rest.className)
14
- }
15
- ));
8
+ const OptionsBox = React.forwardRef(
9
+ (rest, ref) => /* @__PURE__ */ React.createElement(
10
+ Frame.Frame,
11
+ {
12
+ ...rest,
13
+ ref,
14
+ className: cn(TitleBar_css.optionsBox, rest.className)
15
+ }
16
+ )
17
+ );
16
18
  const Option = React.forwardRef(
17
19
  (rest, ref) => /* @__PURE__ */ React.createElement(
18
20
  Frame.Frame,
@@ -1,25 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
- const Tooltip_css = require("./Tooltip.css.cjs");
5
4
  const cn = require("classnames");
6
- function _interopNamespaceDefault(e) {
7
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
- if (e) {
9
- for (const k in e) {
10
- if (k !== "default") {
11
- const d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: () => e[k]
15
- });
16
- }
17
- }
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
5
+ const Tooltip_css = require("./Tooltip.css.cjs");
23
6
  function formatDate(date) {
24
7
  const monthNames = [
25
8
  "January",
@@ -46,8 +29,8 @@ const TooltipRenderer = ({
46
29
  delay = 1e3,
47
30
  ...rest
48
31
  }, ref) => {
49
- const [show, setShow] = React__namespace.useState(false);
50
- const [delayTimer, setDelayTimer] = React__namespace.useState(0);
32
+ const [show, setShow] = React.useState(false);
33
+ const [delayTimer, setDelayTimer] = React.useState(0);
51
34
  const handleEnter = () => {
52
35
  const timer = window.setTimeout(() => {
53
36
  setShow(true);
@@ -58,7 +41,7 @@ const TooltipRenderer = ({
58
41
  clearTimeout(delayTimer);
59
42
  setShow(false);
60
43
  };
61
- return /* @__PURE__ */ React__namespace.createElement(
44
+ return /* @__PURE__ */ React.createElement(
62
45
  "div",
63
46
  {
64
47
  ...rest,
@@ -67,11 +50,11 @@ const TooltipRenderer = ({
67
50
  onMouseLeave: handleLeave,
68
51
  ref
69
52
  },
70
- show && /* @__PURE__ */ React__namespace.createElement("div", { className: Tooltip_css.tip }, text),
53
+ show && /* @__PURE__ */ React.createElement("div", { className: Tooltip_css.tip }, text),
71
54
  children
72
55
  );
73
56
  };
74
- const Tooltip = React__namespace.forwardRef(
57
+ const Tooltip = React.forwardRef(
75
58
  TooltipRenderer
76
59
  );
77
60
  exports.Tooltip = Tooltip;
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__ */ React__namespace.createElement(icons$1.Bat, { variant: "16x16_4", "data-testid": "react95-default-icon-bat" });
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__ */ React__namespace.createElement(
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__ */ React__namespace.createElement(icons$1.Folder, { variant: "16x16_4", "data-testid": "react95-default-icon-folder" });
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] = React__namespace.useState(false);
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__ */ React__namespace.createElement(Frame.Frame, { as: "li", ...rest, className: Tree_css.node }, /* @__PURE__ */ React__namespace.createElement("div", { className: Tree_css.nodeContent }, hasChildren && /* @__PURE__ */ React__namespace.createElement(
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__ */ React__namespace.createElement("div", { className: Tree_css.iconContainer({ hasChildren }) }, icon || /* @__PURE__ */ React__namespace.createElement(NodeIcon, { hasChildren, isOpen })), /* @__PURE__ */ React__namespace.createElement(
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__ */ React__namespace.createElement("ul", { className: Tree_css.tree }, children == null ? void 0 : children.map((dataNode) => /* @__PURE__ */ React__namespace.createElement(Node, { key: dataNode.id, ...dataNode }))));
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__ */ React__namespace.createElement(Frame.Frame, { ...rest, className: cn(Tree_css.node, Tree_css.nodeRoot) }, /* @__PURE__ */ React__namespace.createElement("div", { className: Tree_css.nodeContent }, /* @__PURE__ */ React__namespace.createElement(
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__ */ React__namespace.createElement(NodeIcon, { hasChildren: false, isOpen: true })
126
- ), /* @__PURE__ */ React__namespace.createElement(
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,