@broberg/app-shell 0.16.0 → 0.18.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/preact.d.cts CHANGED
@@ -68,6 +68,11 @@ interface NavGroup<Icon = unknown> {
68
68
  * it is the group's key and its accessible name.
69
69
  */
70
70
  hideLabel?: boolean;
71
+ /**
72
+ * F092.26 — false: the heading is plain text (no fold button, no chevron) and the
73
+ * group is always open, even with a stored fold for this label. Default true.
74
+ */
75
+ collapsible?: boolean;
71
76
  }
72
77
  /**
73
78
  * Is this item the current page? Exact match for "/", otherwise the path is the
package/dist/preact.d.ts CHANGED
@@ -68,6 +68,11 @@ interface NavGroup<Icon = unknown> {
68
68
  * it is the group's key and its accessible name.
69
69
  */
70
70
  hideLabel?: boolean;
71
+ /**
72
+ * F092.26 — false: the heading is plain text (no fold button, no chevron) and the
73
+ * group is always open, even with a stored fold for this label. Default true.
74
+ */
75
+ collapsible?: boolean;
71
76
  }
72
77
  /**
73
78
  * Is this item the current page? Exact match for "/", otherwise the path is the
package/dist/preact.js CHANGED
@@ -899,7 +899,8 @@ function Sidebar(p) {
899
899
  ) : p.brandMark }) : null
900
900
  ] }) : null,
901
901
  /* @__PURE__ */ jsx("nav", { class: "bas-sidebar__nav", children: p.groups.map((g) => {
902
- const open = railed || g.hideLabel || !folded.has(g.label);
902
+ const fixed = g.hideLabel || g.collapsible === false;
903
+ const open = railed || fixed || !folded.has(g.label);
903
904
  const slug = g.label.toLowerCase().replace(/[^a-z0-9]+/g, "-");
904
905
  return /* @__PURE__ */ jsxs(
905
906
  "div",
@@ -909,7 +910,7 @@ function Sidebar(p) {
909
910
  "aria-label": g.hideLabel ? g.label : void 0,
910
911
  "data-testid": g.hideLabel ? `sidebar-group-${slug}-unlabelled` : void 0,
911
912
  children: [
912
- g.hideLabel ? null : /* @__PURE__ */ jsxs("button", { type: "button", class: "bas-group__label", "data-testid": `sidebar-group-${slug}`, "aria-expanded": open, onClick: () => toggleGroup(g.label), children: [
913
+ g.hideLabel ? null : g.collapsible === false ? /* @__PURE__ */ jsx("div", { class: "bas-group__label bas-group__label--static", "data-testid": `sidebar-group-${slug}`, children: /* @__PURE__ */ jsx("span", { children: g.label }) }) : /* @__PURE__ */ jsxs("button", { type: "button", class: "bas-group__label", "data-testid": `sidebar-group-${slug}`, "aria-expanded": open, onClick: () => toggleGroup(g.label), children: [
913
914
  /* @__PURE__ */ jsx(IconChevron, { open }),
914
915
  /* @__PURE__ */ jsx("span", { children: g.label })
915
916
  ] }),