@react95/core 9.2.1 → 9.2.2

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.
@@ -3,7 +3,26 @@ 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
+ const cn = require("classnames");
6
7
  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)
8
+ ({
9
+ src,
10
+ srcSet,
11
+ alt,
12
+ circle,
13
+ children,
14
+ size = "48px",
15
+ className,
16
+ ...otherProps
17
+ }, ref) => /* @__PURE__ */ React.createElement(
18
+ Frame.Frame,
19
+ {
20
+ ...otherProps,
21
+ ref,
22
+ size,
23
+ className: cn(Avatar_css.avatar({ circle }), className)
24
+ },
25
+ src || srcSet ? /* @__PURE__ */ React.createElement("img", { className: Avatar_css.imgStyle, src, srcSet, alt }) : children
26
+ )
8
27
  );
9
28
  exports.Avatar = Avatar;
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const Checkbox_css = require("./Checkbox.css.cjs");
5
+ const cn = require("classnames");
5
6
  const Checkbox = React.forwardRef(
6
- ({ children, style, label, disabled = false, ...rest }, ref) => /* @__PURE__ */ React.createElement("label", { style, className: Checkbox_css.label }, /* @__PURE__ */ React.createElement(
7
+ ({ children, style, label, disabled = false, className, ...rest }, ref) => /* @__PURE__ */ React.createElement("label", { style, className: cn(Checkbox_css.label, className) }, /* @__PURE__ */ React.createElement(
7
8
  "input",
8
9
  {
9
10
  className: Checkbox_css.field,
@@ -3,7 +3,18 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const Fieldset_css = require("./Fieldset.css.cjs");
5
5
  const Frame = require("../Frame/Frame.cjs");
6
+ const cn = require("classnames");
6
7
  const Fieldset = React.forwardRef(
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
+ ({ legend, children, className, ...rest }, ref) => /* @__PURE__ */ React.createElement(
9
+ Frame.Frame,
10
+ {
11
+ ...rest,
12
+ as: "fieldset",
13
+ ref,
14
+ className: cn(Fieldset_css.field, className)
15
+ },
16
+ legend && /* @__PURE__ */ React.createElement("legend", { className: Fieldset_css.legend }, legend),
17
+ children
18
+ )
8
19
  );
9
20
  exports.Fieldset = Fieldset;
@@ -1,3 +1,4 @@
1
1
  require('./GlobalStyle.css.ts.vanilla.css');
2
2
  "use strict";
3
+ require("../themes/contract.css.ts.vanilla.css.cjs");
3
4
  /* empty css */
@@ -3,5 +3,6 @@ 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
- const Input = React.forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: Input_css.input, as: "input" }));
6
+ const cn = require("classnames");
7
+ const Input = React.forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: cn(Input_css.input, rest.className), as: "input" }));
7
8
  exports.Input = Input;
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const RadioButton_css = require("./RadioButton.css.cjs");
5
+ const cn = require("classnames");
5
6
  const RadioButton = React.forwardRef(
6
- ({ children, disabled, ...props }, ref) => /* @__PURE__ */ React.createElement("label", { className: RadioButton_css.label }, /* @__PURE__ */ React.createElement(
7
+ ({ children, disabled, ...props }, ref) => /* @__PURE__ */ React.createElement("label", { className: cn(RadioButton_css.label, props.className) }, /* @__PURE__ */ React.createElement(
7
8
  "input",
8
9
  {
9
10
  type: "radio",
package/cjs/Tabs/Tab.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
+ const cn = require("classnames");
4
5
  const Tabs_css = require("./Tabs.css.cjs");
5
6
  const Frame = require("../Frame/Frame.cjs");
6
7
  const Tab = React.forwardRef(
@@ -8,7 +9,7 @@ const Tab = React.forwardRef(
8
9
  Frame.Frame,
9
10
  {
10
11
  ...rest,
11
- className: Tabs_css.tab({ active: activeTab === title }),
12
+ className: cn(Tabs_css.tab({ active: activeTab === title }), rest.className),
12
13
  ref,
13
14
  as: "li"
14
15
  },
@@ -8,7 +8,7 @@ const icons = require("@react95/icons");
8
8
  const TaskBar_css = require("./TaskBar.css.cjs");
9
9
  const events = require("../shared/events.cjs");
10
10
  const TaskBar = React.forwardRef(
11
- ({ list }, ref) => {
11
+ ({ list, className }, ref) => {
12
12
  const [showList, toggleShowList] = React.useState(false);
13
13
  const [activeStart, toggleActiveStart] = React.useState(false);
14
14
  const [modalWindows, setModalWindows] = React.useState([]);
@@ -58,7 +58,8 @@ const TaskBar = React.forwardRef(
58
58
  zIndex: "$taskbar",
59
59
  backgroundColor: "$material",
60
60
  boxShadow: "$out",
61
- ref
61
+ ref,
62
+ className
62
63
  },
63
64
  showList && /* @__PURE__ */ React.createElement(
64
65
  Frame.Frame,
@@ -1,9 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
+ const cn = require("classnames");
4
5
  const Frame = require("../Frame/Frame.cjs");
5
6
  const Input_css = require("../Input/Input.css.cjs");
6
7
  const TextArea = React.forwardRef(
7
- (rest, ref) => /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, ref, className: Input_css.input, as: "textarea" })
8
+ (rest, ref) => /* @__PURE__ */ React.createElement(
9
+ Frame.Frame,
10
+ {
11
+ ...rest,
12
+ ref,
13
+ className: cn(Input_css.input, rest.className),
14
+ as: "textarea"
15
+ }
16
+ )
8
17
  );
9
18
  exports.TextArea = TextArea;
package/cjs/Tree/Node.cjs CHANGED
@@ -58,7 +58,7 @@ const Node = ({
58
58
  onClickHandler(event);
59
59
  }
60
60
  };
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(
61
+ return /* @__PURE__ */ React.createElement(Frame.Frame, { as: "li", ...rest, className: cn(Tree_css.node, rest.className) }, /* @__PURE__ */ React.createElement("div", { className: Tree_css.nodeContent }, hasChildren && /* @__PURE__ */ React.createElement(
62
62
  "div",
63
63
  {
64
64
  className: Tree_css.folderStatus,
package/cjs/Tree/Tree.cjs CHANGED
@@ -1,16 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
+ const cn = require("classnames");
4
5
  const Node = require("./Node.cjs");
5
6
  const Tree_css = require("./Tree.css.cjs");
6
7
  const Frame = require("../Frame/Frame.cjs");
7
8
  const Tree = React.forwardRef(
8
- ({ data, root, ...rest }, ref) => {
9
- return /* @__PURE__ */ React.createElement(React.Fragment, null, root && /* @__PURE__ */ React.createElement(Node.NodeRoot, { ...root }), /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, className: Tree_css.tree, as: "ul", ref }, data.map((dataNode) => /* @__PURE__ */ React.createElement(Node.Node, { key: dataNode.id, ...dataNode }))));
9
+ ({ data = [], root, ...rest }, ref) => {
10
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, root && /* @__PURE__ */ React.createElement(Node.NodeRoot, { ...root }), /* @__PURE__ */ React.createElement(Frame.Frame, { ...rest, className: cn(Tree_css.tree, rest.className), as: "ul", ref }, data.map((dataNode) => /* @__PURE__ */ React.createElement(Node.Node, { key: dataNode.id, ...dataNode }))));
10
11
  }
11
12
  );
12
- Tree.defaultProps = {
13
- data: []
14
- };
15
13
  Tree.icons = Node.icons;
16
14
  exports.Tree = Tree;
@@ -1,4 +1,3 @@
1
1
  require('./azureOrange.css.ts.vanilla.css');
2
2
  "use strict";
3
- require("./contract.css.ts.vanilla.css.cjs");
4
3
  /* empty css */
@@ -1,8 +1,27 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import { avatar, imgStyle } from "./Avatar.css.mjs";
3
3
  import { Frame } from "../Frame/Frame.mjs";
4
+ import cn from "classnames";
4
5
  const Avatar = forwardRef(
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
+ ({
7
+ src,
8
+ srcSet,
9
+ alt,
10
+ circle,
11
+ children,
12
+ size = "48px",
13
+ className,
14
+ ...otherProps
15
+ }, ref) => /* @__PURE__ */ React.createElement(
16
+ Frame,
17
+ {
18
+ ...otherProps,
19
+ ref,
20
+ size,
21
+ className: cn(avatar({ circle }), className)
22
+ },
23
+ src || srcSet ? /* @__PURE__ */ React.createElement("img", { className: imgStyle, src, srcSet, alt }) : children
24
+ )
6
25
  );
7
26
  export {
8
27
  Avatar
@@ -1,7 +1,8 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import { label, field, icon, text } from "./Checkbox.css.mjs";
3
+ import cn from "classnames";
3
4
  const Checkbox = forwardRef(
4
- ({ children, style, label: label$1, disabled = false, ...rest }, ref) => /* @__PURE__ */ React.createElement("label", { style, className: label }, /* @__PURE__ */ React.createElement(
5
+ ({ children, style, label: label$1, disabled = false, className, ...rest }, ref) => /* @__PURE__ */ React.createElement("label", { style, className: cn(label, className) }, /* @__PURE__ */ React.createElement(
5
6
  "input",
6
7
  {
7
8
  className: field,
@@ -1,8 +1,19 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import { field, legend } from "./Fieldset.css.mjs";
3
3
  import { Frame } from "../Frame/Frame.mjs";
4
+ import cn from "classnames";
4
5
  const Fieldset = forwardRef(
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
+ ({ legend: legend$1, children, className, ...rest }, ref) => /* @__PURE__ */ React.createElement(
7
+ Frame,
8
+ {
9
+ ...rest,
10
+ as: "fieldset",
11
+ ref,
12
+ className: cn(field, className)
13
+ },
14
+ legend$1 && /* @__PURE__ */ React.createElement("legend", { className: legend }, legend$1),
15
+ children
16
+ )
6
17
  );
7
18
  export {
8
19
  Fieldset
@@ -1,2 +1,3 @@
1
1
  import './GlobalStyle.css.ts.vanilla.css';
2
+ import "../themes/contract.css.ts.vanilla.css.mjs";
2
3
  /* empty css */
@@ -1,7 +1,8 @@
1
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 = forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: input, as: "input" }));
4
+ import cn from "classnames";
5
+ const Input = forwardRef((rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: cn(input, rest.className), as: "input" }));
5
6
  export {
6
7
  Input
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import { label, field, icon, text } from "./RadioButton.css.mjs";
3
+ import cn from "classnames";
3
4
  const RadioButton = forwardRef(
4
- ({ children, disabled, ...props }, ref) => /* @__PURE__ */ React.createElement("label", { className: label }, /* @__PURE__ */ React.createElement(
5
+ ({ children, disabled, ...props }, ref) => /* @__PURE__ */ React.createElement("label", { className: cn(label, props.className) }, /* @__PURE__ */ React.createElement(
5
6
  "input",
6
7
  {
7
8
  type: "radio",
package/esm/Tabs/Tab.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import React, { forwardRef } from "react";
2
+ import cn from "classnames";
2
3
  import { tab } from "./Tabs.css.mjs";
3
4
  import { Frame } from "../Frame/Frame.mjs";
4
5
  const Tab = forwardRef(
@@ -6,7 +7,7 @@ const Tab = forwardRef(
6
7
  Frame,
7
8
  {
8
9
  ...rest,
9
- className: tab({ active: activeTab === title }),
10
+ className: cn(tab({ active: activeTab === title }), rest.className),
10
11
  ref,
11
12
  as: "li"
12
13
  },
@@ -6,7 +6,7 @@ import { Logo } from "@react95/icons";
6
6
  import { truncate } from "./TaskBar.css.mjs";
7
7
  import { modals, ModalEvents } from "../shared/events.mjs";
8
8
  const TaskBar = forwardRef(
9
- ({ list }, ref) => {
9
+ ({ list, className }, ref) => {
10
10
  const [showList, toggleShowList] = useState(false);
11
11
  const [activeStart, toggleActiveStart] = useState(false);
12
12
  const [modalWindows, setModalWindows] = React.useState([]);
@@ -56,7 +56,8 @@ const TaskBar = forwardRef(
56
56
  zIndex: "$taskbar",
57
57
  backgroundColor: "$material",
58
58
  boxShadow: "$out",
59
- ref
59
+ ref,
60
+ className
60
61
  },
61
62
  showList && /* @__PURE__ */ React.createElement(
62
63
  Frame,
@@ -1,8 +1,17 @@
1
1
  import React, { forwardRef } from "react";
2
+ import cn from "classnames";
2
3
  import { Frame } from "../Frame/Frame.mjs";
3
4
  import { input } from "../Input/Input.css.mjs";
4
5
  const TextArea = forwardRef(
5
- (rest, ref) => /* @__PURE__ */ React.createElement(Frame, { ...rest, ref, className: input, as: "textarea" })
6
+ (rest, ref) => /* @__PURE__ */ React.createElement(
7
+ Frame,
8
+ {
9
+ ...rest,
10
+ ref,
11
+ className: cn(input, rest.className),
12
+ as: "textarea"
13
+ }
14
+ )
6
15
  );
7
16
  export {
8
17
  TextArea
package/esm/Tree/Node.mjs CHANGED
@@ -56,7 +56,7 @@ const Node = ({
56
56
  onClickHandler(event);
57
57
  }
58
58
  };
59
- return /* @__PURE__ */ React.createElement(Frame, { as: "li", ...rest, className: node }, /* @__PURE__ */ React.createElement("div", { className: nodeContent }, hasChildren && /* @__PURE__ */ React.createElement(
59
+ return /* @__PURE__ */ React.createElement(Frame, { as: "li", ...rest, className: cn(node, rest.className) }, /* @__PURE__ */ React.createElement("div", { className: nodeContent }, hasChildren && /* @__PURE__ */ React.createElement(
60
60
  "div",
61
61
  {
62
62
  className: folderStatus,
package/esm/Tree/Tree.mjs CHANGED
@@ -1,15 +1,13 @@
1
1
  import React, { forwardRef } from "react";
2
+ import cn from "classnames";
2
3
  import { NodeRoot, Node, icons } from "./Node.mjs";
3
4
  import { tree } from "./Tree.css.mjs";
4
5
  import { Frame } from "../Frame/Frame.mjs";
5
6
  const Tree = forwardRef(
6
- ({ data, root, ...rest }, ref) => {
7
- return /* @__PURE__ */ React.createElement(React.Fragment, null, root && /* @__PURE__ */ React.createElement(NodeRoot, { ...root }), /* @__PURE__ */ React.createElement(Frame, { ...rest, className: tree, as: "ul", ref }, data.map((dataNode) => /* @__PURE__ */ React.createElement(Node, { key: dataNode.id, ...dataNode }))));
7
+ ({ data = [], root, ...rest }, ref) => {
8
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, root && /* @__PURE__ */ React.createElement(NodeRoot, { ...root }), /* @__PURE__ */ React.createElement(Frame, { ...rest, className: cn(tree, rest.className), as: "ul", ref }, data.map((dataNode) => /* @__PURE__ */ React.createElement(Node, { key: dataNode.id, ...dataNode }))));
8
9
  }
9
10
  );
10
- Tree.defaultProps = {
11
- data: []
12
- };
13
11
  Tree.icons = icons;
14
12
  export {
15
13
  Tree
@@ -1,3 +1,2 @@
1
1
  import './azureOrange.css.ts.vanilla.css';
2
- import "./contract.css.ts.vanilla.css.mjs";
3
2
  /* empty css */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react95/core",
3
- "version": "9.2.1",
3
+ "version": "9.2.2",
4
4
  "description": "Windows 95 styleguide",
5
5
  "main": "cjs/index.cjs",
6
6
  "type": "module",
@@ -180,7 +180,7 @@
180
180
  "url": "https://github.com/React95/React95/issues"
181
181
  },
182
182
  "homepage": "https://github.com/React95/React95#readme",
183
- "gitHead": "1d85d653063cb2b96cfa61ffb7cd02d23a1ee081",
183
+ "gitHead": "235e048ee710c8a17d46f3704e53d02d1506ccfc",
184
184
  "module": "esm/index.mjs",
185
185
  "private": false,
186
186
  "types": "types/index.d.ts"
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { ReactElement } from 'react';
3
+ import { FrameProps } from '../Frame/Frame';
3
4
  import { List } from '../List/List';
4
5
  export type TaskBarProps = {
5
6
  list?: ReactElement<typeof List>;
6
- };
7
- export declare const TaskBar: React.ForwardRefExoticComponent<TaskBarProps & React.RefAttributes<HTMLDivElement>>;
7
+ } & FrameProps<'div'>;
8
+ export declare const TaskBar: React.ForwardRefExoticComponent<Omit<TaskBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -4,7 +4,7 @@ import { FrameProps } from '../Frame/Frame';
4
4
  export type TreeProps = {
5
5
  data: Array<NodeProps>;
6
6
  root?: Omit<NodeProps, 'children'>;
7
- };
7
+ } & FrameProps<'ul'>;
8
8
  type TreeComposition = ForwardRefExoticComponent<TreeProps & RefAttributes<HTMLUListElement>> & {
9
9
  icons: typeof icons;
10
10
  } & Omit<FrameProps<'ul'>, 'as'>;