highsoft-ui 1.0.186 → 1.0.188
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/ProductIconFrame-CGrI3X4C.js +38 -0
- package/dist/ProductNotice-BfI0v5Ag.js +158 -0
- package/dist/components/ProductIcon/ProductIconFrame.js +2 -0
- package/dist/components/ProductIcon/index.js +54 -2
- package/dist/components/ProductNotice/index.js +1 -1
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/ProductIcon/ProductIconFrame.d.ts +24 -0
- package/dist/lib/components/ProductIcon/index.d.ts +3 -0
- package/dist/lib/components/ProductNotice/index.d.ts +21 -2
- package/dist/lib/main.d.ts +3 -1
- package/dist/main.js +50 -49
- package/package.json +5 -1
- package/dist/ProductIcon-Cr6E2K9a.js +0 -75
- package/dist/ProductNotice-CtgDdo5_.js +0 -144
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as e } from "./clsx-BWCAbrjV.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
var n = {
|
|
4
|
+
boxInner: "dUDeZG_boxInner",
|
|
5
|
+
boxOuter: "dUDeZG_boxOuter",
|
|
6
|
+
icon: "dUDeZG_icon",
|
|
7
|
+
svg: "dUDeZG_svg"
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region lib/components/ProductIcon/ProductIconFrame.tsx
|
|
11
|
+
function r({ icon: r, size: i = 24, box: a = !1, className: o, style: s, ...c }) {
|
|
12
|
+
let l = /* @__PURE__ */ t("span", {
|
|
13
|
+
className: e("hsui-product-icon", n.icon, o),
|
|
14
|
+
style: {
|
|
15
|
+
width: i,
|
|
16
|
+
height: i
|
|
17
|
+
},
|
|
18
|
+
children: /* @__PURE__ */ t(r, {
|
|
19
|
+
width: i,
|
|
20
|
+
height: i,
|
|
21
|
+
style: {
|
|
22
|
+
width: i,
|
|
23
|
+
height: i,
|
|
24
|
+
...s
|
|
25
|
+
},
|
|
26
|
+
...c
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
return a ? /* @__PURE__ */ t("span", {
|
|
30
|
+
className: n.boxOuter,
|
|
31
|
+
children: /* @__PURE__ */ t("span", {
|
|
32
|
+
className: n.boxInner,
|
|
33
|
+
children: l
|
|
34
|
+
})
|
|
35
|
+
}) : l;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { r as t };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useTracker as e } from "./tracking.js";
|
|
3
|
+
import { t } from "./Box-BZgeSeCV.js";
|
|
4
|
+
import { t as n } from "./clsx-BWCAbrjV.js";
|
|
5
|
+
import { r } from "./esm-CqcQTziN.js";
|
|
6
|
+
import { t as i } from "./Button-DtCIaVhq.js";
|
|
7
|
+
import { n as a } from "./Typography-DI1AkqiO.js";
|
|
8
|
+
import o from "./components/ProductIcon/icons/monochrome/Core.js";
|
|
9
|
+
import s from "./components/ProductIcon/icons/monochrome/Dashboards.js";
|
|
10
|
+
import c from "./components/ProductIcon/icons/monochrome/Gantt.js";
|
|
11
|
+
import l from "./components/ProductIcon/icons/monochrome/Grid.js";
|
|
12
|
+
import u from "./components/ProductIcon/icons/monochrome/Maps.js";
|
|
13
|
+
import d from "./components/ProductIcon/icons/monochrome/Orbit.js";
|
|
14
|
+
import f from "./components/ProductIcon/icons/monochrome/Stock.js";
|
|
15
|
+
import p from "./components/ProductIcon/icons/monochrome/Morningstar.js";
|
|
16
|
+
import { t as m } from "./ProductIconFrame-CGrI3X4C.js";
|
|
17
|
+
import { trackProductNotice as h } from "./components/ProductNotice/tracking.js";
|
|
18
|
+
import { useEffect as g, useRef as _, useState as v } from "react";
|
|
19
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
20
|
+
var S = {
|
|
21
|
+
actions: "hJxRhW_actions",
|
|
22
|
+
compactActions: "hJxRhW_compactActions",
|
|
23
|
+
compactClose: "hJxRhW_compactClose",
|
|
24
|
+
compactText: "hJxRhW_compactText",
|
|
25
|
+
content: "hJxRhW_content",
|
|
26
|
+
icon: "hJxRhW_icon",
|
|
27
|
+
message: "hJxRhW_message",
|
|
28
|
+
notice: "hJxRhW_notice",
|
|
29
|
+
"product-notice": "hJxRhW_product-notice",
|
|
30
|
+
surface: "hJxRhW_surface",
|
|
31
|
+
title: "hJxRhW_title",
|
|
32
|
+
wideActions: "hJxRhW_wideActions",
|
|
33
|
+
wideText: "hJxRhW_wideText"
|
|
34
|
+
}, C = {
|
|
35
|
+
core: o,
|
|
36
|
+
stock: f,
|
|
37
|
+
maps: u,
|
|
38
|
+
gantt: c,
|
|
39
|
+
dashboards: s,
|
|
40
|
+
grid: l,
|
|
41
|
+
orbit: d,
|
|
42
|
+
morningstar: p
|
|
43
|
+
};
|
|
44
|
+
function w({ product: o, icon: s, title: c, description: l, compactDescription: u, actions: d, closable: f = !0, onClose: p, closeLabel: w = "Close", tracking: T, tracker: E, className: D, ...O }) {
|
|
45
|
+
let k = _(null), [A, j] = v(!1), M = e(E), N = s ? void 0 : o ?? "orbit", P = _({
|
|
46
|
+
tracking: T,
|
|
47
|
+
promoted: N,
|
|
48
|
+
send: M
|
|
49
|
+
});
|
|
50
|
+
if (g(() => {
|
|
51
|
+
P.current = {
|
|
52
|
+
tracking: T,
|
|
53
|
+
promoted: N,
|
|
54
|
+
send: M
|
|
55
|
+
};
|
|
56
|
+
}), g(() => {
|
|
57
|
+
let e = k.current;
|
|
58
|
+
if (!e) return;
|
|
59
|
+
let t = !1, n = () => {
|
|
60
|
+
t || (t = !0, h(P.current.send, P.current.tracking, "view", P.current.promoted));
|
|
61
|
+
};
|
|
62
|
+
if (typeof IntersectionObserver > "u") {
|
|
63
|
+
n();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
let r = new IntersectionObserver((e) => {
|
|
67
|
+
e.some((e) => e.isIntersecting) && (r.disconnect(), n());
|
|
68
|
+
}, { threshold: .5 });
|
|
69
|
+
return r.observe(e), () => r.disconnect();
|
|
70
|
+
}, []), A) return null;
|
|
71
|
+
let F = () => {
|
|
72
|
+
h(M, T, "close", N), j(!0), p?.();
|
|
73
|
+
}, I = (d ?? []).slice(0, 2).filter((e) => !!e), L = (e) => I.map((t, n) => {
|
|
74
|
+
let { onClick: r, ...a } = t.buttonProps ?? {};
|
|
75
|
+
return /* @__PURE__ */ b(i, {
|
|
76
|
+
...a,
|
|
77
|
+
variant: "transparent",
|
|
78
|
+
size: e,
|
|
79
|
+
href: t.href,
|
|
80
|
+
iconLeft: t.iconLeft,
|
|
81
|
+
iconRight: t.iconRight,
|
|
82
|
+
onClick: (e) => {
|
|
83
|
+
t.tracking !== !1 && h(M, T, "click", N, {
|
|
84
|
+
...t.tracking,
|
|
85
|
+
defaults: {
|
|
86
|
+
link_text: t.label,
|
|
87
|
+
link_url: t.href
|
|
88
|
+
}
|
|
89
|
+
}), t.onClick?.(e), r?.(e);
|
|
90
|
+
},
|
|
91
|
+
children: t.label
|
|
92
|
+
}, `${t.label}-${n}`);
|
|
93
|
+
}), R = (e) => /* @__PURE__ */ b(i, {
|
|
94
|
+
variant: "plain",
|
|
95
|
+
size: e,
|
|
96
|
+
"aria-label": w,
|
|
97
|
+
onClick: F,
|
|
98
|
+
children: /* @__PURE__ */ b(r, {})
|
|
99
|
+
});
|
|
100
|
+
return /* @__PURE__ */ b("div", {
|
|
101
|
+
ref: k,
|
|
102
|
+
className: n("hsui-product-notice", S.notice, D),
|
|
103
|
+
...O,
|
|
104
|
+
children: /* @__PURE__ */ x(t, {
|
|
105
|
+
border: !0,
|
|
106
|
+
radius: 8,
|
|
107
|
+
padding: 300,
|
|
108
|
+
shadow: 100,
|
|
109
|
+
className: S.surface,
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ x("div", {
|
|
112
|
+
className: S.content,
|
|
113
|
+
children: [/* @__PURE__ */ b("span", {
|
|
114
|
+
className: S.icon,
|
|
115
|
+
"aria-hidden": "true",
|
|
116
|
+
children: s ?? /* @__PURE__ */ b(m, {
|
|
117
|
+
icon: C[N ?? "orbit"],
|
|
118
|
+
size: 24
|
|
119
|
+
})
|
|
120
|
+
}), /* @__PURE__ */ x(a, {
|
|
121
|
+
as: "p",
|
|
122
|
+
size: 200,
|
|
123
|
+
className: S.message,
|
|
124
|
+
style: { "--hsui-typography-color": "var(--product-notice-text)" },
|
|
125
|
+
children: [
|
|
126
|
+
c != null && /* @__PURE__ */ b("strong", {
|
|
127
|
+
className: S.title,
|
|
128
|
+
children: c
|
|
129
|
+
}),
|
|
130
|
+
c != null && (l != null || u != null) && " ",
|
|
131
|
+
u == null ? l : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
|
|
132
|
+
className: S.wideText,
|
|
133
|
+
children: l
|
|
134
|
+
}), /* @__PURE__ */ b("span", {
|
|
135
|
+
className: S.compactText,
|
|
136
|
+
children: u
|
|
137
|
+
})] })
|
|
138
|
+
]
|
|
139
|
+
})]
|
|
140
|
+
}),
|
|
141
|
+
(I.length > 0 || f) && /* @__PURE__ */ x("div", {
|
|
142
|
+
className: n(S.actions, S.wideActions),
|
|
143
|
+
children: [L(100), f && R(100)]
|
|
144
|
+
}),
|
|
145
|
+
f && /* @__PURE__ */ b("div", {
|
|
146
|
+
className: S.compactClose,
|
|
147
|
+
children: R(200)
|
|
148
|
+
}),
|
|
149
|
+
I.length > 0 && /* @__PURE__ */ b("div", {
|
|
150
|
+
className: n(S.actions, S.compactActions),
|
|
151
|
+
children: L(200)
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
})
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
158
|
+
export { w as t };
|
|
@@ -1,2 +1,54 @@
|
|
|
1
|
-
import { t as e } from "
|
|
2
|
-
|
|
1
|
+
import { t as e } from "./icons/multi/index.js";
|
|
2
|
+
import { t } from "./icons/monochrome/index.js";
|
|
3
|
+
import { t as n } from "./icons/grayscale/index.js";
|
|
4
|
+
import { t as r } from "./icons/line/index.js";
|
|
5
|
+
import { t as i } from "../../ProductIconFrame-CGrI3X4C.js";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
//#region lib/components/ProductIcon/index.tsx
|
|
8
|
+
var o = {
|
|
9
|
+
core: "Core",
|
|
10
|
+
stock: "Stock",
|
|
11
|
+
maps: "Maps",
|
|
12
|
+
gantt: "Gantt",
|
|
13
|
+
dashboards: "Dashboards",
|
|
14
|
+
grid: "Grid",
|
|
15
|
+
orbit: "Orbit",
|
|
16
|
+
morningstar: "Morningstar",
|
|
17
|
+
demos: "Demos",
|
|
18
|
+
docs: "Docs",
|
|
19
|
+
API: "Api",
|
|
20
|
+
changelog: "Changelog",
|
|
21
|
+
roadmap: "Roadmap",
|
|
22
|
+
"chart chooser": "ChartChooser",
|
|
23
|
+
hca: "Hca",
|
|
24
|
+
a11y: "Accessibility",
|
|
25
|
+
"edu license": "EduLicense",
|
|
26
|
+
gpt: "Gpt",
|
|
27
|
+
editor: "Editor",
|
|
28
|
+
"export server": "ExportServer",
|
|
29
|
+
python: "Python",
|
|
30
|
+
lab: "Lab",
|
|
31
|
+
support: "Support",
|
|
32
|
+
"custom projects": "CustomProjects",
|
|
33
|
+
"case studies": "CaseStudies",
|
|
34
|
+
license: "License",
|
|
35
|
+
"ADV+": "Advantageplus"
|
|
36
|
+
}, s = {
|
|
37
|
+
multi: e,
|
|
38
|
+
monochrome: t,
|
|
39
|
+
grayscale: n,
|
|
40
|
+
line: r
|
|
41
|
+
};
|
|
42
|
+
function c({ icon: e, theme: t = "multi", size: n = 24, box: r = !1, className: c, style: l, ...u }) {
|
|
43
|
+
let d = o[e], f = s[t][d];
|
|
44
|
+
return f ? /* @__PURE__ */ a(i, {
|
|
45
|
+
icon: f,
|
|
46
|
+
size: n,
|
|
47
|
+
box: r,
|
|
48
|
+
className: c,
|
|
49
|
+
style: l,
|
|
50
|
+
...u
|
|
51
|
+
}) : (console.warn(`ProductIcon: No icon found for "${e}" with theme "${t}"`), null);
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { c as ProductIcon };
|