@umami/shiso 1.1.11 → 1.1.12
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/chunks/App.js +10 -10
- package/package.json +1 -1
- package/src/components/SideNav.tsx +13 -13
package/dist/chunks/App.js
CHANGED
|
@@ -26793,8 +26793,8 @@ function PageLinks({ items = [], title, navigationLabel }) {
|
|
|
26793
26793
|
|
|
26794
26794
|
//#endregion
|
|
26795
26795
|
//#region src/components/SideNav.tsx
|
|
26796
|
-
const sectionLabelClass = "flex min-w-0
|
|
26797
|
-
const groupLabelClass = "flex min-w-0
|
|
26796
|
+
const sectionLabelClass = "flex min-w-0 items-center gap-[0.4rem] pb-2 pr-1 font-bold text-inherit";
|
|
26797
|
+
const groupLabelClass = "flex min-w-0 items-center gap-[0.4rem] py-2 pl-3 pr-1 font-medium text-inherit";
|
|
26798
26798
|
const selectedClass = "border-l-sidebar-primary font-bold text-sidebar-primary hover:text-sidebar-primary";
|
|
26799
26799
|
/** True when the group's root or any descendant page is the current page. */
|
|
26800
26800
|
function containsPage(node, pathname) {
|
|
@@ -26828,7 +26828,7 @@ function CollapsibleGroup({ node, pathname, depth, drilldown, expandLabel, colla
|
|
|
26828
26828
|
const chevron = /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 shrink-0 origin-center text-muted-foreground transition-[color,transform] duration-150 group-hover/section:text-sidebar-accent-foreground group-aria-expanded/collapsible-trigger:rotate-90" });
|
|
26829
26829
|
const isTopLevel = depth === 0;
|
|
26830
26830
|
const rootSelected = node.root?.page.url === pathname;
|
|
26831
|
-
const headerClass = isTopLevel ? "flex min-w-0 items-center text-sidebar-foreground" : clsx("flex items-center border-
|
|
26831
|
+
const headerClass = isTopLevel ? "flex min-w-0 items-center text-sidebar-foreground" : clsx("flex items-center border-l border-l-sidebar-border text-muted-foreground hover:text-sidebar-accent-foreground", { "pl-6": depth > 1 });
|
|
26832
26832
|
const fixedHeader = /* @__PURE__ */ jsx("div", {
|
|
26833
26833
|
className: clsx(headerClass, {
|
|
26834
26834
|
[selectedClass]: rootSelected && !isTopLevel,
|
|
@@ -26836,10 +26836,10 @@ function CollapsibleGroup({ node, pathname, depth, drilldown, expandLabel, colla
|
|
|
26836
26836
|
}),
|
|
26837
26837
|
children: node.root ? /* @__PURE__ */ jsxs(Link, {
|
|
26838
26838
|
to: node.root.page.url,
|
|
26839
|
-
className: isTopLevel ? sectionLabelClass : groupLabelClass,
|
|
26839
|
+
className: clsx(isTopLevel ? sectionLabelClass : groupLabelClass, "flex-1"),
|
|
26840
26840
|
children: [resolveIcon(node.icon), node.label]
|
|
26841
26841
|
}) : /* @__PURE__ */ jsxs("span", {
|
|
26842
|
-
className: isTopLevel ? sectionLabelClass : groupLabelClass,
|
|
26842
|
+
className: clsx(isTopLevel ? sectionLabelClass : groupLabelClass, "flex-1"),
|
|
26843
26843
|
children: [resolveIcon(node.icon), node.label]
|
|
26844
26844
|
})
|
|
26845
26845
|
});
|
|
@@ -26857,7 +26857,7 @@ function CollapsibleGroup({ node, pathname, depth, drilldown, expandLabel, colla
|
|
|
26857
26857
|
type: "button",
|
|
26858
26858
|
variant: "ghost",
|
|
26859
26859
|
size: "icon-xs",
|
|
26860
|
-
className:
|
|
26860
|
+
className: "group/collapsible-trigger inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
26861
26861
|
"aria-label": `${isExpanded ? collapseLabel : expandLabel} ${node.label}`
|
|
26862
26862
|
}),
|
|
26863
26863
|
children: chevron
|
|
@@ -26866,9 +26866,9 @@ function CollapsibleGroup({ node, pathname, depth, drilldown, expandLabel, colla
|
|
|
26866
26866
|
render: /* @__PURE__ */ jsx(Button, {
|
|
26867
26867
|
type: "button",
|
|
26868
26868
|
variant: "ghost",
|
|
26869
|
-
className: clsx(headerClass, "group/section group/collapsible-trigger flex h-auto w-full items-center justify-start gap-[0.4rem] whitespace-normal rounded-none px-0 py-0 text-left hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent
|
|
26869
|
+
className: clsx(headerClass, "group/section group/collapsible-trigger flex h-auto w-full items-center justify-start gap-[0.4rem] whitespace-normal rounded-none px-0 py-0 text-left hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent", {
|
|
26870
26870
|
"pb-2 font-bold text-sidebar-foreground": isTopLevel,
|
|
26871
|
-
"border-
|
|
26871
|
+
"border-l border-l-sidebar-border px-3 py-2 font-medium text-muted-foreground hover:text-sidebar-accent-foreground": !isTopLevel
|
|
26872
26872
|
})
|
|
26873
26873
|
}),
|
|
26874
26874
|
children: [
|
|
@@ -26917,7 +26917,7 @@ function NavNodes({ nodes, pathname, depth, drilldown, expandLabel, collapseLabe
|
|
|
26917
26917
|
href: node.href,
|
|
26918
26918
|
target: node.target,
|
|
26919
26919
|
rel: node.target === "_blank" ? "noreferrer" : void 0,
|
|
26920
|
-
className: clsx("flex min-w-0 items-center gap-[0.4rem] border-
|
|
26920
|
+
className: clsx("flex min-w-0 items-center gap-[0.4rem] border-l border-l-sidebar-border px-3 py-[0.55rem] text-muted-foreground hover:text-sidebar-accent-foreground [overflow-wrap:anywhere]", { "pl-6": depth > 1 }),
|
|
26921
26921
|
children: [
|
|
26922
26922
|
resolveIcon(node.icon),
|
|
26923
26923
|
node.label,
|
|
@@ -26934,7 +26934,7 @@ function NavNodes({ nodes, pathname, depth, drilldown, expandLabel, collapseLabe
|
|
|
26934
26934
|
const isSelected = url === pathname;
|
|
26935
26935
|
rendered.push(/* @__PURE__ */ jsxs(Link, {
|
|
26936
26936
|
to: url,
|
|
26937
|
-
className: clsx("flex min-w-0 items-center gap-[0.4rem] border-
|
|
26937
|
+
className: clsx("flex min-w-0 items-center gap-[0.4rem] border-l border-l-sidebar-border px-3 py-[0.55rem] [overflow-wrap:anywhere]", {
|
|
26938
26938
|
"pl-6": depth > 1,
|
|
26939
26939
|
[selectedClass]: isSelected,
|
|
26940
26940
|
"text-muted-foreground hover:text-sidebar-accent-foreground": !isSelected
|
package/package.json
CHANGED
|
@@ -11,9 +11,9 @@ import { flattenNav, isNodeHidden } from '@/lib/docs-config';
|
|
|
11
11
|
import type { DocsTab, NavGroupNode, NavNode } from '@/lib/types';
|
|
12
12
|
|
|
13
13
|
const sectionLabelClass =
|
|
14
|
-
'flex min-w-0
|
|
14
|
+
'flex min-w-0 items-center gap-[0.4rem] pb-2 pr-1 font-bold text-inherit';
|
|
15
15
|
const groupLabelClass =
|
|
16
|
-
'flex min-w-0
|
|
16
|
+
'flex min-w-0 items-center gap-[0.4rem] py-2 pl-3 pr-1 font-medium text-inherit';
|
|
17
17
|
const selectedClass =
|
|
18
18
|
'border-l-sidebar-primary font-bold text-sidebar-primary hover:text-sidebar-primary';
|
|
19
19
|
|
|
@@ -97,7 +97,7 @@ function CollapsibleGroup({
|
|
|
97
97
|
const headerClass = isTopLevel
|
|
98
98
|
? 'flex min-w-0 items-center text-sidebar-foreground'
|
|
99
99
|
: classNames(
|
|
100
|
-
'flex items-center border-
|
|
100
|
+
'flex items-center border-l border-l-sidebar-border text-muted-foreground hover:text-sidebar-accent-foreground',
|
|
101
101
|
{ 'pl-6': depth > 1 },
|
|
102
102
|
);
|
|
103
103
|
|
|
@@ -109,12 +109,15 @@ function CollapsibleGroup({
|
|
|
109
109
|
})}
|
|
110
110
|
>
|
|
111
111
|
{node.root ? (
|
|
112
|
-
<Link
|
|
112
|
+
<Link
|
|
113
|
+
to={node.root.page.url}
|
|
114
|
+
className={classNames(isTopLevel ? sectionLabelClass : groupLabelClass, 'flex-1')}
|
|
115
|
+
>
|
|
113
116
|
{resolveIcon(node.icon)}
|
|
114
117
|
{node.label}
|
|
115
118
|
</Link>
|
|
116
119
|
) : (
|
|
117
|
-
<span className={isTopLevel ? sectionLabelClass : groupLabelClass}>
|
|
120
|
+
<span className={classNames(isTopLevel ? sectionLabelClass : groupLabelClass, 'flex-1')}>
|
|
118
121
|
{resolveIcon(node.icon)}
|
|
119
122
|
{node.label}
|
|
120
123
|
</span>
|
|
@@ -142,10 +145,7 @@ function CollapsibleGroup({
|
|
|
142
145
|
type="button"
|
|
143
146
|
variant="ghost"
|
|
144
147
|
size="icon-xs"
|
|
145
|
-
className=
|
|
146
|
-
'group/collapsible-trigger inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
|
147
|
-
{ 'mr-[0.35rem]': !isTopLevel },
|
|
148
|
-
)}
|
|
148
|
+
className="group/collapsible-trigger inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
|
|
149
149
|
aria-label={`${isExpanded ? collapseLabel : expandLabel} ${node.label}`}
|
|
150
150
|
/>
|
|
151
151
|
}
|
|
@@ -161,10 +161,10 @@ function CollapsibleGroup({
|
|
|
161
161
|
variant="ghost"
|
|
162
162
|
className={classNames(
|
|
163
163
|
headerClass,
|
|
164
|
-
'group/section group/collapsible-trigger flex h-auto w-full items-center justify-start gap-[0.4rem] whitespace-normal rounded-none px-0 py-0 text-left hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent
|
|
164
|
+
'group/section group/collapsible-trigger flex h-auto w-full items-center justify-start gap-[0.4rem] whitespace-normal rounded-none px-0 py-0 text-left hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent',
|
|
165
165
|
{
|
|
166
166
|
'pb-2 font-bold text-sidebar-foreground': isTopLevel,
|
|
167
|
-
'border-
|
|
167
|
+
'border-l border-l-sidebar-border px-3 py-2 font-medium text-muted-foreground hover:text-sidebar-accent-foreground':
|
|
168
168
|
!isTopLevel,
|
|
169
169
|
},
|
|
170
170
|
)}
|
|
@@ -244,7 +244,7 @@ function NavNodes({
|
|
|
244
244
|
target={node.target}
|
|
245
245
|
rel={node.target === '_blank' ? 'noreferrer' : undefined}
|
|
246
246
|
className={classNames(
|
|
247
|
-
'flex min-w-0 items-center gap-[0.4rem] border-
|
|
247
|
+
'flex min-w-0 items-center gap-[0.4rem] border-l border-l-sidebar-border px-3 py-[0.55rem] text-muted-foreground hover:text-sidebar-accent-foreground [overflow-wrap:anywhere]',
|
|
248
248
|
{ 'pl-6': depth > 1 },
|
|
249
249
|
)}
|
|
250
250
|
>
|
|
@@ -265,7 +265,7 @@ function NavNodes({
|
|
|
265
265
|
key={url}
|
|
266
266
|
to={url}
|
|
267
267
|
className={classNames(
|
|
268
|
-
'flex min-w-0 items-center gap-[0.4rem] border-
|
|
268
|
+
'flex min-w-0 items-center gap-[0.4rem] border-l border-l-sidebar-border px-3 py-[0.55rem] [overflow-wrap:anywhere]',
|
|
269
269
|
{
|
|
270
270
|
'pl-6': depth > 1,
|
|
271
271
|
[selectedClass]: isSelected,
|