@broberg/app-shell 0.14.0 → 0.15.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/README.md +1 -0
- package/css/app-shell.css +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js.map +1 -1
- package/dist/preact.cjs +23 -13
- package/dist/preact.cjs.map +1 -1
- package/dist/preact.d.cts +11 -2
- package/dist/preact.d.ts +11 -2
- package/dist/preact.js +23 -13
- package/dist/preact.js.map +1 -1
- package/package.json +1 -1
package/dist/preact.cjs
CHANGED
|
@@ -810,7 +810,7 @@ function Sidebar(p) {
|
|
|
810
810
|
children: [
|
|
811
811
|
active && !sub ? /* @__PURE__ */ jsxRuntime.jsx("span", { class: "bas-item__bar" }) : null,
|
|
812
812
|
it.icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { class: "bas-item__icon", children: it.icon }) : null,
|
|
813
|
-
it.marker === "working" ? /* @__PURE__ */ jsxRuntime.jsx("span", { class: "bas-item__marker", "data-testid": `sidebar-item-${it.id}-marker`, role: "img", "aria-label": TEXT[p.lang].working }) : null,
|
|
813
|
+
it.marker === "working" ? /* @__PURE__ */ jsxRuntime.jsx("span", { class: "bas-item__marker", "data-testid": `sidebar-item-${it.id}-marker`, role: "img", "aria-label": TEXT[p.lang].working }) : it.marker === "idle" ? /* @__PURE__ */ jsxRuntime.jsx("span", { class: "bas-item__marker bas-item__marker--idle", "data-testid": `sidebar-item-${it.id}-marker`, "aria-hidden": "true" }) : null,
|
|
814
814
|
/* @__PURE__ */ jsxRuntime.jsx("span", { class: "bas-item__label", children: it.label }),
|
|
815
815
|
it.pinned ? /* @__PURE__ */ jsxRuntime.jsx("span", { class: "bas-item__pin", "data-testid": `sidebar-item-${it.id}-pinned`, role: "img", "aria-label": TEXT[p.lang].pinned, children: /* @__PURE__ */ jsxRuntime.jsx(IconPin, {}) }) : null,
|
|
816
816
|
badge ? /* @__PURE__ */ jsxRuntime.jsx("span", { class: "bas-item__count", "data-testid": `sidebar-badge-${it.id}`, children: badge }) : null
|
|
@@ -901,19 +901,29 @@ function Sidebar(p) {
|
|
|
901
901
|
) : p.brandMark }) : null
|
|
902
902
|
] }) : null,
|
|
903
903
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { class: "bas-sidebar__nav", children: p.groups.map((g) => {
|
|
904
|
-
const open = railed || !folded.has(g.label);
|
|
904
|
+
const open = railed || g.hideLabel || !folded.has(g.label);
|
|
905
905
|
const slug = g.label.toLowerCase().replace(/[^a-z0-9]+/g, "-");
|
|
906
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
906
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
907
|
+
"div",
|
|
908
|
+
{
|
|
909
|
+
class: "bas-group" + (g.variant === "plain" ? " bas-group--plain" : ""),
|
|
910
|
+
role: g.hideLabel ? "group" : void 0,
|
|
911
|
+
"aria-label": g.hideLabel ? g.label : void 0,
|
|
912
|
+
"data-testid": g.hideLabel ? `sidebar-group-${slug}-unlabelled` : void 0,
|
|
913
|
+
children: [
|
|
914
|
+
g.hideLabel ? null : /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", class: "bas-group__label", "data-testid": `sidebar-group-${slug}`, "aria-expanded": open, onClick: () => toggleGroup(g.label), children: [
|
|
915
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconChevron, { open }),
|
|
916
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: g.label })
|
|
917
|
+
] }),
|
|
918
|
+
open ? g.items.map(item) : null,
|
|
919
|
+
open ? g.sections?.map((sec) => /* @__PURE__ */ jsxRuntime.jsxs("div", { class: "bas-section", "data-testid": `sidebar-section-${slug}-${sec.label.toLowerCase().replace(/[^a-z0-9æøå]+/g, "-")}`, children: [
|
|
920
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { class: "bas-section__label", children: sec.label }),
|
|
921
|
+
sec.items.map(item)
|
|
922
|
+
] }, sec.label)) : null
|
|
923
|
+
]
|
|
924
|
+
},
|
|
925
|
+
g.label
|
|
926
|
+
);
|
|
917
927
|
}) }),
|
|
918
928
|
p.footer?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { class: "bas-sidebar__foot", children: p.footer.map(item) }) : null,
|
|
919
929
|
p.bottom ? /* @__PURE__ */ jsxRuntime.jsx("div", { class: "bas-sidebar__user", "data-testid": "sidebar-user", children: p.bottom }) : null
|