highsoft-ui 1.0.153 → 1.0.155
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/CLAUDE.md +83 -6
- package/dist/{Button-BGsqFCRW.js → Button-DSGsV45k.js} +1 -1
- package/dist/{ButtonGroup-DKfaXOeS.js → ButtonGroup-DNTpDU-E.js} +1 -1
- package/dist/{Checkbox-CniRhVkQ.js → Checkbox-imALf2_N.js} +1 -1
- package/dist/{CodeBlock-BKiZQpA5.js → CodeBlock-7BTXXf30.js} +4 -4
- package/dist/{CookiePolicyModal-k89sCBEJ.js → CookiePolicyModal-DulwuSp4.js} +2 -2
- package/dist/{CopyCode-_yeXCeeq.js → CopyCode-PbZbRLn-.js} +2 -2
- package/dist/{Dropdown-B_Ib6i1c.js → Dropdown-c_EhnzqC.js} +1 -1
- package/dist/{Footer-ZdzuxuhY.js → Footer-C6a3PeJq.js} +8 -8
- package/dist/{FooterBottom-CqpN8Wky.js → FooterBottom-DADUJdzz.js} +1 -1
- package/dist/{FooterHelp-Cb5sraAE.js → FooterHelp-DN7Mdy40.js} +1 -1
- package/dist/{FooterLinks-HGxMx6Xz.js → FooterLinks-rrtsCIdv.js} +2 -2
- package/dist/{Header-CVKH_INR.js → Header-BokKjfF7.js} +38 -38
- package/dist/{InputGrouped-CHGCMmsK.js → InputGrouped-BJEodhml.js} +11 -11
- package/dist/{Label-CgiWi1v6.js → Label-BhFeSC8Z.js} +1 -1
- package/dist/{NewsletterSignup-DrcPfdrg.js → NewsletterSignup-mPKBEpYq.js} +2 -2
- package/dist/{Notification-B3skQvZE.js → Notification-JovL5anc.js} +3 -3
- package/dist/{PrefPanel-BGw72I_D.js → PrefPanel-DxSIkYDF.js} +8 -8
- package/dist/{ProductIcon-DFLAYWbu.js → ProductIcon-CKtF7AWy.js} +1 -0
- package/dist/{RoadmapDetails-XS0OylnP.js → RoadmapDetails-ZnyXG2j7.js} +6 -6
- package/dist/{Search-UPVxQliM.js → Search-Cc9ZJgGx.js} +13 -13
- package/dist/{SearchDropdown-L_rQz1vn.js → SearchDropdown-B5CFwNib.js} +1 -1
- package/dist/{VideoCover-DqMDvzvA.js → VideoCover-BkbLsmQ_.js} +1 -1
- package/dist/{VideoPlayer-Cq_garSg.js → VideoPlayer-CY63501h.js} +7 -7
- package/dist/{VideoPlayerModal-D1v1O2kW.js → VideoPlayerModal-DIHMoFgS.js} +2 -2
- package/dist/{YoutubeModal-BBYdQil8.js → YoutubeModal-DqBis8Cm.js} +2 -2
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CodeBlock/index.js +1 -1
- package/dist/components/CopyCode/index.js +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Footer/CookiePolicyModal.js +1 -1
- package/dist/components/Footer/FooterBottom.js +1 -1
- package/dist/components/Footer/FooterHelp.js +1 -1
- package/dist/components/Footer/FooterLinks.js +1 -1
- package/dist/components/Footer/YoutubeModal.js +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/Header/index.js +1 -1
- package/dist/components/InputGrouped/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/Modal/ModalContactFooter.js +2 -2
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/NewsletterSignup/index.js +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +1 -1
- package/dist/components/ProductIcon/icons/grayscale/Orbit.js +25 -0
- package/dist/components/ProductIcon/icons/grayscale/index.js +12 -10
- package/dist/components/ProductIcon/icons/line/Orbit.js +25 -0
- package/dist/components/ProductIcon/icons/line/index.js +12 -10
- package/dist/components/ProductIcon/icons/monochrome/Orbit.js +25 -0
- package/dist/components/ProductIcon/icons/monochrome/index.js +12 -10
- package/dist/components/ProductIcon/icons/multi/Orbit.js +25 -0
- package/dist/components/ProductIcon/icons/multi/index.js +12 -10
- package/dist/components/ProductIcon/index.js +1 -1
- package/dist/components/RoadmapDetails/index.js +1 -1
- package/dist/components/Search/index.js +1 -1
- package/dist/components/SearchDropdown/index.js +1 -1
- package/dist/components/Sidebar/NavDisclosure.js +26 -31
- package/dist/components/Sidebar/NavGroup.js +69 -56
- package/dist/components/Sidebar/NavItem.js +23 -16
- package/dist/components/Sidebar/Sidebar.js +115 -82
- package/dist/components/Sidebar/SidebarLayout.js +109 -69
- package/dist/components/Sidebar/SidebarResizer.js +1 -1
- package/dist/components/Sidebar/navPath.js +12 -0
- package/dist/components/VideoCover/index.js +1 -1
- package/dist/components/VideoPlayer/VideoPlayerModal.js +1 -1
- package/dist/components/VideoPlayer/index.js +1 -1
- package/dist/{create-element-CDnUGrhg.js → create-element-C3ORyDVw.js} +1 -1
- package/dist/{esm-BnxclXHW.js → esm-C4Ybr9s4.js} +85 -43
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/ProductIcon/icons/grayscale/Orbit.d.ts +2 -0
- package/dist/lib/components/ProductIcon/icons/grayscale/index.d.ts +1 -0
- package/dist/lib/components/ProductIcon/icons/line/Orbit.d.ts +2 -0
- package/dist/lib/components/ProductIcon/icons/line/index.d.ts +1 -0
- package/dist/lib/components/ProductIcon/icons/monochrome/Orbit.d.ts +2 -0
- package/dist/lib/components/ProductIcon/icons/monochrome/index.d.ts +1 -0
- package/dist/lib/components/ProductIcon/icons/multi/Orbit.d.ts +2 -0
- package/dist/lib/components/ProductIcon/icons/multi/index.d.ts +1 -0
- package/dist/lib/components/ProductIcon/index.d.ts +2 -2
- package/dist/lib/components/Sidebar/Sidebar.d.ts +10 -5
- package/dist/lib/components/Sidebar/SidebarLayout.d.ts +37 -5
- package/dist/lib/components/Sidebar/context.d.ts +30 -2
- package/dist/lib/components/Sidebar/navPath.d.ts +17 -0
- package/dist/main.js +19 -19
- package/dist/{prism-light-COlcVrfu.js → prism-light-BLaY8zo6.js} +1 -1
- package/dist/{styles.module-Bd4HbnpA.js → styles.module-DGKft2EO.js} +12 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../ProductIcon-
|
|
1
|
+
import { t as e } from "../../ProductIcon-CKtF7AWy.js";
|
|
2
2
|
export { e as ProductIcon };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../RoadmapDetails-
|
|
1
|
+
import { t as e } from "../../RoadmapDetails-ZnyXG2j7.js";
|
|
2
2
|
export { e as RoadmapDetails };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../Search-
|
|
1
|
+
import { t as e } from "../../Search-Cc9ZJgGx.js";
|
|
2
2
|
export { e as Search };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../SearchDropdown-
|
|
1
|
+
import { t as e } from "../../SearchDropdown-B5CFwNib.js";
|
|
2
2
|
export { e as SearchDropdown };
|
|
@@ -1,39 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import { t } from "../../
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { K as t } from "../../esm-C4Ybr9s4.js";
|
|
4
|
+
import { t as n } from "../../Icon-VeXJMj8Q.js";
|
|
5
|
+
import { t as r } from "../../styles.module-DGKft2EO.js";
|
|
6
|
+
import { useId as i, useState as a } from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
8
|
//#region lib/components/Sidebar/NavDisclosure.tsx
|
|
7
|
-
function
|
|
8
|
-
let [
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
className: e(
|
|
11
|
-
"data-open":
|
|
12
|
-
children: [/* @__PURE__ */
|
|
9
|
+
function c({ label: c, children: l, className: u }) {
|
|
10
|
+
let [d, f] = a(!1), p = i();
|
|
11
|
+
return /* @__PURE__ */ s("div", {
|
|
12
|
+
className: e(r.disclosure, u),
|
|
13
|
+
"data-open": d,
|
|
14
|
+
children: [/* @__PURE__ */ s("button", {
|
|
13
15
|
type: "button",
|
|
14
|
-
className:
|
|
15
|
-
"aria-expanded":
|
|
16
|
-
"aria-controls":
|
|
17
|
-
onClick: () =>
|
|
18
|
-
children: [/* @__PURE__ */
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"aria-hidden": "true",
|
|
29
|
-
children: /* @__PURE__ */ i("path", { d: "m9 18 6-6-6-6" })
|
|
30
|
-
}), /* @__PURE__ */ i("span", { children: o })]
|
|
31
|
-
}), /* @__PURE__ */ i("div", {
|
|
32
|
-
id: d,
|
|
33
|
-
className: t.disclosureBody,
|
|
34
|
-
children: s
|
|
16
|
+
className: r.disclosureToggle,
|
|
17
|
+
"aria-expanded": d,
|
|
18
|
+
"aria-controls": p,
|
|
19
|
+
onClick: () => f((e) => !e),
|
|
20
|
+
children: [/* @__PURE__ */ o(n, {
|
|
21
|
+
name: t,
|
|
22
|
+
size: 16,
|
|
23
|
+
className: r.disclosureChevron,
|
|
24
|
+
"aria-hidden": "true"
|
|
25
|
+
}), /* @__PURE__ */ o("span", { children: c })]
|
|
26
|
+
}), /* @__PURE__ */ o("div", {
|
|
27
|
+
id: p,
|
|
28
|
+
className: r.disclosureBody,
|
|
29
|
+
children: l
|
|
35
30
|
})]
|
|
36
31
|
});
|
|
37
32
|
}
|
|
38
33
|
//#endregion
|
|
39
|
-
export {
|
|
34
|
+
export { c as NavDisclosure };
|
|
@@ -1,74 +1,87 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as n } from "../../
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { K as t } from "../../esm-C4Ybr9s4.js";
|
|
4
|
+
import { t as n } from "../../Icon-VeXJMj8Q.js";
|
|
5
|
+
import { useOptionalSidebarSection as r } from "./context.js";
|
|
6
|
+
import { t as i } from "../../styles.module-DGKft2EO.js";
|
|
7
|
+
import { NavPathContext as a, textOf as o, useNavPath as s } from "./navPath.js";
|
|
8
|
+
import { useCallback as c, useEffect as l, useId as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
9
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
7
10
|
//#region lib/components/Sidebar/NavGroup.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let [
|
|
11
|
-
|
|
12
|
-
}, [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
var g = "grid-template-rows";
|
|
12
|
+
function _({ label: _, children: v, icon: y, defaultOpen: b = !1, open: x, onOpenChange: S, active: C, className: w }) {
|
|
13
|
+
let [T, E] = p(b), D = x !== void 0, O = D ? x : T, k = u(), A = u(), j = r(), M = s(), N = M.length, P = o(_), F = d(() => [...M, P], [M, P]), I = c((e) => {
|
|
14
|
+
D || E(e), S?.(e);
|
|
15
|
+
}, [D, S]), L = c(() => I(!O), [O, I]);
|
|
16
|
+
l(() => (j?.reportOpen(A, O), () => j?.reportOpen(A, !1)), [
|
|
17
|
+
O,
|
|
18
|
+
A,
|
|
19
|
+
j
|
|
17
20
|
]);
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
e
|
|
21
|
+
let [R, z] = p(!1), B = f(null), V = f(O);
|
|
22
|
+
V.current !== O && (V.current = O, z(O)), l(() => {
|
|
23
|
+
if (!R) return;
|
|
24
|
+
let e = B.current;
|
|
25
|
+
if (!e) return;
|
|
26
|
+
if (!parseFloat(getComputedStyle(e).transitionDuration)) {
|
|
27
|
+
z(!1);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
let t = (t) => {
|
|
31
|
+
t.target === e && t.propertyName === g && z(!1);
|
|
32
|
+
};
|
|
33
|
+
return e.addEventListener("transitionend", t), e.addEventListener("transitioncancel", t), () => {
|
|
34
|
+
e.removeEventListener("transitionend", t), e.removeEventListener("transitioncancel", t);
|
|
35
|
+
};
|
|
36
|
+
}, [R]);
|
|
37
|
+
let H = f(j?.collapseNonce ?? 0);
|
|
38
|
+
return l(() => {
|
|
39
|
+
let e = j?.collapseNonce ?? 0;
|
|
40
|
+
e !== H.current && (H.current = e, O && I(!1));
|
|
22
41
|
}, [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
]), /* @__PURE__ */
|
|
28
|
-
className: e(
|
|
29
|
-
style: { "--hs-nav-depth":
|
|
30
|
-
children: [/* @__PURE__ */
|
|
42
|
+
j?.collapseNonce,
|
|
43
|
+
O,
|
|
44
|
+
j,
|
|
45
|
+
I
|
|
46
|
+
]), /* @__PURE__ */ h("div", {
|
|
47
|
+
className: e(i.group, O && i.groupOpen, R && i.groupExpanding, C && i.groupActive, w),
|
|
48
|
+
style: { "--hs-nav-depth": N },
|
|
49
|
+
children: [/* @__PURE__ */ h("button", {
|
|
31
50
|
type: "button",
|
|
32
|
-
className:
|
|
33
|
-
"aria-expanded":
|
|
34
|
-
"aria-controls":
|
|
35
|
-
onClick:
|
|
51
|
+
className: i.groupToggle,
|
|
52
|
+
"aria-expanded": O,
|
|
53
|
+
"aria-controls": k,
|
|
54
|
+
onClick: L,
|
|
36
55
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
fill: "none",
|
|
43
|
-
stroke: "currentColor",
|
|
44
|
-
strokeWidth: "2.5",
|
|
45
|
-
strokeLinecap: "round",
|
|
46
|
-
strokeLinejoin: "round",
|
|
47
|
-
"aria-hidden": "true",
|
|
48
|
-
children: /* @__PURE__ */ u("path", { d: "m9 18 6-6-6-6" })
|
|
56
|
+
/* @__PURE__ */ m(n, {
|
|
57
|
+
name: t,
|
|
58
|
+
size: 16,
|
|
59
|
+
className: i.groupChevron,
|
|
60
|
+
"aria-hidden": "true"
|
|
49
61
|
}),
|
|
50
|
-
|
|
51
|
-
className:
|
|
52
|
-
children:
|
|
62
|
+
y == null ? null : /* @__PURE__ */ m("span", {
|
|
63
|
+
className: i.itemIcon,
|
|
64
|
+
children: y
|
|
53
65
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
className:
|
|
56
|
-
children:
|
|
66
|
+
/* @__PURE__ */ m("span", {
|
|
67
|
+
className: i.groupLabel,
|
|
68
|
+
children: _
|
|
57
69
|
})
|
|
58
70
|
]
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
}), /* @__PURE__ */ m("div", {
|
|
72
|
+
ref: B,
|
|
73
|
+
id: k,
|
|
74
|
+
className: i.groupChildren,
|
|
62
75
|
role: "group",
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
-
className:
|
|
65
|
-
children: /* @__PURE__ */
|
|
66
|
-
value:
|
|
67
|
-
children:
|
|
76
|
+
children: /* @__PURE__ */ m("div", {
|
|
77
|
+
className: i.groupChildrenInner,
|
|
78
|
+
children: /* @__PURE__ */ m(a.Provider, {
|
|
79
|
+
value: F,
|
|
80
|
+
children: v
|
|
68
81
|
})
|
|
69
82
|
})
|
|
70
83
|
})]
|
|
71
84
|
});
|
|
72
85
|
}
|
|
73
86
|
//#endregion
|
|
74
|
-
export {
|
|
87
|
+
export { _ as NavGroup };
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
3
|
import { useOptionalSidebarLayout as t } from "./context.js";
|
|
4
|
-
import { t as n } from "../../styles.module-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { t as n } from "../../styles.module-DGKft2EO.js";
|
|
5
|
+
import { textOf as r, useNavPath as i } from "./navPath.js";
|
|
6
|
+
import { forwardRef as a, useEffect as o, useId as s } from "react";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
8
|
//#region lib/components/Sidebar/NavItem.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
var u = 350, d = a(function({ as: a, active: d, icon: f, children: p, className: m, onClick: h, ...g }, _) {
|
|
10
|
+
let v = a || "a", y = t(), b = s(), x = i(), S = r(p), C = d && S ? [...x.filter(Boolean), S].slice(-2).join(" / ") : null, w = y?.reportActivePage;
|
|
11
|
+
return o(() => {
|
|
12
|
+
if (w) return w(b, C), () => w(b, null);
|
|
13
|
+
}, [
|
|
14
|
+
w,
|
|
15
|
+
b,
|
|
16
|
+
C
|
|
17
|
+
]), /* @__PURE__ */ l(v, {
|
|
18
|
+
ref: _,
|
|
19
|
+
className: e(n.item, d && n.itemActive, m),
|
|
20
|
+
"aria-current": d ? "page" : void 0,
|
|
14
21
|
onClick: (e) => {
|
|
15
|
-
|
|
22
|
+
h?.(e), y && (window.matchMedia("(pointer: coarse)").matches && y.isMobile && y.mobileOpen ? window.setTimeout(() => y.closeMobile(), u) : y.closeMobile());
|
|
16
23
|
},
|
|
17
|
-
...
|
|
18
|
-
children: [
|
|
24
|
+
...g,
|
|
25
|
+
children: [f == null ? null : /* @__PURE__ */ c("span", {
|
|
19
26
|
className: n.itemIcon,
|
|
20
|
-
children:
|
|
21
|
-
}), /* @__PURE__ */
|
|
27
|
+
children: f
|
|
28
|
+
}), /* @__PURE__ */ c("span", {
|
|
22
29
|
className: n.itemLabel,
|
|
23
|
-
children:
|
|
30
|
+
children: p
|
|
24
31
|
})]
|
|
25
32
|
});
|
|
26
33
|
});
|
|
27
34
|
//#endregion
|
|
28
|
-
export {
|
|
35
|
+
export { d as NavItem };
|
|
@@ -1,107 +1,140 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import { t } from "../../
|
|
4
|
-
import {
|
|
5
|
-
import { t as i } from "../../
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { E as t, t as n } from "../../esm-C4Ybr9s4.js";
|
|
4
|
+
import { t as r } from "../../Button-DSGsV45k.js";
|
|
5
|
+
import { t as i } from "../../Icon-VeXJMj8Q.js";
|
|
6
|
+
import { t as a } from "../../Typography-AvvBRu-u.js";
|
|
7
|
+
import { SidebarSectionContext as o, useSidebarLayout as s } from "./context.js";
|
|
8
|
+
import { t as c } from "../../styles.module-DGKft2EO.js";
|
|
9
|
+
import { SidebarResizer as l } from "./SidebarResizer.js";
|
|
10
|
+
import { useCallback as u, useEffect as d, useRef as f, useState as p } from "react";
|
|
11
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
12
|
//#region lib/components/Sidebar/Sidebar.tsx
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
var g = 72, _ = 56, v = .84, y = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
14
|
+
function b({ children: t, "aria-label": a = "Sidebar navigation", closeLabel: o = "Close navigation", className: p }) {
|
|
15
|
+
let { resizable: b, isMobile: x, mobileOpen: S, closeMobile: C, openFocus: w } = s(), T = f(null), E = x && S;
|
|
16
|
+
d(() => {
|
|
17
|
+
let e = T.current;
|
|
18
|
+
!S || !e || ((w === "search" ? e.querySelector(`.${c.header} input:not([type='hidden']):not([disabled])`) : null) ?? e).focus();
|
|
19
|
+
}, [S, w]), d(() => {
|
|
20
|
+
let e = window.visualViewport, t = T.current;
|
|
21
|
+
if (!E || !e || !t) return;
|
|
22
|
+
let n = () => {
|
|
23
|
+
let n = document.documentElement.clientHeight, r = Math.max(0, Math.round(n - e.offsetTop - e.height)), i = Math.max(0, Math.round(Math.min(e.height - _, n * v)));
|
|
24
|
+
t.style.setProperty("--hs-sheet-lift", `${r}px`), t.style.setProperty("--hs-sheet-max-h", `${i}px`);
|
|
25
|
+
};
|
|
26
|
+
return n(), e.addEventListener("resize", n), e.addEventListener("scroll", n), () => {
|
|
27
|
+
e.removeEventListener("resize", n), e.removeEventListener("scroll", n), t.style.removeProperty("--hs-sheet-lift"), t.style.removeProperty("--hs-sheet-max-h");
|
|
28
|
+
};
|
|
29
|
+
}, [E]), d(() => {
|
|
30
|
+
if (!E) return;
|
|
31
|
+
let e = (e) => {
|
|
32
|
+
let t = T.current;
|
|
33
|
+
if (e.key !== "Tab" || !t) return;
|
|
34
|
+
let n = Array.from(t.querySelectorAll(y)).filter((e) => e.offsetParent !== null || e === document.activeElement);
|
|
35
|
+
if (!n.length) return;
|
|
36
|
+
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
37
|
+
a === t ? e.shiftKey && (e.preventDefault(), i.focus()) : t.contains(a) ? a === (e.shiftKey ? r : i) && (e.preventDefault(), (e.shiftKey ? i : r).focus()) : (e.preventDefault(), r.focus());
|
|
38
|
+
};
|
|
39
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
40
|
+
}, [E]);
|
|
41
|
+
let D = f(!1), O = f(0), k = f(0), A = u((e) => {
|
|
42
|
+
D.current = !1;
|
|
43
|
+
let t = T.current;
|
|
44
|
+
t?.classList.remove(c.sheetDragging), t?.style.removeProperty("--hs-sheet-dy"), e && C();
|
|
45
|
+
}, [C]), j = (e) => {
|
|
46
|
+
E && (e.currentTarget.setPointerCapture(e.pointerId), D.current = !0, O.current = e.clientY, k.current = 0, T.current?.classList.add(c.sheetDragging));
|
|
47
|
+
}, M = (e) => {
|
|
48
|
+
D.current && (k.current = Math.max(0, e.clientY - O.current), T.current?.style.setProperty("--hs-sheet-dy", `${k.current}px`));
|
|
49
|
+
}, N = (e) => {
|
|
50
|
+
D.current && (e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), A(k.current > g));
|
|
51
|
+
};
|
|
52
|
+
return d(() => {
|
|
53
|
+
!S && D.current && A(!1);
|
|
54
|
+
}, [S, A]), /* @__PURE__ */ h("aside", {
|
|
55
|
+
ref: T,
|
|
15
56
|
id: "hs-sidebar-drawer",
|
|
16
|
-
className: e(
|
|
17
|
-
"aria-label":
|
|
57
|
+
className: e(c.sidebar, S && c.sidebarOpen, p),
|
|
58
|
+
"aria-label": a,
|
|
59
|
+
role: E ? "dialog" : void 0,
|
|
60
|
+
"aria-modal": E ? !0 : void 0,
|
|
61
|
+
tabIndex: -1,
|
|
62
|
+
inert: x && !S ? !0 : void 0,
|
|
18
63
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
64
|
+
/* @__PURE__ */ m("div", {
|
|
65
|
+
className: c.grabber,
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
onPointerDown: j,
|
|
68
|
+
onPointerMove: M,
|
|
69
|
+
onPointerUp: N,
|
|
70
|
+
onPointerCancel: N,
|
|
71
|
+
children: /* @__PURE__ */ m("span", { className: c.grabberPill })
|
|
26
72
|
}),
|
|
73
|
+
x ? /* @__PURE__ */ m("span", {
|
|
74
|
+
className: c.close,
|
|
75
|
+
children: /* @__PURE__ */ m(r, {
|
|
76
|
+
variant: "plain",
|
|
77
|
+
size: 300,
|
|
78
|
+
"aria-label": o,
|
|
79
|
+
onClick: C,
|
|
80
|
+
children: /* @__PURE__ */ m(i, {
|
|
81
|
+
name: n,
|
|
82
|
+
size: 16
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
}) : null,
|
|
27
86
|
t,
|
|
28
|
-
|
|
87
|
+
b ? /* @__PURE__ */ m(l, {}) : null
|
|
29
88
|
]
|
|
30
89
|
});
|
|
31
90
|
}
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
className: e(
|
|
91
|
+
function x({ children: t, className: n }) {
|
|
92
|
+
return /* @__PURE__ */ m("div", {
|
|
93
|
+
className: e(c.header, n),
|
|
35
94
|
children: t
|
|
36
95
|
});
|
|
37
96
|
}
|
|
38
|
-
function
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
className: e(
|
|
97
|
+
function S({ children: t, className: n }) {
|
|
98
|
+
return /* @__PURE__ */ m("div", {
|
|
99
|
+
className: e(c.body, n),
|
|
41
100
|
children: t
|
|
42
101
|
});
|
|
43
102
|
}
|
|
44
|
-
function
|
|
45
|
-
let [
|
|
46
|
-
let n =
|
|
47
|
-
t ? n.add(e) : n.delete(e),
|
|
48
|
-
}, []),
|
|
49
|
-
return /* @__PURE__ */
|
|
103
|
+
function C({ children: n, label: s, collapsible: l = !1, minimizeLabel: d = "Minimize", action: g, className: _ }) {
|
|
104
|
+
let [v, y] = p(0), b = f(/* @__PURE__ */ new Set()), [x, S] = p(0), C = u((e, t) => {
|
|
105
|
+
let n = b.current;
|
|
106
|
+
t ? n.add(e) : n.delete(e), S(n.size);
|
|
107
|
+
}, []), w = l && g == null && x > 0, T = s != null || g != null || w;
|
|
108
|
+
return /* @__PURE__ */ m(o.Provider, {
|
|
50
109
|
value: {
|
|
51
|
-
collapseNonce:
|
|
52
|
-
reportOpen:
|
|
110
|
+
collapseNonce: v,
|
|
111
|
+
reportOpen: C
|
|
53
112
|
},
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
className: e(
|
|
56
|
-
children: [
|
|
57
|
-
className:
|
|
58
|
-
children: [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
113
|
+
children: /* @__PURE__ */ h("section", {
|
|
114
|
+
className: e(c.section, T && c.hasStickyHead, _),
|
|
115
|
+
children: [T ? /* @__PURE__ */ h("div", {
|
|
116
|
+
className: c.sectionHead,
|
|
117
|
+
children: [s == null ? null : /* @__PURE__ */ m(a, {
|
|
118
|
+
as: "h3",
|
|
119
|
+
size: 75,
|
|
120
|
+
weight: "semi",
|
|
121
|
+
color: "secondary",
|
|
122
|
+
className: c.sectionLabel,
|
|
123
|
+
children: s
|
|
124
|
+
}), g ?? (w ? /* @__PURE__ */ m(r, {
|
|
62
125
|
variant: "plain",
|
|
63
126
|
size: 100,
|
|
64
|
-
className:
|
|
65
|
-
iconLeft: /* @__PURE__ */
|
|
66
|
-
|
|
67
|
-
|
|
127
|
+
className: c.minimizeBtn,
|
|
128
|
+
iconLeft: /* @__PURE__ */ m(i, {
|
|
129
|
+
name: t,
|
|
130
|
+
size: 12
|
|
131
|
+
}),
|
|
132
|
+
onClick: () => y((e) => e + 1),
|
|
133
|
+
children: d
|
|
68
134
|
}) : null)]
|
|
69
|
-
}) : null,
|
|
135
|
+
}) : null, n]
|
|
70
136
|
})
|
|
71
137
|
});
|
|
72
138
|
}
|
|
73
|
-
function g() {
|
|
74
|
-
return /* @__PURE__ */ d("svg", {
|
|
75
|
-
width: "14",
|
|
76
|
-
height: "14",
|
|
77
|
-
viewBox: "0 0 16 16",
|
|
78
|
-
fill: "none",
|
|
79
|
-
stroke: "currentColor",
|
|
80
|
-
strokeWidth: "1.25",
|
|
81
|
-
strokeLinecap: "round",
|
|
82
|
-
strokeLinejoin: "round",
|
|
83
|
-
"aria-hidden": "true",
|
|
84
|
-
children: [/* @__PURE__ */ u("rect", {
|
|
85
|
-
x: "2.5",
|
|
86
|
-
y: "2.5",
|
|
87
|
-
width: "11",
|
|
88
|
-
height: "11",
|
|
89
|
-
rx: "2"
|
|
90
|
-
}), /* @__PURE__ */ u("path", { d: "M5.5 8h5" })]
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
function _() {
|
|
94
|
-
return /* @__PURE__ */ u("svg", {
|
|
95
|
-
width: "18",
|
|
96
|
-
height: "18",
|
|
97
|
-
viewBox: "0 0 24 24",
|
|
98
|
-
fill: "none",
|
|
99
|
-
stroke: "currentColor",
|
|
100
|
-
strokeWidth: "2",
|
|
101
|
-
strokeLinecap: "round",
|
|
102
|
-
"aria-hidden": "true",
|
|
103
|
-
children: /* @__PURE__ */ u("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
139
|
//#endregion
|
|
107
|
-
export {
|
|
140
|
+
export { b as Sidebar, S as SidebarBody, x as SidebarHeader, C as SidebarSection };
|