@octaviaflow/core 3.0.13 → 3.0.14
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/index.cjs +50 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +50 -33
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11689,14 +11689,22 @@ function ExpandedLayout({
|
|
|
11689
11689
|
pinned,
|
|
11690
11690
|
onPinToggle
|
|
11691
11691
|
}) {
|
|
11692
|
+
const hasFooterControl = Boolean(onPinToggle || onToggle);
|
|
11692
11693
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
11693
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__header", children: [
|
|
11694
|
+
(logo || brand) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__header", children: [
|
|
11694
11695
|
logo && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__logo", children: logo }),
|
|
11695
11696
|
brand && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__brand", children: [
|
|
11696
11697
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ods-sidebar__brand-name", children: brand.name }),
|
|
11697
11698
|
brand.subtitle && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ods-sidebar__brand-sub", children: brand.subtitle })
|
|
11698
|
-
] })
|
|
11699
|
-
|
|
11699
|
+
] })
|
|
11700
|
+
] }),
|
|
11701
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__body", children: sections.map((section, sIdx) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__section", children: [
|
|
11702
|
+
section.label && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__section-label", children: section.label }),
|
|
11703
|
+
section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExpandedItem, { item, level: 0 }, item.id))
|
|
11704
|
+
] }, section.id ?? sIdx)) }),
|
|
11705
|
+
(footerItems || user || hasFooterControl) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__footer", children: [
|
|
11706
|
+
footerItems && footerItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__footer-list", children: footerItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExpandedItem, { item, level: 0 }, item.id)) }),
|
|
11707
|
+
hasFooterControl && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__footer-control", children: onPinToggle ? /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
11700
11708
|
"button",
|
|
11701
11709
|
{
|
|
11702
11710
|
type: "button",
|
|
@@ -11704,48 +11712,57 @@ function ExpandedLayout({
|
|
|
11704
11712
|
onClick: onPinToggle,
|
|
11705
11713
|
"aria-label": pinned ? "Unpin sidebar" : "Pin sidebar",
|
|
11706
11714
|
"aria-pressed": pinned,
|
|
11707
|
-
children:
|
|
11708
|
-
|
|
11709
|
-
{
|
|
11710
|
-
|
|
11711
|
-
stroke: "currentColor",
|
|
11712
|
-
strokeWidth: "1.3",
|
|
11713
|
-
strokeLinejoin: "round",
|
|
11714
|
-
fill: pinned ? "currentColor" : "none"
|
|
11715
|
-
}
|
|
11716
|
-
) })
|
|
11715
|
+
children: [
|
|
11716
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PinIcon, { pinned: !!pinned }),
|
|
11717
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ods-sidebar__pin-label", children: pinned ? "Unpin" : "Pin sidebar" })
|
|
11718
|
+
]
|
|
11717
11719
|
}
|
|
11718
|
-
),
|
|
11719
|
-
onToggle && !onPinToggle && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
11720
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
11720
11721
|
"button",
|
|
11721
11722
|
{
|
|
11722
11723
|
type: "button",
|
|
11723
11724
|
className: "ods-sidebar__collapse",
|
|
11724
11725
|
onClick: onToggle,
|
|
11725
11726
|
"aria-label": "Collapse sidebar",
|
|
11726
|
-
children:
|
|
11727
|
-
"
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11727
|
+
children: [
|
|
11728
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
11729
|
+
"path",
|
|
11730
|
+
{
|
|
11731
|
+
d: "M3 3v10M11 5l-3 3 3 3",
|
|
11732
|
+
stroke: "currentColor",
|
|
11733
|
+
strokeWidth: "1.5",
|
|
11734
|
+
strokeLinecap: "round",
|
|
11735
|
+
strokeLinejoin: "round"
|
|
11736
|
+
}
|
|
11737
|
+
) }),
|
|
11738
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ods-sidebar__pin-label", children: "Collapse" })
|
|
11739
|
+
]
|
|
11736
11740
|
}
|
|
11737
|
-
)
|
|
11738
|
-
] }),
|
|
11739
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__body", children: sections.map((section, sIdx) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__section", children: [
|
|
11740
|
-
section.label && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__section-label", children: section.label }),
|
|
11741
|
-
section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExpandedItem, { item, level: 0 }, item.id))
|
|
11742
|
-
] }, section.id ?? sIdx)) }),
|
|
11743
|
-
(footerItems || user) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__footer", children: [
|
|
11744
|
-
footerItems && footerItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__footer-list", children: footerItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExpandedItem, { item, level: 0 }, item.id)) }),
|
|
11741
|
+
) }),
|
|
11745
11742
|
user && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SidebarUserCard, { user })
|
|
11746
11743
|
] })
|
|
11747
11744
|
] });
|
|
11748
11745
|
}
|
|
11746
|
+
function PinIcon({ pinned }) {
|
|
11747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
11748
|
+
"svg",
|
|
11749
|
+
{
|
|
11750
|
+
width: "14",
|
|
11751
|
+
height: "14",
|
|
11752
|
+
viewBox: "0 0 16 16",
|
|
11753
|
+
fill: pinned ? "currentColor" : "none",
|
|
11754
|
+
stroke: "currentColor",
|
|
11755
|
+
strokeWidth: "1.5",
|
|
11756
|
+
strokeLinejoin: "round",
|
|
11757
|
+
strokeLinecap: "round",
|
|
11758
|
+
"aria-hidden": "true",
|
|
11759
|
+
children: [
|
|
11760
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { d: "M10.5 1.5 14.5 5.5 11.5 8.5 11 11 5 5 7.5 4.5z" }),
|
|
11761
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { d: "M5 5 1.5 14.5" })
|
|
11762
|
+
]
|
|
11763
|
+
}
|
|
11764
|
+
);
|
|
11765
|
+
}
|
|
11749
11766
|
function ExpandedItem({ item, level }) {
|
|
11750
11767
|
const hasChildren = !!(item.children && item.children.length > 0);
|
|
11751
11768
|
const [open, setOpen] = (0, import_react53.useState)(
|