@react95/core 8.0.0-alpha.9 → 8.0.1

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 (84) hide show
  1. package/README.md +18 -42
  2. package/cjs/Avatar/Avatar.cjs +2 -19
  3. package/cjs/Button/Button.cjs +1 -1
  4. package/cjs/Fieldset/Fieldset.cjs +1 -1
  5. package/cjs/Frame/Frame.cjs +1 -0
  6. package/cjs/Input/Input.cjs +1 -20
  7. package/cjs/List/List.cjs +3 -5
  8. package/cjs/List/ListDivider.cjs +1 -11
  9. package/cjs/Modal/Modal.cjs +17 -36
  10. package/cjs/Modal/ModalProvider.cjs +6 -21
  11. package/cjs/Range/Range.cjs +9 -28
  12. package/cjs/Tabs/Tabs.cjs +16 -19
  13. package/cjs/TextArea/TextArea.cjs +2 -19
  14. package/cjs/TitleBar/TitleBar.cjs +10 -8
  15. package/cjs/Tooltip/Tooltip.cjs +6 -23
  16. package/cjs/Tree/Node.cjs +10 -27
  17. package/cjs/Tree/Tree.css.ts.vanilla.css +1 -1
  18. package/cjs/Video/Video.cjs +28 -44
  19. package/cjs/Video/buttons/Fullscreen.cjs +2 -19
  20. package/cjs/Video/buttons/Pause.cjs +2 -19
  21. package/cjs/Video/buttons/Play.cjs +2 -19
  22. package/cjs/Video/buttons/Stop.cjs +2 -19
  23. package/esm/Alert/Alert.mjs +6 -6
  24. package/esm/Avatar/Avatar.mjs +2 -2
  25. package/esm/Button/Button.mjs +4 -4
  26. package/esm/Checkbox/Checkbox.mjs +3 -3
  27. package/esm/Dropdown/Dropdown.mjs +2 -2
  28. package/esm/Fieldset/Fieldset.mjs +2 -2
  29. package/esm/Frame/Frame.mjs +4 -3
  30. package/esm/Input/Input.mjs +2 -4
  31. package/esm/List/List.mjs +3 -5
  32. package/esm/List/ListDivider.mjs +2 -12
  33. package/esm/List/ListItem.mjs +3 -3
  34. package/esm/Modal/Modal.mjs +9 -11
  35. package/esm/Modal/ModalProvider.mjs +6 -4
  36. package/esm/ProgressBar/ProgressBar.mjs +4 -4
  37. package/esm/RadioButton/RadioButton.mjs +3 -3
  38. package/esm/Range/Range.mjs +11 -13
  39. package/esm/Tabs/Tab.mjs +2 -2
  40. package/esm/Tabs/Tabs.mjs +21 -24
  41. package/esm/TaskBar/Clock.mjs +3 -3
  42. package/esm/TaskBar/TaskBar.mjs +9 -9
  43. package/esm/TaskBar/WindowButton.mjs +3 -3
  44. package/esm/TextArea/TextArea.mjs +2 -2
  45. package/esm/TitleBar/TitleBar.mjs +16 -14
  46. package/esm/Tooltip/Tooltip.mjs +5 -5
  47. package/esm/Tree/Node.mjs +2 -2
  48. package/esm/Tree/Tree.css.ts.vanilla.css +1 -1
  49. package/esm/Tree/Tree.mjs +2 -2
  50. package/esm/Video/Video.mjs +14 -13
  51. package/esm/Video/buttons/Fullscreen.mjs +1 -1
  52. package/esm/Video/buttons/Pause.mjs +1 -1
  53. package/esm/Video/buttons/Play.mjs +1 -1
  54. package/esm/Video/buttons/Stop.mjs +1 -1
  55. package/package.json +7 -7
  56. package/types/Avatar/Avatar.d.ts +7 -4
  57. package/types/Button/Button.d.ts +5 -2
  58. package/types/Checkbox/Checkbox.d.ts +3 -2
  59. package/types/Dropdown/Dropdown.d.ts +2 -1
  60. package/types/Fieldset/Fieldset.d.ts +2 -1
  61. package/types/Frame/Frame.d.ts +7 -4
  62. package/types/Input/Input.d.ts +1 -1
  63. package/types/List/List.d.ts +1 -1
  64. package/types/List/ListItem.d.ts +3 -2
  65. package/types/Modal/Modal.d.ts +8 -8
  66. package/types/Modal/ModalContext.d.ts +2 -2
  67. package/types/Modal/ModalProvider.d.ts +2 -2
  68. package/types/ProgressBar/ProgressBar.d.ts +6 -3
  69. package/types/RadioButton/RadioButton.d.ts +2 -1
  70. package/types/Range/Range.d.ts +1 -1
  71. package/types/Tabs/Tab.d.ts +3 -2
  72. package/types/Tabs/Tabs.d.ts +3 -2
  73. package/types/TaskBar/TaskBar.d.ts +2 -1
  74. package/types/TaskBar/WindowButton.d.ts +2 -1
  75. package/types/TextArea/TextArea.d.ts +1 -1
  76. package/types/TitleBar/TitleBar.d.ts +5 -4
  77. package/types/Tooltip/Tooltip.d.ts +3 -2
  78. package/types/Tree/Node.d.ts +7 -6
  79. package/types/Tree/Tree.d.ts +2 -2
  80. package/types/Video/Video.d.ts +10 -9
  81. package/types/Video/buttons/Fullscreen.d.ts +3 -2
  82. package/types/Video/buttons/Pause.d.ts +3 -2
  83. package/types/Video/buttons/Play.d.ts +3 -2
  84. package/types/Video/buttons/Stop.d.ts +3 -2
