asma-ui-core 3.135.1 → 3.135.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.
@@ -1,49 +1,48 @@
1
- import { cn as s } from "../../../../helpers/cn.js";
1
+ import { cn as o } from "../../../../helpers/cn.js";
2
2
  import { StyledButton as N } from "../../../inputs/button/StyledButton.js";
3
3
  import b from "../icons/ChevronDownIcon.js";
4
- import { StyledEmptyPage as C } from "../../../feedback/empty-page/StyledEmptyPage.js";
5
- import { StyledLoading as I } from "../../../feedback/loading/StyledLoading.js";
6
- import { StyledLink as v } from "../../../navigation/link/StyledLink.js";
4
+ import { StyledEmptyPage as v } from "../../../feedback/empty-page/StyledEmptyPage.js";
5
+ import { StyledLoading as C } from "../../../feedback/loading/StyledLoading.js";
6
+ import { StyledLink as I } from "../../../navigation/link/StyledLink.js";
7
7
  import { StyledWidgetTitle as T } from "../widget-title/StyledWidgetTitle.js";
8
8
  import a from "./StyledWidget.module.js";
9
9
  import k from "../icons/ChevronUpIcon.js";
10
10
  import { useState as L } from "react";
11
- import { Fragment as R, jsx as e, jsxs as i } from "react/jsx-runtime";
12
- var V = ({ children: m, title: c, titleNode: h, icon: n, link: l, viewMore: t, persistKey: o, isLoading: g, isEmpty: r, emptyText: f, headerRight: x, headerRightClassName: p }) => {
13
- const [d, w] = L(() => o ? localStorage.getItem(o) === "true" : !1), u = !!l && !l.hide, S = !!t && !t.hide, y = !!t?.disabled && !d && t?.disabledReason != null;
14
- return /* @__PURE__ */ i("div", {
11
+ import { Fragment as R, jsx as e, jsxs as l } from "react/jsx-runtime";
12
+ var V = ({ children: m, title: c, titleNode: h, icon: s, link: i, viewMore: t, persistKey: n, isLoading: g, isEmpty: r, emptyText: f, headerRight: p, headerRightClassName: x }) => {
13
+ const [d, w] = L(() => n ? localStorage.getItem(n) === "true" : !1), u = !!i && !i.hide, S = !!t && !t.hide, y = !!t?.disabled && !d && t?.disabledReason != null;
14
+ return /* @__PURE__ */ l("div", {
15
15
  className: `${a["asma-ui-core-styled-widget"]} ${r ? a["empty-state"] : ""}`,
16
16
  children: [
17
- /* @__PURE__ */ i("div", {
18
- className: s(a["widget-header-left"], "max-xs:flex-wrap max-xs:gap-y-2"),
19
- children: [
20
- n && /* @__PURE__ */ e("span", {
17
+ /* @__PURE__ */ l("div", {
18
+ className: o(a["widget-header-left"], "flex-wrap gap-y-2"),
19
+ children: [/* @__PURE__ */ l("div", {
20
+ className: "flex min-w-0 items-center gap-2.5 max-xs:contents",
21
+ children: [s && /* @__PURE__ */ e("span", {
21
22
  className: "flex shrink-0",
22
- children: n
23
- }),
24
- h ?? /* @__PURE__ */ e(T, {
23
+ children: s
24
+ }), h ?? /* @__PURE__ */ e(T, {
25
25
  className: "min-w-min",
26
26
  children: c
27
- }),
28
- /* @__PURE__ */ e("div", {
29
- className: s(a["widget-header-right"], "max-xs:flex-wrap max-xs:gap-y-2", p),
30
- children: x
31
- })
32
- ]
27
+ })]
28
+ }), /* @__PURE__ */ e("div", {
29
+ className: o(a["widget-header-right"], "empty:hidden max-xs:flex-wrap max-xs:gap-y-2", x),
30
+ children: p
31
+ })]
33
32
  }),
34
33
  /* @__PURE__ */ e("div", {
35
34
  className: a["widget-content"],
36
- children: /* @__PURE__ */ i(R, { children: [
35
+ children: /* @__PURE__ */ l(R, { children: [
37
36
  m,
38
- /* @__PURE__ */ e(I, { isLoading: g }),
39
- /* @__PURE__ */ e(C, {
37
+ /* @__PURE__ */ e(C, { isLoading: g }),
38
+ /* @__PURE__ */ e(v, {
40
39
  isEmpty: r,
41
40
  emptyText: f
42
41
  })
43
42
  ] })
44
43
  }),
45
- S && /* @__PURE__ */ i("div", {
46
- className: s(a["widget-footer"], "max-xs:flex-wrap max-xs:gap-y-2"),
44
+ S && /* @__PURE__ */ l("div", {
45
+ className: o(a["widget-footer"], "max-xs:flex-wrap max-xs:gap-y-2"),
47
46
  children: [y ? /* @__PURE__ */ e("p", {
48
47
  className: a["widget-all-shown"],
49
48
  "data-testid": "all-items-shown",
@@ -61,16 +60,16 @@ var V = ({ children: m, title: c, titleNode: h, icon: n, link: l, viewMore: t, p
61
60
  height: 20
62
61
  }),
63
62
  onClick: () => {
64
- w(!d), o && localStorage.setItem(o, String(!d)), t.onClick?.();
63
+ w(!d), n && localStorage.setItem(n, String(!d)), t.onClick?.();
65
64
  },
66
65
  children: d ? t.viewLessText : t.viewMoreText
67
- }), u ? /* @__PURE__ */ e(v, {
66
+ }), u ? /* @__PURE__ */ e(I, {
68
67
  dataTest: "go-to-button",
69
68
  className: a["widget-link"],
70
69
  size: "large",
71
- href: l.href,
72
- onClick: l.onClick,
73
- content: l.content
70
+ href: i.href,
71
+ onClick: i.onClick,
72
+ content: i.content
74
73
  }) : /* @__PURE__ */ e("div", {})]
75
74
  })
76
75
  ]
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.135.1",
6
+ "version": "3.135.2",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",