highsoft-ui 1.0.89 → 1.0.90

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.
@@ -1,4 +1,4 @@
1
- export type NotificationVariant = 'default' | 'success' | 'danger' | 'attention';
1
+ export type NotificationVariant = 'brand' | 'success' | 'danger' | 'attention';
2
2
  export interface NotificationItem {
3
3
  title?: string;
4
4
  description?: string;
@@ -1,5 +1,5 @@
1
- import { jsx as a, jsxs as r, Fragment as w } from "react/jsx-runtime";
2
- import { useState as l, useEffect as C } from "react";
1
+ import { jsx as s, jsxs as l, Fragment as w } from "react/jsx-runtime";
2
+ import { useState as d, useEffect as C } from "react";
3
3
  import { X as F } from "../../XClose-CCu1vrNS.js";
4
4
  import { c as m } from "../../clsx-OuTLNxxd.js";
5
5
  import { Button as y } from "../Button/index.js";
@@ -24,36 +24,36 @@ const E = "MhRkRW_active", j = "MhRkRW_attention", H = "MhRkRW_carousel", L = "M
24
24
  function et({
25
25
  id: v,
26
26
  content: c,
27
- variant: d = "default",
27
+ variant: r = "brand",
28
28
  closable: M = !0,
29
29
  onClose: g
30
30
  }) {
31
- const n = Array.isArray(c) ? c : [c], [h, k] = l(
31
+ const n = Array.isArray(c) ? c : [c], [h, k] = d(
32
32
  () => n.length > 1 ? Math.floor(Math.random() * n.length) : 0
33
- ), [W, u] = l(!1), [_, f] = l(!1), R = W || _, i = n[h]?.url, N = i ? "a" : "div";
33
+ ), [W, u] = d(!1), [_, f] = d(!1), R = W || _, i = n[h]?.url, N = i ? "a" : "div";
34
34
  C(() => {
35
35
  if (n.length <= 1 || R) return;
36
36
  const t = window.setInterval(() => {
37
- k((s) => (s + 1) % n.length);
37
+ k((o) => (o + 1) % n.length);
38
38
  }, 15e3);
39
39
  return () => window.clearInterval(t);
40
40
  }, [n.length, R]);
41
41
  const x = () => u(!0), I = (t) => {
42
42
  t.currentTarget.contains(t.relatedTarget) || u(!1);
43
- }, T = () => f(!0), b = () => f(!1), p = (t, s = !0) => {
44
- const o = /* @__PURE__ */ r(w, { children: [
45
- t.title && /* @__PURE__ */ r("span", { className: e.title, children: [
46
- t.tag === "new" && /* @__PURE__ */ a(B, { variant: "brand", icon: !1 }),
47
- /* @__PURE__ */ a("span", { className: e.titleText, children: t.title })
43
+ }, b = () => f(!0), T = () => f(!1), p = (t, o = !0) => {
44
+ const a = /* @__PURE__ */ l(w, { children: [
45
+ t.title && /* @__PURE__ */ l("span", { className: e.title, children: [
46
+ t.tag === "new" && /* @__PURE__ */ s(B, { variant: r, icon: !1 }),
47
+ /* @__PURE__ */ s("span", { className: e.titleText, children: t.title })
48
48
  ] }),
49
- t.description && /* @__PURE__ */ a("span", { className: e.description, children: t.description })
49
+ t.description && /* @__PURE__ */ s("span", { className: e.description, children: t.description })
50
50
  ] });
51
- return /* @__PURE__ */ a("div", { className: e.content, "aria-hidden": !s, children: o });
51
+ return /* @__PURE__ */ s("div", { className: e.content, "aria-hidden": !o, children: a });
52
52
  };
53
- return n.length ? /* @__PURE__ */ a(
53
+ return n.length ? /* @__PURE__ */ s(
54
54
  N,
55
55
  {
56
- className: m(e.notification, e[d]),
56
+ className: m(e.notification, e[r]),
57
57
  "data-theme": "light",
58
58
  ...i ? {
59
59
  href: i,
@@ -63,32 +63,32 @@ function et({
63
63
  } : {},
64
64
  onFocus: x,
65
65
  onBlur: I,
66
- onMouseEnter: T,
67
- onMouseLeave: b,
68
- children: /* @__PURE__ */ r(A, { className: e.container, children: [
69
- n.length > 1 ? /* @__PURE__ */ a("div", { className: e.carousel, "aria-live": "polite", children: n.map((t, s) => {
70
- const o = s === h;
71
- return /* @__PURE__ */ a(
66
+ onMouseEnter: b,
67
+ onMouseLeave: T,
68
+ children: /* @__PURE__ */ l(A, { className: e.container, children: [
69
+ n.length > 1 ? /* @__PURE__ */ s("div", { className: e.carousel, "aria-live": "polite", children: n.map((t, o) => {
70
+ const a = o === h;
71
+ return /* @__PURE__ */ s(
72
72
  "div",
73
73
  {
74
- className: m(e.slide, { [e.active]: o }),
75
- "aria-hidden": !o,
76
- children: p(t, o)
74
+ className: m(e.slide, { [e.active]: a }),
75
+ "aria-hidden": !a,
76
+ children: p(t, a)
77
77
  },
78
- `${t.title ?? t.description ?? "item"}-${s}`
78
+ `${t.title ?? t.description ?? "item"}-${o}`
79
79
  );
80
80
  }) }) : p(n[0]),
81
- M && /* @__PURE__ */ a(
81
+ M && /* @__PURE__ */ s(
82
82
  y,
83
83
  {
84
- variant: d === "default" ? "brand" : "transparent",
84
+ variant: r === "brand" ? "brand" : "transparent",
85
85
  size: 100,
86
86
  className: e.close,
87
87
  "aria-label": "Close notification",
88
88
  onClick: (t) => {
89
89
  t.preventDefault(), t.stopPropagation(), g?.();
90
90
  },
91
- children: /* @__PURE__ */ a(F, {})
91
+ children: /* @__PURE__ */ s(F, {})
92
92
  }
93
93
  )
94
94
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "highsoft-ui",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "Highsoft UI",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",