asma-ui-core 3.123.2 → 3.125.0
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/dist/asma-ui-core.css +1 -1
- package/dist/components/custom/widget/widget/StyledWidget.js +8 -8
- package/dist/components/icons/index.js +1 -0
- package/dist/components/icons/location-filled-icon/LocationFilledIcon.js +17 -0
- package/dist/components/icons/location-filled-icon/index.js +1 -0
- package/dist/components/navigation/link/StyledLink.js +23 -31
- package/dist/components/navigation/link/StyledLink.module.js +5 -6
- package/dist/index.js +447 -445
- package/dist/src/components/icons/index.d.ts +1 -0
- package/dist/src/components/icons/location-filled-icon/LocationFilledIcon.d.ts +12 -0
- package/dist/src/components/icons/location-filled-icon/index.d.ts +1 -0
- package/dist/src/components/navigation/link/StyledLink.d.ts +12 -3
- package/package.json +1 -1
|
@@ -9,17 +9,17 @@ import a from "./StyledWidget.module.js";
|
|
|
9
9
|
import T from "../icons/ChevronUpIcon.js";
|
|
10
10
|
import { useState as k } from "react";
|
|
11
11
|
import { Fragment as L, jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
12
|
-
var U = ({ children: s, title: c, titleNode: h, icon:
|
|
12
|
+
var U = ({ children: s, title: c, titleNode: h, icon: n, link: d, viewMore: t, persistKey: i, isLoading: g, isEmpty: l, emptyText: f, headerRight: x, headerRightClassName: p }) => {
|
|
13
13
|
const [r, w] = k(() => i ? localStorage.getItem(i) === "true" : !1), u = !!d && !d.hide, S = !!t && !t.hide;
|
|
14
14
|
return /* @__PURE__ */ o("div", {
|
|
15
|
-
className: `${a["asma-ui-core-styled-widget"]} ${
|
|
15
|
+
className: `${a["asma-ui-core-styled-widget"]} ${l ? a["empty-state"] : ""}`,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ o("div", {
|
|
18
18
|
className: m(a["widget-header-left"], "max-xs:flex-wrap max-xs:gap-y-2"),
|
|
19
19
|
children: [
|
|
20
|
-
|
|
20
|
+
n && /* @__PURE__ */ e("span", {
|
|
21
21
|
className: "flex shrink-0",
|
|
22
|
-
children:
|
|
22
|
+
children: n
|
|
23
23
|
}),
|
|
24
24
|
h ?? /* @__PURE__ */ e(I, {
|
|
25
25
|
className: "min-w-min",
|
|
@@ -35,10 +35,10 @@ var U = ({ children: s, title: c, titleNode: h, icon: l, link: d, viewMore: t, p
|
|
|
35
35
|
className: a["widget-content"],
|
|
36
36
|
children: /* @__PURE__ */ o(L, { children: [
|
|
37
37
|
s,
|
|
38
|
-
/* @__PURE__ */ e(C, { isLoading:
|
|
38
|
+
/* @__PURE__ */ e(C, { isLoading: g }),
|
|
39
39
|
/* @__PURE__ */ e(v, {
|
|
40
|
-
isEmpty:
|
|
41
|
-
emptyText:
|
|
40
|
+
isEmpty: l,
|
|
41
|
+
emptyText: f
|
|
42
42
|
})
|
|
43
43
|
] })
|
|
44
44
|
}),
|
|
@@ -63,7 +63,7 @@ var U = ({ children: s, title: c, titleNode: h, icon: l, link: d, viewMore: t, p
|
|
|
63
63
|
}), u ? /* @__PURE__ */ e(b, {
|
|
64
64
|
dataTest: "go-to-button",
|
|
65
65
|
className: a["widget-link"],
|
|
66
|
-
size: "
|
|
66
|
+
size: "large",
|
|
67
67
|
href: d.href,
|
|
68
68
|
onClick: d.onClick,
|
|
69
69
|
content: d.content
|
|
@@ -84,6 +84,7 @@ export * from './handyman-icon.js'
|
|
|
84
84
|
export * from './pin-icon.js'
|
|
85
85
|
export * from './work-icon.js'
|
|
86
86
|
export * from './location-icon.js'
|
|
87
|
+
export * from './location-filled-icon.js'
|
|
87
88
|
export * from './form-icon.js'
|
|
88
89
|
export * from './repeat-outline-icon.js'
|
|
89
90
|
export * from './clock-outline-icon.js'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
function r(o) {
|
|
3
|
+
return /* @__PURE__ */ C("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: "1em",
|
|
6
|
+
height: "1em",
|
|
7
|
+
viewBox: "0 0 24 24",
|
|
8
|
+
...o,
|
|
9
|
+
children: /* @__PURE__ */ C("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "M13.4125 11.4125C13.8042 11.0208 14 10.55 14 10C14 9.45 13.8042 8.97917 13.4125 8.5875C13.0208 8.19583 12.55 8 12 8C11.45 8 10.9792 8.19583 10.5875 8.5875C10.1958 8.97917 10 9.45 10 10C10 10.55 10.1958 11.0208 10.5875 11.4125C10.9792 11.8042 11.45 12 12 12C12.55 12 13.0208 11.8042 13.4125 11.4125ZM12 22C9.31667 19.7167 7.3125 17.5958 5.9875 15.6375C4.6625 13.6792 4 11.8667 4 10.2C4 7.7 4.80417 5.70833 6.4125 4.225C8.02083 2.74167 9.88333 2 12 2C14.1167 2 15.9792 2.74167 17.5875 4.225C19.1958 5.70833 20 7.7 20 10.2C20 11.8667 19.3375 13.6792 18.0125 15.6375C16.6875 17.5958 14.6833 19.7167 12 22Z"
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
r as LocationFilledIcon
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LocationFilledIcon.js'
|
|
@@ -1,47 +1,39 @@
|
|
|
1
1
|
import { StyledTooltip as w } from "../../data-display/tooltip/StyledTooltip.js";
|
|
2
2
|
import a from "./StyledLink.module.js";
|
|
3
|
-
import
|
|
3
|
+
import s from "clsx";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx as h, jsxs as y } from "react/jsx-runtime";
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
break;
|
|
12
|
-
case "small":
|
|
13
|
-
r = a["styled-link-small"];
|
|
14
|
-
break;
|
|
15
|
-
case "xs":
|
|
16
|
-
r = a["styled-link-xs"];
|
|
17
|
-
break;
|
|
18
|
-
}
|
|
6
|
+
var v = {
|
|
7
|
+
small: "large",
|
|
8
|
+
xs: "medium"
|
|
9
|
+
}, g = ({ href: u, disabled: e, disabledReason: x, size: r = "large", dataTest: d, reflink: f, className: n, content: i, contentNode: o, onClick: c, ...t }) => {
|
|
10
|
+
const m = (r === "small" || r === "xs" ? v[r] : r) === "medium" ? a["styled-link-medium"] : a["styled-link-large"];
|
|
19
11
|
if (e && !x) return /* @__PURE__ */ y("span", {
|
|
20
|
-
className:
|
|
21
|
-
children: [i,
|
|
12
|
+
className: s(a["styled-link"], "max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", a["styled-link-disabled"], m, n),
|
|
13
|
+
children: [i, o]
|
|
22
14
|
});
|
|
23
|
-
const
|
|
15
|
+
const p = (l) => /* @__PURE__ */ h(w, {
|
|
24
16
|
title: x,
|
|
25
17
|
open: e ? void 0 : !1,
|
|
26
18
|
openOnTap: !!e,
|
|
27
19
|
persistentDescription: !!e,
|
|
28
20
|
children: l
|
|
29
|
-
}),
|
|
21
|
+
}), k = (l) => {
|
|
30
22
|
if (e) {
|
|
31
23
|
l.preventDefault();
|
|
32
24
|
return;
|
|
33
25
|
}
|
|
34
26
|
c?.(l);
|
|
35
27
|
};
|
|
36
|
-
return
|
|
28
|
+
return p(u ? /* @__PURE__ */ y("a", {
|
|
37
29
|
...t,
|
|
38
|
-
"data-testid":
|
|
39
|
-
ref:
|
|
40
|
-
href: e ? void 0 :
|
|
30
|
+
"data-testid": d,
|
|
31
|
+
ref: f,
|
|
32
|
+
href: e ? void 0 : u,
|
|
41
33
|
role: e ? "link" : t.role,
|
|
42
34
|
"aria-disabled": e ? !0 : t["aria-disabled"],
|
|
43
35
|
tabIndex: e ? 0 : t.tabIndex,
|
|
44
|
-
onClick:
|
|
36
|
+
onClick: k,
|
|
45
37
|
onKeyDown: (l) => {
|
|
46
38
|
if (e && l.key === "Enter") {
|
|
47
39
|
l.preventDefault();
|
|
@@ -49,19 +41,19 @@ var j = ({ href: m, disabled: e, disabledReason: x, size: p = "large", dataTest:
|
|
|
49
41
|
}
|
|
50
42
|
t.onKeyDown?.(l);
|
|
51
43
|
},
|
|
52
|
-
className:
|
|
53
|
-
children: [i,
|
|
44
|
+
className: s(a["styled-link"], "max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", e ? a["styled-link-disabled"] : "asma-touch-ready", m, n),
|
|
45
|
+
children: [i, o]
|
|
54
46
|
}) : /* @__PURE__ */ y("button", {
|
|
55
47
|
...t,
|
|
56
|
-
"data-testid":
|
|
57
|
-
ref:
|
|
48
|
+
"data-testid": d,
|
|
49
|
+
ref: f,
|
|
58
50
|
type: "button",
|
|
59
51
|
"aria-disabled": e ? !0 : t["aria-disabled"],
|
|
60
|
-
onClick:
|
|
61
|
-
className:
|
|
62
|
-
children: [i,
|
|
52
|
+
onClick: k,
|
|
53
|
+
className: s(a["styled-link"], "max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", a["styled-link-button"], e ? a["styled-link-disabled"] : "asma-touch-ready", m, n),
|
|
54
|
+
children: [i, o]
|
|
63
55
|
}));
|
|
64
56
|
};
|
|
65
57
|
export {
|
|
66
|
-
|
|
58
|
+
g as StyledLink
|
|
67
59
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
var l = {
|
|
2
|
-
"styled-link": "_styled-
|
|
3
|
-
"styled-link-disabled": "_styled-link-
|
|
4
|
-
"styled-link-button": "_styled-link-
|
|
5
|
-
"styled-link-
|
|
6
|
-
"styled-link-
|
|
7
|
-
"styled-link-large": "_styled-link-large_ttb58_52"
|
|
2
|
+
"styled-link": "_styled-link_1fgwh_1",
|
|
3
|
+
"styled-link-disabled": "_styled-link-disabled_1fgwh_14",
|
|
4
|
+
"styled-link-button": "_styled-link-button_1fgwh_37",
|
|
5
|
+
"styled-link-medium": "_styled-link-medium_1fgwh_42",
|
|
6
|
+
"styled-link-large": "_styled-link-large_1fgwh_47"
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
9
|
l as default
|