@midas-ds/layout 0.2.26 → 0.2.27
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/CHANGELOG.md +10 -0
- package/assets/navbar.css +1 -1
- package/assets/navigation.css +1 -1
- package/chunks/navbar-DWupsHC1.js +15 -0
- package/chunks/navigation-HpT2Dwfd.js +110 -0
- package/index.js +3 -3
- package/navbar/Navbar.d.ts +1 -1
- package/navbar/Navbar.stories.d.ts +2 -1
- package/navbar/NavbarContext.d.ts +1 -0
- package/navbar/index.d.ts +1 -0
- package/navbar/index.js +2 -2
- package/navigation/index.js +1 -1
- package/navigation/navigation-link/NavigationLink.d.ts +2 -2
- package/navigation/navigation-link/NavigationLink.stories.d.ts +1 -1
- package/package.json +2 -2
- package/chunks/navbar-Bb5A6Yf9.js +0 -8
- package/chunks/navigation-D9Lh1g9b.js +0 -95
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 0.2.27 (2026-08-28)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **layout,navbar:** correct wrongly implemented design ([ee7393c75c3](https://github.com/migrationsverket/midas/commit/ee7393c75c3))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated components to 17.23.3
|
|
10
|
+
|
|
1
11
|
## 0.2.26 (2026-08-28)
|
|
2
12
|
|
|
3
13
|
### 🧱 Updated Dependencies
|
package/assets/navbar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._navbar_yoqje_1{background-color:var(--midas-background-base);border-top:1px solid var(--midas-border-color-subtle)}@media (width>640px){._navbar_yoqje_1{display:none}}._navbar_yoqje_1 ul{justify-content:space-between;margin:0;padding:0;display:flex}._navbar_yoqje_1 ul li{flex:1 1 0;align-items:center;list-style:none;display:flex}
|
package/assets/navigation.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._rootList_l3v98_1{margin:0;padding:0}._navigationHeader_18u5f_1{color:var(--midas-text-secondary);font-size:var(--midas-typography-font-size-20);padding:var(--midas-space-60) var(--midas-space-small) var(--midas-space-xsmall)}._navigationHeader_18u5f_1._collapsed_18u5f_7{display:none}._navigationItem_1jt2l_1{list-style:none}.
|
|
1
|
+
._rootList_l3v98_1{margin:0;padding:0}._navigationHeader_18u5f_1{color:var(--midas-text-secondary);font-size:var(--midas-typography-font-size-20);padding:var(--midas-space-60) var(--midas-space-small) var(--midas-space-xsmall)}._navigationHeader_18u5f_1._collapsed_18u5f_7{display:none}._navigationItem_1jt2l_1{list-style:none}._navigationLink_1fd8o_1{border-left:var(--midas-size-10) solid transparent;color:var(--midas-text-primary);font-family:var(--midas-typography-font-family);align-self:stretch;align-items:center;gap:var(--midas-spacing-30);padding:var(--midas-spacing-50);flex-direction:column;flex:1 0;justify-content:flex-end;text-decoration:none;display:flex}._navigationLink_1fd8o_1[data-hovered]:not(:disabled,[data-disabled]),._navigationLink_1fd8o_1:hover:not(:disabled,[data-disabled]){background-color:var(--midas-navigation-link-background-hover);color:var(--midas-text-primary);text-decoration:none}._navigationLink_1fd8o_1[data-active]{background-color:var(--midas-navigation-link-background-selected)}._navigationLink_1fd8o_1[data-active][data-hovered],._navigationLink_1fd8o_1[data-active]:hover{background-color:var(--midas-navigation-link-background-selected-hover)}._navigationLink_1fd8o_1[data-disabled],._navigationLink_1fd8o_1:disabled{cursor:not-allowed}._navigationLink_1fd8o_1._sidebar_1fd8o_36{box-sizing:border-box;padding:var(--midas-space-50) var(--midas-space-small);flex-direction:row;justify-content:flex-start;align-items:flex-start;width:100%;padding-inline-start:var(--midas-space-30)}._navigationLink_1fd8o_1._sidebar_1fd8o_36[data-active]{border-color:var(--midas-border-color-tertiary);font-weight:var(--midas-typography-weight-medium)}._navigationLink_1fd8o_1._sidebar_1fd8o_36._collapsed_1fd8o_50{width:100%}._navigationLink_1fd8o_1._navbar_1fd8o_55{border-left:0;border-top:var(--midas-size-10) solid transparent;font-size:var(--midas-typography-font-size-10);gap:var(--midas-space-xsmall);padding:var(--midas-space-small)}._navigationLink_1fd8o_1._navbar_1fd8o_55[data-hovered]:not(:disabled,[data-disabled]),._navigationLink_1fd8o_1._navbar_1fd8o_55:hover:not(:disabled,[data-disabled]){font-weight:var(--midas-typography-weight-medium)}._navigationLink_1fd8o_1._navbar_1fd8o_55[data-active]{border-color:var(--midas-border-color-tertiary);color:var(--midas-text-primary);font-weight:var(--midas-typography-weight-medium)}._navigationLink_1fd8o_1._navbar_1fd8o_55[data-active] svg{color:var(--midas-icon-primary)}._navigationLink_1fd8o_1 svg{height:var(--midas-size-90);width:var(--midas-size-90);flex-shrink:0}._navigationLink_1fd8o_1 ._title_1fd8o_84{max-width:100%;transition:max-width var(--midas-transition-duration-fast) ease-out;overflow:hidden}._navigationLink_1fd8o_1._collapsed_1fd8o_50 ._title_1fd8o_84{white-space:nowrap;max-width:0}[data-transitioning] ._navigationLink_1fd8o_1 ._title_1fd8o_84{white-space:nowrap}@media (prefers-reduced-motion:reduce){._navigationLink_1fd8o_1 ._title_1fd8o_84{transition:none}}._navigationSection_1ae77_1{margin:0 0 1rem;padding:0}._navigationSection_1ae77_1._collapsed_1ae77_5{margin-bottom:0}._navigationSubMenu_vfyl6_1{margin:0 0 1rem 1rem;padding:0}._navigationSubMenu_vfyl6_1._collapsed_vfyl6_5{margin-left:0}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { createContext as n } from "react";
|
|
5
|
+
import '../assets/navbar.css';//#region src/navbar/NavbarContext.tsx
|
|
6
|
+
var r = n(void 0), i = { navbar: "_navbar_yoqje_1" }, a = ({ className: n, children: a, ...o }) => /* @__PURE__ */ t("footer", {
|
|
7
|
+
className: e(n, i.navbar),
|
|
8
|
+
...o,
|
|
9
|
+
children: /* @__PURE__ */ t(r.Provider, {
|
|
10
|
+
value: {},
|
|
11
|
+
children: a
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { r as n, a as t };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
3
|
+
import { r as t } from "./header-5ItL8E3-.js";
|
|
4
|
+
import { n } from "./sidebar-B59uaWIo.js";
|
|
5
|
+
import { n as r } from "./navbar-DWupsHC1.js";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
import { useContext as o } from "react";
|
|
8
|
+
import { Collection as s, Focusable as c, Link as l, OverlayTriggerStateContext as u } from "react-aria-components";
|
|
9
|
+
import { Text as d, Tooltip as f, TooltipTrigger as p, clsx as m } from "@midas-ds/components";
|
|
10
|
+
import '../assets/navigation.css';var h = { rootList: "_rootList_l3v98_1" }, g = ({ className: e, items: t, children: n, dependencies: r, idScope: a, addIdAndValue: o, ...c }) => /* @__PURE__ */ i("nav", {
|
|
11
|
+
className: e,
|
|
12
|
+
...c,
|
|
13
|
+
children: /* @__PURE__ */ i("ul", {
|
|
14
|
+
className: h.rootList,
|
|
15
|
+
children: /* @__PURE__ */ i(s, {
|
|
16
|
+
items: t,
|
|
17
|
+
children: n,
|
|
18
|
+
dependencies: r,
|
|
19
|
+
idScope: a,
|
|
20
|
+
addIdAndValue: o
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
}), _ = {
|
|
24
|
+
navigationHeader: "_navigationHeader_18u5f_1",
|
|
25
|
+
collapsed: "_collapsed_18u5f_7"
|
|
26
|
+
}, v = ({ className: e, ...t }) => {
|
|
27
|
+
let r = o(n);
|
|
28
|
+
return /* @__PURE__ */ i(d, {
|
|
29
|
+
className: m(e, _.navigationHeader, { [_.collapsed]: r?.isCollapsed }),
|
|
30
|
+
...t
|
|
31
|
+
});
|
|
32
|
+
}, y = { navigationItem: "_navigationItem_1jt2l_1" }, b = ({ className: t, ...r }) => {
|
|
33
|
+
let a = o(n);
|
|
34
|
+
return /* @__PURE__ */ i("li", {
|
|
35
|
+
className: e(t, y.navigationItem, { [y.collapsed]: a?.isCollapsed }),
|
|
36
|
+
...r
|
|
37
|
+
});
|
|
38
|
+
}, x = {
|
|
39
|
+
navigationLink: "_navigationLink_1fd8o_1",
|
|
40
|
+
sidebar: "_sidebar_1fd8o_36",
|
|
41
|
+
collapsed: "_collapsed_1fd8o_50",
|
|
42
|
+
navbar: "_navbar_1fd8o_55",
|
|
43
|
+
title: "_title_1fd8o_84"
|
|
44
|
+
}, S = ({ as: e, children: s, className: d, isActive: h, isDisabled: g, icon: _, "aria-label": v, ...y }) => {
|
|
45
|
+
let b = o(t), S = o(n), C = o(r), w = S?.isCollapsed, T = o(u), E = e || l, D = () => {
|
|
46
|
+
T?.isOpen && T?.setOpen(!1);
|
|
47
|
+
}, O = typeof s == "string" ? s : void 0;
|
|
48
|
+
return !O && !v && process.env.NODE_ENV !== "production" && console.warn("An 'aria-label' is required for <NavigationLink> elements with non plain text children"), /* @__PURE__ */ a(p, {
|
|
49
|
+
isDisabled: !w || !O && !v,
|
|
50
|
+
children: [/* @__PURE__ */ i(c, { children: /* @__PURE__ */ a(E, {
|
|
51
|
+
"aria-current": h && "page",
|
|
52
|
+
"aria-label": v || (w ? O : void 0),
|
|
53
|
+
className: m(d, x.navigationLink, {
|
|
54
|
+
[x.sidebar]: S || b,
|
|
55
|
+
[x.navbar]: C,
|
|
56
|
+
[x.collapsed]: w
|
|
57
|
+
}),
|
|
58
|
+
"aria-disabled": g || void 0,
|
|
59
|
+
"data-active": h || void 0,
|
|
60
|
+
"data-disabled": g || void 0,
|
|
61
|
+
...e ? {
|
|
62
|
+
tabIndex: g ? -1 : void 0,
|
|
63
|
+
onClick: (e) => {
|
|
64
|
+
if (g) {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
D(), y.onClick?.(e);
|
|
69
|
+
}
|
|
70
|
+
} : {
|
|
71
|
+
isDisabled: g,
|
|
72
|
+
onPress: (e) => {
|
|
73
|
+
D(), y.onPress?.(e);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
...y,
|
|
77
|
+
children: [_, /* @__PURE__ */ i("span", {
|
|
78
|
+
className: x.title,
|
|
79
|
+
children: s
|
|
80
|
+
})]
|
|
81
|
+
}) }), /* @__PURE__ */ i(f, {
|
|
82
|
+
placement: "right",
|
|
83
|
+
children: O
|
|
84
|
+
})]
|
|
85
|
+
});
|
|
86
|
+
}, C = {
|
|
87
|
+
navigationSection: "_navigationSection_1ae77_1",
|
|
88
|
+
collapsed: "_collapsed_1ae77_5"
|
|
89
|
+
}, w = ({ className: t, title: r, ...c }) => {
|
|
90
|
+
let l = o(n);
|
|
91
|
+
return /* @__PURE__ */ a(b, { children: [r && /* @__PURE__ */ i(v, { children: r }), /* @__PURE__ */ i("ul", {
|
|
92
|
+
className: e(t, C.navigationSection, { [C.collapsed]: l?.isCollapsed }),
|
|
93
|
+
children: /* @__PURE__ */ i(s, { ...c })
|
|
94
|
+
})] });
|
|
95
|
+
}, T = {
|
|
96
|
+
navigationSubMenu: "_navigationSubMenu_vfyl6_1",
|
|
97
|
+
collapsed: "_collapsed_vfyl6_5"
|
|
98
|
+
}, E = ({ className: t, children: r, items: a, ...c }) => {
|
|
99
|
+
let l = o(n), { length: u } = Array.from(a || []);
|
|
100
|
+
return typeof r == "function" && u === 0 ? null : /* @__PURE__ */ i("ul", {
|
|
101
|
+
className: e(t, T.navigationSubMenu, { [T.collapsed]: l?.isCollapsed }),
|
|
102
|
+
children: /* @__PURE__ */ i(s, {
|
|
103
|
+
items: a,
|
|
104
|
+
...c,
|
|
105
|
+
children: r
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
export { v as a, b as i, w as n, g as o, S as r, E as t };
|
package/index.js
CHANGED
|
@@ -3,6 +3,6 @@ import { n as s, t as c } from "./chunks/sidebar-B59uaWIo.js";
|
|
|
3
3
|
import { a as l, c as u, i as d, l as f, n as p, o as m, r as h, s as g, t as _, u as v } from "./chunks/panel-C16S0Sww.js";
|
|
4
4
|
import { n as y, t as b } from "./chunks/layout-4Fc6PGCm.js";
|
|
5
5
|
import { t as x } from "./chunks/main-C-aHrwYe.js";
|
|
6
|
-
import { a as S, i as C, n as w, o as T, r as E, t as D } from "./chunks/navigation-
|
|
7
|
-
import {
|
|
8
|
-
export { o as Header, r as HeaderAction, a as HeaderActions, e as HeaderLogo, t as HeaderTitle, y as Layout, b as LayoutContent, x as Main, n as MobileMenu, i as MobileMenuContext,
|
|
6
|
+
import { a as S, i as C, n as w, o as T, r as E, t as D } from "./chunks/navigation-HpT2Dwfd.js";
|
|
7
|
+
import { n as O, t as k } from "./chunks/navbar-DWupsHC1.js";
|
|
8
|
+
export { o as Header, r as HeaderAction, a as HeaderActions, e as HeaderLogo, t as HeaderTitle, y as Layout, b as LayoutContent, x as Main, n as MobileMenu, i as MobileMenuContext, k as Navbar, O as NavbarContext, T as Navigation, S as NavigationHeader, C as NavigationItem, E as NavigationLink, w as NavigationSection, D as NavigationSubMenu, m as Panel, v as PanelBody, f as PanelContent, d as PanelContext, u as PanelHeader, h as PanelProvider, _ as PanelRegion, g as PanelTitle, c as Sidebar, s as SidebarContext, l as UsePanels, p as usePanels };
|
package/navbar/Navbar.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
2
|
export type NavbarProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
3
|
-
export declare const Navbar: ({ className, ...rest }: NavbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const Navbar: ({ className, children, ...rest }: NavbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { Navbar } from './Navbar';
|
|
3
3
|
type Story = StoryObj<typeof Navbar>;
|
|
4
4
|
declare const _default: {
|
|
5
|
-
component: ({ className, ...rest }: import('./Navbar').NavbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ className, children, ...rest }: import('./Navbar').NavbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
title: string;
|
|
7
7
|
tags: string[];
|
|
8
8
|
parameters: {
|
|
@@ -20,3 +20,4 @@ declare const _default: {
|
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
22
22
|
export declare const Primary: Story;
|
|
23
|
+
export declare const FiveItems: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NavbarContext: import('react').Context<object | undefined>;
|
package/navbar/index.d.ts
CHANGED
package/navbar/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { n as e, t } from "../chunks/navbar-DWupsHC1.js";
|
|
2
|
+
export { t as Navbar, e as NavbarContext };
|
package/navigation/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/navigation-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/navigation-HpT2Dwfd.js";
|
|
2
2
|
export { r as Navigation, e as NavigationHeader, t as NavigationItem, i as NavigationLink, n as NavigationSection, a as NavigationSubMenu };
|
|
@@ -6,7 +6,7 @@ export interface NavigationLinkComponentProps<C extends ElementType> {
|
|
|
6
6
|
/** The icon to display. */
|
|
7
7
|
icon: ReactNode;
|
|
8
8
|
isActive?: boolean;
|
|
9
|
-
|
|
9
|
+
isDisabled?: boolean;
|
|
10
10
|
className?: string;
|
|
11
11
|
/** Replace base component with any Client Side Routing link instead.
|
|
12
12
|
* @see {@link https://designsystem.migrationsverket.se/dev/client-side-routing/|Client side routing}
|
|
@@ -14,4 +14,4 @@ export interface NavigationLinkComponentProps<C extends ElementType> {
|
|
|
14
14
|
as?: C;
|
|
15
15
|
}
|
|
16
16
|
export type NavigationLinkProps<C extends ElementType> = NavigationLinkComponentProps<C> & Omit<ComponentProps<C>, keyof NavigationLinkComponentProps<C>>;
|
|
17
|
-
export declare const NavigationLink: <C extends ElementType = typeof Link>({ as, children, className, isActive, icon, "aria-label": ariaLabel, ...rest }: NavigationLinkProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const NavigationLink: <C extends ElementType = typeof Link>({ as, children, className, isActive, isDisabled, icon, "aria-label": ariaLabel, ...rest }: NavigationLinkProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { NavigationLink } from '.';
|
|
3
3
|
type Story = StoryObj<typeof NavigationLink>;
|
|
4
4
|
declare const _default: {
|
|
5
|
-
component: <C extends import('react').ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null>({ as, children, className, isActive, icon, "aria-label": ariaLabel, ...rest }: import('./NavigationLink').NavigationLinkProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: <C extends import('react').ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null>({ as, children, className, isActive, isDisabled, icon, "aria-label": ariaLabel, ...rest }: import('./NavigationLink').NavigationLinkProps<C>) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
title: string;
|
|
7
7
|
tags: string[];
|
|
8
8
|
args: {
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Midas Layout components",
|
|
15
15
|
"homepage": "https://designsystem.migrationsverket.se/",
|
|
16
16
|
"license": "CC0-1.0",
|
|
17
|
-
"version": "0.2.
|
|
17
|
+
"version": "0.2.27",
|
|
18
18
|
"module": "./index.js",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"main": "./index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"./*": "./*/index.js"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@midas-ds/components": "17.23.
|
|
40
|
+
"@midas-ds/components": "17.23.3",
|
|
41
41
|
"@react-aria/collections": "^3.0.3",
|
|
42
42
|
"@react-aria/utils": "^3.33.1",
|
|
43
43
|
"@react-stately/utils": "^3.11.0"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
2
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import '../assets/navbar.css';var n = { navbar: "_navbar_ul0t3_1" }, r = ({ className: r, ...i }) => /* @__PURE__ */ t("footer", {
|
|
4
|
-
className: e(r, n.navbar),
|
|
5
|
-
...i
|
|
6
|
-
});
|
|
7
|
-
//#endregion
|
|
8
|
-
export { r as t };
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
3
|
-
import { r as t } from "./header-5ItL8E3-.js";
|
|
4
|
-
import { n } from "./sidebar-B59uaWIo.js";
|
|
5
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
-
import { useContext as a } from "react";
|
|
7
|
-
import { Collection as o, Focusable as s, Link as c, OverlayTriggerStateContext as l } from "react-aria-components";
|
|
8
|
-
import { Text as u, Tooltip as d, TooltipTrigger as f, clsx as p } from "@midas-ds/components";
|
|
9
|
-
import '../assets/navigation.css';var m = { rootList: "_rootList_l3v98_1" }, h = ({ className: e, items: t, children: n, dependencies: i, idScope: a, addIdAndValue: s, ...c }) => /* @__PURE__ */ r("nav", {
|
|
10
|
-
className: e,
|
|
11
|
-
...c,
|
|
12
|
-
children: /* @__PURE__ */ r("ul", {
|
|
13
|
-
className: m.rootList,
|
|
14
|
-
children: /* @__PURE__ */ r(o, {
|
|
15
|
-
items: t,
|
|
16
|
-
children: n,
|
|
17
|
-
dependencies: i,
|
|
18
|
-
idScope: a,
|
|
19
|
-
addIdAndValue: s
|
|
20
|
-
})
|
|
21
|
-
})
|
|
22
|
-
}), g = {
|
|
23
|
-
navigationHeader: "_navigationHeader_18u5f_1",
|
|
24
|
-
collapsed: "_collapsed_18u5f_7"
|
|
25
|
-
}, _ = ({ className: e, ...t }) => {
|
|
26
|
-
let i = a(n);
|
|
27
|
-
return /* @__PURE__ */ r(u, {
|
|
28
|
-
className: p(e, g.navigationHeader, { [g.collapsed]: i?.isCollapsed }),
|
|
29
|
-
...t
|
|
30
|
-
});
|
|
31
|
-
}, v = { navigationItem: "_navigationItem_1jt2l_1" }, y = ({ className: t, ...i }) => {
|
|
32
|
-
let o = a(n);
|
|
33
|
-
return /* @__PURE__ */ r("li", {
|
|
34
|
-
className: e(t, v.navigationItem, { [v.collapsed]: o?.isCollapsed }),
|
|
35
|
-
...i
|
|
36
|
-
});
|
|
37
|
-
}, b = {
|
|
38
|
-
navigationLink: "_navigationLink_1kvxy_1",
|
|
39
|
-
sidebar: "_sidebar_1kvxy_29",
|
|
40
|
-
collapsed: "_collapsed_1kvxy_43",
|
|
41
|
-
title: "_title_1kvxy_54"
|
|
42
|
-
}, x = ({ as: e, children: o, className: u, isActive: m, icon: h, "aria-label": g, ..._ }) => {
|
|
43
|
-
let v = a(t), y = a(n), x = y?.isCollapsed, S = a(l), C = e || c, w = () => {
|
|
44
|
-
S?.isOpen && S?.setOpen(!1);
|
|
45
|
-
}, T = typeof o == "string" ? o : void 0;
|
|
46
|
-
return !T && !g && process.env.NODE_ENV !== "production" && console.warn("An 'aria-label' is required for <NavigationLink> elements with non plain text children"), /* @__PURE__ */ i(f, {
|
|
47
|
-
isDisabled: !x || !T && !g,
|
|
48
|
-
children: [/* @__PURE__ */ r(s, { children: /* @__PURE__ */ i(C, {
|
|
49
|
-
"aria-current": m && "page",
|
|
50
|
-
"aria-label": g || (x ? T : void 0),
|
|
51
|
-
className: p(u, b.navigationLink, {
|
|
52
|
-
[b.sidebar]: y || v,
|
|
53
|
-
[b.collapsed]: x
|
|
54
|
-
}),
|
|
55
|
-
"data-active": m || void 0,
|
|
56
|
-
...e ? { onClick: (e) => {
|
|
57
|
-
w(), _.onClick?.(e);
|
|
58
|
-
} } : { onPress: (e) => {
|
|
59
|
-
w(), _.onPress?.(e);
|
|
60
|
-
} },
|
|
61
|
-
..._,
|
|
62
|
-
children: [h, /* @__PURE__ */ r("span", {
|
|
63
|
-
className: b.title,
|
|
64
|
-
children: o
|
|
65
|
-
})]
|
|
66
|
-
}) }), /* @__PURE__ */ r(d, {
|
|
67
|
-
placement: "right",
|
|
68
|
-
children: T
|
|
69
|
-
})]
|
|
70
|
-
});
|
|
71
|
-
}, S = {
|
|
72
|
-
navigationSection: "_navigationSection_1ae77_1",
|
|
73
|
-
collapsed: "_collapsed_1ae77_5"
|
|
74
|
-
}, C = ({ className: t, title: s, ...c }) => {
|
|
75
|
-
let l = a(n);
|
|
76
|
-
return /* @__PURE__ */ i(y, { children: [s && /* @__PURE__ */ r(_, { children: s }), /* @__PURE__ */ r("ul", {
|
|
77
|
-
className: e(t, S.navigationSection, { [S.collapsed]: l?.isCollapsed }),
|
|
78
|
-
children: /* @__PURE__ */ r(o, { ...c })
|
|
79
|
-
})] });
|
|
80
|
-
}, w = {
|
|
81
|
-
navigationSubMenu: "_navigationSubMenu_vfyl6_1",
|
|
82
|
-
collapsed: "_collapsed_vfyl6_5"
|
|
83
|
-
}, T = ({ className: t, children: i, items: s, ...c }) => {
|
|
84
|
-
let l = a(n), { length: u } = Array.from(s || []);
|
|
85
|
-
return typeof i == "function" && u === 0 ? null : /* @__PURE__ */ r("ul", {
|
|
86
|
-
className: e(t, w.navigationSubMenu, { [w.collapsed]: l?.isCollapsed }),
|
|
87
|
-
children: /* @__PURE__ */ r(o, {
|
|
88
|
-
items: s,
|
|
89
|
-
...c,
|
|
90
|
-
children: i
|
|
91
|
-
})
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
//#endregion
|
|
95
|
-
export { _ as a, y as i, C as n, h as o, x as r, T as t };
|