@cascivo/react 0.6.3 → 0.7.1
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/README.md +14 -5
- package/dist/breadcrumb/breadcrumb.js +15 -15
- package/dist/card/card.css +1 -1
- package/dist/card/card.module.js +5 -5
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.module.js +29 -29
- package/dist/dock/dock.js +21 -21
- package/dist/header/header.js +20 -20
- package/dist/index.d.ts +26 -1
- package/dist/layouts/src/columns/columns.css +1 -1
- package/dist/layouts/src/columns/columns.js +7 -3
- package/dist/layouts/src/columns/columns.module.js +4 -1
- package/dist/layouts/src/grid/grid.css +1 -1
- package/dist/layouts/src/grid/grid.js +6 -3
- package/dist/layouts/src/grid/grid.module.js +3 -2
- package/dist/navigation-menu/navigation-menu.js +54 -50
- package/dist/relative-time/relative-time.js +2 -1
- package/dist/search/search.css +1 -1
- package/dist/search/search.module.js +5 -5
- package/dist/shell-header/shell-header.js +63 -63
- package/dist/side-nav/side-nav.js +127 -120
- package/dist/styles.css +6 -6
- package/dist/switcher/switcher.js +13 -11
- package/dist/toast/toast.css +1 -1
- package/dist/toast/toast.module.js +7 -7
- package/dist/toc/use-toc-from-region.js +8 -7
- package/package.json +3 -3
- package/readme.body.md +13 -4
|
@@ -1,88 +1,92 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./navigation-menu.module.js";
|
|
4
|
-
import { DismissableLayer as t, Presence as n, cn as r,
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { useId as
|
|
4
|
+
import { DismissableLayer as t, Presence as n, cn as r, getLinkComponent as i, useAnchorPosition as a, useRovingFocus as o, useSignal as s, useSignals as c } from "@cascivo/core";
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
+
import { useId as d, useRef as f } from "react";
|
|
7
7
|
//#region ../components/src/navigation-menu/navigation-menu.tsx
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
let
|
|
8
|
+
function p({ items: t, "aria-label": n, orientation: i = "horizontal", className: a }) {
|
|
9
|
+
c();
|
|
10
|
+
let u = d(), f = s(null), p = o({
|
|
11
11
|
orientation: i,
|
|
12
12
|
loop: !0
|
|
13
13
|
});
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ l("nav", {
|
|
15
15
|
"aria-label": n,
|
|
16
|
-
className: r(e.nav,
|
|
16
|
+
className: r(e.nav, a),
|
|
17
17
|
"data-orientation": i,
|
|
18
|
-
children: /* @__PURE__ */
|
|
18
|
+
children: /* @__PURE__ */ l("ul", {
|
|
19
19
|
role: "list",
|
|
20
20
|
className: e.list,
|
|
21
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
21
|
+
children: t.map((e, t) => /* @__PURE__ */ l(m, {
|
|
22
22
|
item: e,
|
|
23
|
-
baseId:
|
|
23
|
+
baseId: u,
|
|
24
24
|
openId: f,
|
|
25
|
-
itemProps:
|
|
25
|
+
itemProps: p.getItemProps(t)
|
|
26
26
|
}, e.id))
|
|
27
27
|
})
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
anchorRef:
|
|
34
|
-
floatingRef:
|
|
30
|
+
function m({ item: t, baseId: r, openId: o, itemProps: s }) {
|
|
31
|
+
c();
|
|
32
|
+
let d = f(null), p = f(null), m = t.content != null, g = o.value === t.id, _ = `${r}-panel-${t.id}`, { anchorStyle: v, floatingStyle: y } = a({
|
|
33
|
+
anchorRef: d,
|
|
34
|
+
floatingRef: p,
|
|
35
35
|
placement: "bottom-start",
|
|
36
|
-
enabled:
|
|
37
|
-
}), { ref:
|
|
38
|
-
|
|
36
|
+
enabled: g
|
|
37
|
+
}), { ref: b, onKeyDown: x, ...S } = s;
|
|
38
|
+
if (!m) {
|
|
39
|
+
let n = i();
|
|
40
|
+
return /* @__PURE__ */ l("li", {
|
|
41
|
+
className: e.item,
|
|
42
|
+
children: /* @__PURE__ */ l(n, {
|
|
43
|
+
ref: (e) => b(e),
|
|
44
|
+
href: t.href,
|
|
45
|
+
className: e.link,
|
|
46
|
+
onKeyDown: x,
|
|
47
|
+
...S,
|
|
48
|
+
children: t.label
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return /* @__PURE__ */ u("li", {
|
|
39
53
|
className: e.item,
|
|
40
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ l("button", {
|
|
41
55
|
ref: (e) => {
|
|
42
|
-
|
|
56
|
+
d.current = e, b(e);
|
|
43
57
|
},
|
|
44
58
|
type: "button",
|
|
45
|
-
"aria-expanded":
|
|
46
|
-
"aria-controls":
|
|
47
|
-
"data-state":
|
|
59
|
+
"aria-expanded": g,
|
|
60
|
+
"aria-controls": _,
|
|
61
|
+
"data-state": g ? "open" : "closed",
|
|
48
62
|
className: e.trigger,
|
|
49
|
-
style:
|
|
63
|
+
style: v,
|
|
50
64
|
onClick: () => {
|
|
51
|
-
|
|
65
|
+
o.value = g ? null : t.id;
|
|
52
66
|
},
|
|
53
67
|
onKeyDown: (e) => {
|
|
54
|
-
|
|
68
|
+
x(e), !e.defaultPrevented && e.key === "Escape" && (o.value = null);
|
|
55
69
|
},
|
|
56
|
-
...
|
|
70
|
+
...S,
|
|
57
71
|
children: t.label
|
|
58
|
-
}), /* @__PURE__ */
|
|
59
|
-
present:
|
|
60
|
-
children: /* @__PURE__ */
|
|
61
|
-
panelId:
|
|
62
|
-
floatingRef:
|
|
63
|
-
floatingStyle:
|
|
72
|
+
}), /* @__PURE__ */ l(n, {
|
|
73
|
+
present: g,
|
|
74
|
+
children: /* @__PURE__ */ l(h, {
|
|
75
|
+
panelId: _,
|
|
76
|
+
floatingRef: p,
|
|
77
|
+
floatingStyle: y,
|
|
64
78
|
onClose: () => {
|
|
65
|
-
|
|
79
|
+
o.value = null, d.current?.focus();
|
|
66
80
|
},
|
|
67
81
|
children: t.content
|
|
68
82
|
})
|
|
69
83
|
})]
|
|
70
|
-
}) : /* @__PURE__ */ c("li", {
|
|
71
|
-
className: e.item,
|
|
72
|
-
children: /* @__PURE__ */ c("a", {
|
|
73
|
-
ref: (e) => y(e),
|
|
74
|
-
href: t.href,
|
|
75
|
-
className: e.link,
|
|
76
|
-
onKeyDown: b,
|
|
77
|
-
...x,
|
|
78
|
-
children: t.label
|
|
79
|
-
})
|
|
80
84
|
});
|
|
81
85
|
}
|
|
82
|
-
function
|
|
83
|
-
return /* @__PURE__ */
|
|
86
|
+
function h({ panelId: n, floatingRef: r, floatingStyle: i, onClose: a, children: o }) {
|
|
87
|
+
return /* @__PURE__ */ l(t, {
|
|
84
88
|
onDismiss: a,
|
|
85
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ l("div", {
|
|
86
90
|
ref: r,
|
|
87
91
|
id: n,
|
|
88
92
|
className: e.panel,
|
|
@@ -92,4 +96,4 @@ function m({ panelId: n, floatingRef: r, floatingStyle: i, onClose: a, children:
|
|
|
92
96
|
});
|
|
93
97
|
}
|
|
94
98
|
//#endregion
|
|
95
|
-
export {
|
|
99
|
+
export { p as NavigationMenu };
|
|
@@ -43,7 +43,7 @@ function _({ date: c, sync: l = !0, now: u, format: d, className: f, ...p }) {
|
|
|
43
43
|
i();
|
|
44
44
|
let m = g(c), _ = u !== void 0, v = n(u ?? Date.now());
|
|
45
45
|
_ && (v.value = u), r(() => {
|
|
46
|
-
if (
|
|
46
|
+
if (_ || typeof window > "u" || (v.value = Date.now(), !l)) return;
|
|
47
47
|
let { nextUpdateMs: e } = h(m - v.value), t = window.setInterval(() => {
|
|
48
48
|
v.value = Date.now();
|
|
49
49
|
}, e);
|
|
@@ -57,6 +57,7 @@ function _({ date: c, sync: l = !0, now: u, format: d, className: f, ...p }) {
|
|
|
57
57
|
timeStyle: "short"
|
|
58
58
|
}),
|
|
59
59
|
className: t(e.relativeTime, f),
|
|
60
|
+
suppressHydrationWarning: !0,
|
|
60
61
|
...p,
|
|
61
62
|
children: x
|
|
62
63
|
});
|
package/dist/search/search.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._root_1m8s8_2{inline-size:var(--cascivo-search-width,100%);align-items:center;display:inline-flex;position:relative}._root_1m8s8_2[data-size=sm]{--_search-height:2rem;--_search-font:var(--cascivo-text-sm);--_search-px:var(--cascivo-space-3)}._root_1m8s8_2[data-size=md]{--_search-height:2.5rem;--_search-font:var(--cascivo-text-sm);--_search-px:var(--cascivo-space-4)}._root_1m8s8_2[data-size=lg]{--_search-height:3rem;--_search-font:var(--cascivo-text-base);--_search-px:var(--cascivo-space-4)}._label_1m8s8_31{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._icon_1m8s8_44{color:var(--cascivo-color-text-muted);pointer-events:none;align-items:center;display:inline-flex;position:absolute;inset-inline-start:var(--_search-px,var(--cascivo-space-4))}._input_1m8s8_53{inline-size:100%;block-size:var(--_search-height,2.5rem);font-family:var(--cascivo-font-sans);font-size:var(--_search-font,var(--cascivo-text-sm));color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);outline:none;padding-inline-start:calc(var(--_search-px,var(--cascivo-space-4)) + 1rem + var(--cascivo-space-2));padding-inline-end:calc(var(--_search-px,var(--cascivo-space-4)) + 1.5rem)}._input_1m8s8_53::-webkit-search-cancel-button{appearance:none;display:none}._input_1m8s8_53::-webkit-search-decoration{appearance:none;display:none}._input_1m8s8_53::placeholder{color:var(--cascivo-color-text-muted)}._input_1m8s8_53:hover:not(:disabled):not(:focus){border-color:var(--cascivo-color-border-strong)}._input_1m8s8_53:focus{border-color:var(--cascivo-color-accent);box-shadow:var(--cascivo-focus-ring)}._input_1m8s8_53:disabled{opacity:.5;cursor:not-allowed;background-color:var(--cascivo-color-bg-subtle)}._clear_1m8s8_99{block-size:1.5rem;inline-size:1.5rem;font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-none);color:var(--cascivo-color-text-muted);border-radius:var(--cascivo-radius-control);cursor:pointer;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out), color var(--cascivo-duration-150) var(--cascivo-ease-out);background-color:#0000;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;inset-inline-end:var(--cascivo-space-2)}._clear_1m8s8_99:hover:not(:disabled){color:var(--cascivo-color-text);background-color:var(--cascivo-color-bg-subtle)}._clear_1m8s8_99:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._clear_1m8s8_99:disabled{cursor:not-allowed}}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import './search.css';
|
|
4
4
|
var e = {
|
|
5
|
-
root: "
|
|
6
|
-
label: "
|
|
7
|
-
icon: "
|
|
8
|
-
input: "
|
|
9
|
-
clear: "
|
|
5
|
+
root: "_root_1m8s8_2",
|
|
6
|
+
label: "_label_1m8s8_31",
|
|
7
|
+
icon: "_icon_1m8s8_44",
|
|
8
|
+
input: "_input_1m8s8_53",
|
|
9
|
+
clear: "_clear_1m8s8_99"
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
12
|
export { e as default };
|
|
@@ -2,51 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
import { usePopover as e } from "../popover/use-popover.js";
|
|
4
4
|
import t from "./shell-header.module.js";
|
|
5
|
-
import { cn as n,
|
|
6
|
-
import { builtin as
|
|
7
|
-
import { jsx as
|
|
5
|
+
import { cn as n, getLinkComponent as r, useSignal as i, useSignalEffect as a, useSignals as o } from "@cascivo/core";
|
|
6
|
+
import { builtin as s, t as c } from "@cascivo/i18n";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/shell-header/shell-header.tsx
|
|
9
|
-
function
|
|
9
|
+
function d(e) {
|
|
10
10
|
return typeof e == "object" && !!e && "name" in e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function f(e) {
|
|
13
13
|
return "items" in e;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
let { triggerRef:
|
|
18
|
-
|
|
19
|
-
if (!
|
|
20
|
-
|
|
21
|
-
let e =
|
|
15
|
+
function p({ item: n }) {
|
|
16
|
+
o();
|
|
17
|
+
let s = r(), { triggerRef: c, popoverRef: d, isOpen: f, anchorName: p, toggle: m, close: h } = e(), g = n.items.some((e) => e.active), _ = i(!1);
|
|
18
|
+
a(() => {
|
|
19
|
+
if (!_.value || !f.value) return;
|
|
20
|
+
_.value = !1;
|
|
21
|
+
let e = d.current;
|
|
22
22
|
e && e.querySelector("[role=\"menuitem\"]")?.focus();
|
|
23
23
|
});
|
|
24
|
-
function
|
|
25
|
-
e.key === "ArrowDown" ? (e.preventDefault(),
|
|
24
|
+
function v(e) {
|
|
25
|
+
e.key === "ArrowDown" ? (e.preventDefault(), f.value ? d.current?.querySelector("[role=\"menuitem\"]")?.focus() : (_.value = !0, m())) : e.key === "Escape" && (e.preventDefault(), h());
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
let t = Array.from(
|
|
29
|
-
e.key === "ArrowDown" ? (e.preventDefault(), t[(n + 1) % t.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), t[(n - 1 + t.length) % t.length]?.focus()) : e.key === "Escape" && (
|
|
27
|
+
function y(e) {
|
|
28
|
+
let t = Array.from(d.current?.querySelectorAll("[role=\"menuitem\"]") ?? []), n = t.indexOf(document.activeElement);
|
|
29
|
+
e.key === "ArrowDown" ? (e.preventDefault(), t[(n + 1) % t.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), t[(n - 1 + t.length) % t.length]?.focus()) : e.key === "Escape" && (h(), c.current?.focus());
|
|
30
30
|
}
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ u("li", {
|
|
32
32
|
className: t.navMenuWrapper,
|
|
33
|
-
children: [/* @__PURE__ */
|
|
34
|
-
ref:
|
|
33
|
+
children: [/* @__PURE__ */ u("button", {
|
|
34
|
+
ref: c,
|
|
35
35
|
type: "button",
|
|
36
36
|
"aria-haspopup": "menu",
|
|
37
|
-
"aria-expanded":
|
|
38
|
-
"data-state":
|
|
39
|
-
style: { anchorName:
|
|
37
|
+
"aria-expanded": f.value,
|
|
38
|
+
"data-state": g ? "active" : void 0,
|
|
39
|
+
style: { anchorName: p },
|
|
40
40
|
className: t.navMenuTrigger,
|
|
41
|
-
onClick:
|
|
42
|
-
onKeyDown:
|
|
43
|
-
children: [n.label, /* @__PURE__ */
|
|
41
|
+
onClick: m,
|
|
42
|
+
onKeyDown: v,
|
|
43
|
+
children: [n.label, /* @__PURE__ */ l("svg", {
|
|
44
44
|
viewBox: "0 0 16 16",
|
|
45
45
|
width: "12",
|
|
46
46
|
height: "12",
|
|
47
47
|
"aria-hidden": "true",
|
|
48
48
|
className: t.chevron,
|
|
49
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ l("path", {
|
|
50
50
|
d: "M4 6l4 4 4-4",
|
|
51
51
|
fill: "none",
|
|
52
52
|
stroke: "currentColor",
|
|
@@ -55,51 +55,51 @@ function f({ item: n }) {
|
|
|
55
55
|
strokeLinejoin: "round"
|
|
56
56
|
})
|
|
57
57
|
})]
|
|
58
|
-
}), /* @__PURE__ */
|
|
59
|
-
ref:
|
|
58
|
+
}), /* @__PURE__ */ l("div", {
|
|
59
|
+
ref: d,
|
|
60
60
|
popover: "auto",
|
|
61
61
|
role: "menu",
|
|
62
62
|
"aria-label": n.label,
|
|
63
|
-
"data-state":
|
|
64
|
-
style: { positionAnchor:
|
|
63
|
+
"data-state": f.value ? "open" : "closed",
|
|
64
|
+
style: { positionAnchor: p },
|
|
65
65
|
className: t.navMenuPanel,
|
|
66
|
-
onKeyDown:
|
|
67
|
-
children: n.items.map((e, n) => /* @__PURE__ */
|
|
66
|
+
onKeyDown: y,
|
|
67
|
+
children: n.items.map((e, n) => /* @__PURE__ */ l(s, {
|
|
68
68
|
href: e.href,
|
|
69
69
|
role: "menuitem",
|
|
70
70
|
"aria-current": e.active ? "page" : void 0,
|
|
71
71
|
"data-state": e.active ? "active" : void 0,
|
|
72
72
|
className: t.navMenuItem,
|
|
73
|
-
onClick:
|
|
73
|
+
onClick: h,
|
|
74
74
|
children: e.label
|
|
75
75
|
}, e.id ?? `${n}-${e.href}`))
|
|
76
76
|
})]
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
let
|
|
82
|
-
return /* @__PURE__ */
|
|
79
|
+
function m({ brand: e, nav: i, actions: a, end: m, onMenuClick: h, menuExpanded: g, skipToContentHref: _ = "#cascade-main", labels: v, className: y }) {
|
|
80
|
+
o();
|
|
81
|
+
let b = r(), x = v?.nav ?? c(s.shellHeader.nav), S = g ? v?.closeMenu ?? c(s.shellHeader.closeMenu) : v?.openMenu ?? c(s.shellHeader.openMenu);
|
|
82
|
+
return /* @__PURE__ */ u("header", {
|
|
83
83
|
role: "banner",
|
|
84
|
-
className: n(t.header,
|
|
84
|
+
className: n(t.header, y),
|
|
85
85
|
children: [
|
|
86
|
-
|
|
87
|
-
href:
|
|
86
|
+
_ !== !1 && /* @__PURE__ */ l("a", {
|
|
87
|
+
href: _,
|
|
88
88
|
className: t.skipLink,
|
|
89
|
-
children:
|
|
89
|
+
children: v?.skipToContent ?? c(s.shellHeader.skipToContent)
|
|
90
90
|
}),
|
|
91
|
-
|
|
91
|
+
h && /* @__PURE__ */ l("button", {
|
|
92
92
|
type: "button",
|
|
93
|
-
"aria-label":
|
|
94
|
-
"aria-expanded":
|
|
93
|
+
"aria-label": S,
|
|
94
|
+
"aria-expanded": g ?? !1,
|
|
95
95
|
className: t.menuButton,
|
|
96
|
-
onClick:
|
|
97
|
-
children: /* @__PURE__ */
|
|
96
|
+
onClick: h,
|
|
97
|
+
children: /* @__PURE__ */ l("svg", {
|
|
98
98
|
viewBox: "0 0 16 16",
|
|
99
99
|
width: "16",
|
|
100
100
|
height: "16",
|
|
101
101
|
"aria-hidden": "true",
|
|
102
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ l("path", {
|
|
103
103
|
d: "M2 4h12M2 8h12M2 12h12",
|
|
104
104
|
stroke: "currentColor",
|
|
105
105
|
strokeWidth: "1.5",
|
|
@@ -107,27 +107,27 @@ function p({ brand: e, nav: r, actions: i, end: p, onMenuClick: m, menuExpanded:
|
|
|
107
107
|
})
|
|
108
108
|
})
|
|
109
109
|
}),
|
|
110
|
-
e != null && (
|
|
110
|
+
e != null && (d(e) ? /* @__PURE__ */ u(b, {
|
|
111
111
|
href: e.href ?? "/",
|
|
112
112
|
"aria-label": [e.prefix, e.name].filter(Boolean).join(" "),
|
|
113
113
|
className: t.brand,
|
|
114
|
-
children: [e.prefix && /* @__PURE__ */
|
|
114
|
+
children: [e.prefix && /* @__PURE__ */ l("span", {
|
|
115
115
|
className: t.brandPrefix,
|
|
116
116
|
children: e.prefix
|
|
117
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ l("span", {
|
|
118
118
|
className: t.brandName,
|
|
119
119
|
children: e.name
|
|
120
120
|
})]
|
|
121
|
-
}) : /* @__PURE__ */
|
|
121
|
+
}) : /* @__PURE__ */ l("div", {
|
|
122
122
|
className: t.brand,
|
|
123
123
|
children: e
|
|
124
124
|
})),
|
|
125
|
-
|
|
126
|
-
"aria-label":
|
|
125
|
+
i && i.length > 0 && /* @__PURE__ */ l("nav", {
|
|
126
|
+
"aria-label": x,
|
|
127
127
|
className: t.nav,
|
|
128
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ l("ul", {
|
|
129
129
|
className: t.navList,
|
|
130
|
-
children:
|
|
130
|
+
children: i.map((e, n) => f(e) ? /* @__PURE__ */ l(p, { item: e }, e.id ?? `${n}-${e.label}`) : /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(b, {
|
|
131
131
|
href: e.href,
|
|
132
132
|
"aria-current": e.active ? "page" : void 0,
|
|
133
133
|
"data-state": e.active ? "active" : void 0,
|
|
@@ -137,10 +137,10 @@ function p({ brand: e, nav: r, actions: i, end: p, onMenuClick: m, menuExpanded:
|
|
|
137
137
|
}) }, e.id ?? `${n}-${e.href}`))
|
|
138
138
|
})
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
|
|
140
|
+
/* @__PURE__ */ l("div", { className: t.spacer }),
|
|
141
|
+
a && a.length > 0 && /* @__PURE__ */ l("div", {
|
|
142
142
|
className: t.actions,
|
|
143
|
-
children:
|
|
143
|
+
children: a.map((e) => /* @__PURE__ */ l("button", {
|
|
144
144
|
type: "button",
|
|
145
145
|
"aria-label": e.label,
|
|
146
146
|
"aria-pressed": e.active ?? !1,
|
|
@@ -148,19 +148,19 @@ function p({ brand: e, nav: r, actions: i, end: p, onMenuClick: m, menuExpanded:
|
|
|
148
148
|
"data-state": e.active ? "active" : void 0,
|
|
149
149
|
className: t.action,
|
|
150
150
|
onClick: e.onClick,
|
|
151
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ l("span", {
|
|
152
152
|
className: t.actionIcon,
|
|
153
153
|
"aria-hidden": "true",
|
|
154
154
|
children: e.icon
|
|
155
155
|
})
|
|
156
156
|
}, e.id))
|
|
157
157
|
}),
|
|
158
|
-
|
|
158
|
+
m && /* @__PURE__ */ l("div", {
|
|
159
159
|
className: t.end,
|
|
160
|
-
children:
|
|
160
|
+
children: m
|
|
161
161
|
})
|
|
162
162
|
]
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
//#endregion
|
|
166
|
-
export {
|
|
166
|
+
export { m as ShellHeader };
|