package/README.md CHANGED
@@ -12,60 +12,36 @@ React95 will be available via either npm and yarn.
12
12
  npm install @react95/core
13
13
  # or
14
14
  yarn add @react95/core
15
+ # or
16
+ pnpm add @react95/core
15
17
  ```
16
18
 
17
- You'll also need to add the [`@react95/icons/icons.css`](../icons) file
18
-
19
19
  ## Usage
20
20
 
21
- After installation, you can use any React95 component in your React application:
21
+ The easiest way to check how the React95 components work altogether is by
22
+ checking [the StackBlitz starter](https://stackblitz.com/edit/react95-vite-starter).
22
23
 
23
- ```js
24
- import { Button, ThemeProvider } from '@react95/core';
25
- import '@react95/icons/icons.css';
24
+ For a better look and usage of React95, we strongly recommend you choose and
25
+ import a theme in your app. Optionally, you can add the GlobalStyle to style
26
+ fonts, scrollbars, and links.
26
27
 
27
- const MyApp = () => (
28
- <ThemeProvider>
29
- <Button>Click me!</Button>
30
- </ThemeProvider>
31
- );
28
+ ```js
29
+ import '@react95/core/GlobalStyle';
30
+ import '@react95/core/themes/win95.css';
32
31
  ```
33
32
 
34
- ## Typescript
33
+ After setting, you can use any React95 component in your React application:
35
34
 
36
- React95 has built-in TS support!
37
-
38
- make sure to install the types properly for `styled-components` and `xstyled`
35
+ ```js
36
+ import { Button } from '@react95/core';
39
37
 
40
- ```shell
41
- npm install @types/styled-components @types/xstyled__styled-components
42
- # or
43
- yarn add @types/styled-components @types/xstyled__styled-components
38
+ export const MyApp = () => {
39
+ return <Button>Click me!</Button>;
40
+ };
44
41
  ```
45
42
 
46
- You can find a list of all available components at our [Storybook](https://react95.github.io/React95/)
43
+ You can find a list of all available components on our [Storybook page](https://react95.github.io/React95/)
47
44
 
48
45
  ### Next.JS
49
46
 
50
- If you want to use React95 on a NextJS project, you will need to do the follow
51
- steps:
52
-
53
- - Add `next-transpile-modules` and `next-fonts` dependencies:
54
-
55
- ```
56
- npm install --save-dev next-transpile-modules next-fonts
57
- // or
58
- yarn add next-transpile-modules next-fonts
59
- ```
60
-
61
- - Edit your `next.config.js` file to something like:
62
-
63
- ```javascript
64
- const withFonts = require('next-fonts');
65
- const withTM = require('next-transpile-modules')([
66
- '@react95/core',
67
- '@react95/icons',
68
- ]);
69
-
70
- module.exports = withTM(withFonts());
71
- ```
47
+ If you want to use React95 on a NextJS project, check the [NextJS template](https://github.com/React95/nextjs-template)
@@ -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;