chop-logic-components 4.0.0 → 4.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.
package/README.md CHANGED
@@ -13,6 +13,7 @@
13
13
  [![Code Style: Prettier](https://img.shields.io/badge/Code_Style-Prettier-ff69b4.svg?style=flat)](https://prettier.io)
14
14
  [![Keep a changelog](https://img.shields.io/badge/Keep%20a%20changelog-1.1.0-E05735?logo=keep-a-changelog&labelColor)](https://keepachangelog.com/en/1.1.0/)
15
15
  [![Semantic versioning](https://img.shields.io/badge/SemVer-2.0.0-3F4551?logo=semver&labelColor)](https://semver.org/spec/v2.0.0)
16
+ [![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FChopLogic%2Fchop-logic-components%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/ChopLogic/chop-logic-components/main)
16
17
 
17
18
  Welcome to **Chop Logic Components**, a React components library packed with a variety of **styled
18
19
  components** and **custom hooks** that are easy to integrate into any React project.
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as I } from "react/jsx-runtime";
2
2
  import { getClassName as v } from "../../../utils/get-class-name.js";
3
3
  import { useRef as A } from "react";
4
4
  import './Alert.css';/* empty css */
5
- import { getAlertTitle as C, getAlertIcon as B } from "./Alert.helpers.js";
5
+ import { getAlertTitle as B, getAlertIcon as C } from "./Alert.helpers.js";
6
6
  import { AlertProgressBar as M } from "./AlertProgressBar.js";
7
7
  import { useIsMounted as T } from "../../../hooks/use-is-mounted/use-is-mounted.js";
8
8
  import { useIsHovered as b } from "../../../hooks/use-is-hovered/use-is-hovered.js";
@@ -15,24 +15,25 @@ import { ButtonView as j } from "../../../enums/button-view.js";
15
15
  import { IconName as z } from "../../../enums/icon-name.js";
16
16
  import S from "../../atoms/header/Header.js";
17
17
  const W = ({
18
- isOpened: o,
19
- onClose: l,
18
+ isOpened: l,
19
+ onClose: i,
20
20
  title: n,
21
21
  message: m,
22
22
  mode: t = x.Info,
23
23
  icon: a,
24
- autoClose: i = !1,
24
+ autoClose: o = !1,
25
25
  autoCloseDelay: c = 3e3,
26
26
  ...f
27
27
  }) => {
28
- const r = T(o), p = r && !o, s = A(null), d = b(s, r), u = !i, g = w({
28
+ const r = T(l), p = r && !l, s = A(null), d = b(s, r), u = !o, g = w({
29
29
  isOpened: r,
30
30
  isHovered: d,
31
- onClose: l,
32
- autoCloseDelay: c
31
+ onClose: i,
32
+ autoCloseDelay: c,
33
+ autoClose: o
33
34
  });
34
35
  if (!r) return null;
35
- const _ = C(t, n), h = B(t, a), N = v([
36
+ const _ = B(t, n), h = C(t, a), N = v([
36
37
  "cl-alert",
37
38
  `cl-alert_${t.toLowerCase()}`,
38
39
  { "cl-alert_closing": p }
@@ -45,13 +46,13 @@ const W = ({
45
46
  view: j.Icon,
46
47
  iconSize: R.Medium,
47
48
  label: "Close alert",
48
- onClick: l,
49
+ onClick: i,
49
50
  className: "cl-alert__button"
50
51
  }
51
52
  ),
52
53
  /* @__PURE__ */ e("header", { children: /* @__PURE__ */ e(S, { icon: h, as: "h3", className: "cl-alert__header", children: _ }) }),
53
54
  /* @__PURE__ */ e("p", { className: "cl-alert__message", children: m }),
54
- i && /* @__PURE__ */ e(M, { remainingPercentage: g })
55
+ o && /* @__PURE__ */ e(M, { remainingPercentage: g })
55
56
  ] }) }) });
56
57
  };
57
58
  export {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/ChopLogic/chop-logic-components.git"
6
6
  },
7
- "version": "4.0.0",
7
+ "version": "4.0.1",
8
8
  "description": "Reusable React components and hooks for the Chop Logic project",
9
9
  "type": "module",
10
10
  "module": "dist/index.es.js",