@midas-ds/components 17.2.5 → 17.2.6
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 +6 -0
- package/assets/Layout.css +1 -1
- package/chunks/{Layout-CFhqS9ej.js → Layout-BclBqFzc.js} +133 -133
- package/index.js +2 -2
- package/layout/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/assets/Layout.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._baseLayout_1ylxx_1{--sideBarWidth: 230px;--headerHeight: 69px}@media(min-width:1024px){._baseLayout_1ylxx_1{--headerHeight: 85px}}._mainContent_1ylxx_10{display:flex;flex-direction:row}._header_1ylxx_15{position:sticky;top:0;font-family:var(--midas-typography-font-family);padding:.5rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--midas-border-color-subtle);background-color:var(--midas-background-base)}._header_1ylxx_15._headerExternal_1ylxx_26{padding:1rem}@media(min-width:1024px){._header_1ylxx_15._headerExternal_1ylxx_26{padding:1.25rem 1rem;z-index:3}}@media(min-width:1024px){._header_1ylxx_15{padding:1.25rem 1rem;z-index:calc(var(--midas-z-index-sidebar) + var(--midas-z-index-above))}}._headerContent_1ylxx_41{display:flex;flex-flow:row wrap;align-items:center;gap:1rem}._headerContent_1ylxx_41>svg{display:none}@media(min-width:1024px){._headerContent_1ylxx_41{gap:2rem}._headerContent_1ylxx_41>svg{display:initial}}._logo_1ylxx_60{display:none;max-height:40px}@media(min-width:1024px){._logo_1ylxx_60{display:flex}}._headerItems_1ylxx_69{max-height:40px;display:flex;flex-direction:row}._toggleButton_1ylxx_75{display:block}@media(min-width:1024px){._toggleButton_1ylxx_75{display:none!important}}._sidebar_1ylxx_83{font-family:var(--midas-typography-font-family);background-color:var(--midas-background-base);display:flex;flex-flow:column;flex:0 0 var(--sideBarWidth);overflow-y:auto;transition:.2s;position:fixed;top:0;height:100vh;width:var(--sideBarWidth);transform:translate(calc(var(--sideBarWidth) * -1));z-index:calc(var(--midas-z-index-sidebar));border-right:1px solid var(--midas-border-color-subtle)}@media(min-width:1024px){._sidebar_1ylxx_83{position:sticky;top:var(--headerHeight);align-self:start;height:calc(100vh - var(--headerHeight));transform:none;width:var(--sideBarWidth)}}._main_1ylxx_10{font-family:var(--midas-typography-font-family);flex:0 0 auto;width:100%;min-height:100%}._app_1ylxx_116{background-clip:content-box}@media(min-width:1024px){._app_1ylxx_116{padding:2rem}}._sidebarOpened_1ylxx_124{transform:translate(0)}._sidebarHeader_1ylxx_128{padding:1rem;margin-bottom:1rem;position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:.5rem;overflow:hidden}._appName_1ylxx_140{color:var(--midas-text-primary);font-size:.875rem;font-weight:400;margin:0}._collapseButton_1ylxx_147{display:none!important;padding:calc(.875rem - 1px)!important}@media(min-width:1024px){._collapseButton_1ylxx_147{display:flex!important}}._sidebarCollapsed_1ylxx_156{--sideBarWidth: 68px;transition:all .2s ease-out}._sidebarCollapsed_1ylxx_156 ._sidebarHeader_1ylxx_128{justify-content:center}._userName_1ylxx_166{color:var(--midas-text-primary);margin:0 0 .25rem;font-size:.875rem;font-weight:500;display:none}@media(min-width:1024px){._userName_1ylxx_166{display:block}}._abbr_1ylxx_178{font-size:.875rem;font-weight:500;align-self:center}._userTitle_1ylxx_184{color:var(--midas-text-primary);margin:0;font-size:.875rem;font-weight:400;display:none}@media(min-width:1024px){._userTitle_1ylxx_184{display:block}}._title_1ylxx_196{margin:0;font-size:1rem;font-weight:500;display:block}@media(min-width:1024px){._title_1ylxx_196{display:none}}._sidebarNav_1ylxx_207{padding:.5rem;overflow-y:auto;margin-bottom:auto}._list_1ylxx_213{list-style-type:none;padding:0;margin:0 0 1rem}._listGroupTitle_1ylxx_219{color:var(--midas-text-secondary);font-size:.875rem;padding:.5rem;margin:0}._listItem_1ylxx_226{display:flex;position:relative}._listItemCollapsed_1ylxx_231{justify-content:center}._listLink_1ylxx_235{all:unset;display:flex;align-items:center;gap:.5rem;padding:.625rem .5rem;color:var(--midas-text-primary);flex:1 0 0%;transition:.1s;text-decoration:none}._listLink_1ylxx_235 svg{stroke:var(--midas-icon-primary)}@media(forced-colors:active){._listLink_1ylxx_235 svg{stroke:currentColor}}._listLink_1ylxx_235[data-hovered],._listLink_1ylxx_235:visited{background-color:var(--midas-menu-item-background-hover);color:var(--midas-text-primary);cursor:pointer}:is(._listLink_1ylxx_235[data-hovered],._listLink_1ylxx_235:visited) svg{stroke:var(--midas-icon-primary);min-width:1.25rem}@media(forced-colors:active){:is(._listLink_1ylxx_235[data-hovered],._listLink_1ylxx_235:visited) svg{stroke:currentColor}}@media(forced-colors:active){._listLink_1ylxx_235[data-hovered],._listLink_1ylxx_235:visited{background-color:inherit;text-decoration:underline}}._listLink_1ylxx_235[data-pressed]{background-color:var(--midas-button-background-tertiary-active)}._listLink_1ylxx_235[data-focused]{box-shadow:none}._listLink_1ylxx_235:focus-visible{outline:none}._listLink_1ylxx_235[data-focus-visible]{box-shadow:var(--midas-state-focus);outline:none}@media(forced-colors:active){._listLink_1ylxx_235[data-focus-visible]{outline:var(--midas-state-focus-contrast-mode-outline) solid;outline-offset:var(--midas-state-focus-contrast-mode-offset)}}._listLinkCollapsed_1ylxx_298{padding:.625rem;flex-grow:unset}._active_1ylxx_303{background-color:var(--midas-menu-item-background-selected);color:var(--midas-text-primary);border-left:.125rem solid var(--midas-border-color-tertiary);font-weight:var(--midas-typography-weight-medium)}@media(forced-colors:active){._active_1ylxx_303{transition:none}}._linkText_1ylxx_314{opacity:1;display:block;transition:all .2s;transition-behavior:allow-discrete}._backdrop_1ylxx_321{pointer-events:none;display:none;position:fixed;inset:0;background-color:#3232327f;opacity:0;transition:all .1s;transition-behavior:allow-discrete}._backdrop_1ylxx_321._backdropOpened_1ylxx_331{pointer-events:all;opacity:1;display:block;transition:all .2s}@starting-style{._backdrop_1ylxx_321._backdropOpened_1ylxx_331,._linkText_1ylxx_314{opacity:0}}._skipToContent_1ylxx_349{position:absolute;top:0;right:100%;z-index:var(--midas-z-index-skip-to-content)}._skipToContent_1ylxx_349[data-focus-visible],._skipToContent_1ylxx_349:focus-visible{right:auto;left:5px;top:5px}._navbar_1ylxx_363{position:fixed;bottom:0;width:100%;font-family:var(--midas-typography-font-family);display:flex;align-items:center;justify-content:center;border-top:1px solid var(--midas-border-color-subtle);background-color:var(--midas-background-base)}._navbarList_1ylxx_375{flex:1;list-style-type:none;margin:0;padding:0;display:flex;flex-direction:row;align-items:stretch}._navbarList_1ylxx_375>li{flex:1;width:100%;display:flex;justify-content:center;align-items:stretch}@media(min-width:1024px){._navbarList_1ylxx_375{max-width:600px}}._navbarItem_1ylxx_397{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem;padding:.5rem;color:var(--midas-text-primary);text-decoration:none;font-size:var(--midas-typography-font-size-10);line-height:var(--midas-typography-line-height-20);text-align:center;text-wrap:nowrap;text-overflow:ellipsis}._navbarItem_1ylxx_397[data-hovered],._navbarItem_1ylxx_397[data-active]{background-color:var(--midas-button-background-primary-base);color:var(--midas-text-on-color);cursor:pointer}@media(forced-colors:active){._navbarItem_1ylxx_397[data-hovered],._navbarItem_1ylxx_397[data-active]{text-decoration:underline}}@media(forced-colors:active){._navbarItem_1ylxx_397[data-focus-visible]{outline:var(--midas-state-focus-contrast-mode-outline) solid;outline-offset:var(--midas-state-focus-contrast-mode-offset)}}._navbarItem_1ylxx_397 svg{flex:0 0 auto}@media(min-width:1024px){._navbarItem_1ylxx_397{gap:.5rem;flex-direction:row;padding:1rem .5rem}}@media(max-width:479px){._headerExternal_1ylxx_26{border:none}}._headerContentExternal_1ylxx_448{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:1rem}._headerContentExternal_1ylxx_448 ._logoExternalContainer_1ylxx_456{display:flex;align-items:center;gap:2rem}@media(min-width:1024px){._headerContentExternal_1ylxx_448 ._logoExternal_1ylxx_456{display:none}}._headerContentExternal_1ylxx_448 ._logoExternalDesktop_1ylxx_468{display:none}@media(min-width:1024px){._headerContentExternal_1ylxx_448 ._logoExternalDesktop_1ylxx_468{display:block}}@media(min-width:1024px){._navbarWrapper_1ylxx_477{display:none}}@media(prefers-reduced-motion){._sidebar_1ylxx_83,._sidebarCollapsed_1ylxx_156,._listLink_1ylxx_235,._linkText_1ylxx_314,._backdrop_1ylxx_321,._backdrop_1ylxx_321._backdropOpened_1ylxx_331{transition:none}@starting-style{._backdrop_1ylxx_321._backdropOpened_1ylxx_331,._linkText_1ylxx_314{opacity:1}}}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as e, jsxs as o, Fragment as G } from "react/jsx-runtime";
|
|
3
3
|
import { G as z } from "./GridItem-z7zclNdT.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as y from "react";
|
|
5
5
|
import { useState as W, useEffect as j } from "react";
|
|
6
6
|
import { c as b } from "./clsx-AexbMWKp.js";
|
|
7
|
-
import { Link as
|
|
7
|
+
import { Link as L, RouterProvider as w } from "react-aria-components";
|
|
8
8
|
import { B as E } from "./Button-CaLOUTDO.js";
|
|
9
9
|
import { a as D, T as q } from "./Tooltip-rDmOkGmX.js";
|
|
10
10
|
import { a as I, B as M } from "./BadgeContainer-CKVsfTlF.js";
|
|
11
11
|
import { c as T } from "./createLucideIcon-CP-mMPfa.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as f } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
13
13
|
import { variables as A } from "@midas-ds/theme";
|
|
14
|
-
import { L } from "./Logo-CCxPAmgw.js";
|
|
14
|
+
import { L as g } from "./Logo-CCxPAmgw.js";
|
|
15
15
|
import { X as R } from "./x-B9bYxG31.js";
|
|
16
16
|
import '../assets/Layout.css';const $ = [
|
|
17
17
|
["path", { d: "M4 5h16", key: "1tepv9" }],
|
|
@@ -27,15 +27,15 @@ const K = [
|
|
|
27
27
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
28
28
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
29
29
|
["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
|
|
30
|
-
], Q = T("panel-left-open", K), U = "
|
|
30
|
+
], Q = T("panel-left-open", K), U = "_baseLayout_1ylxx_1", V = "_mainContent_1ylxx_10", Y = "_header_1ylxx_15", Z = "_headerExternal_1ylxx_26", ee = "_headerContent_1ylxx_41", ae = "_logo_1ylxx_60", te = "_headerItems_1ylxx_69", ne = "_toggleButton_1ylxx_75", se = "_sidebar_1ylxx_83", ie = "_main_1ylxx_10", re = "_app_1ylxx_116", oe = "_sidebarOpened_1ylxx_124", le = "_sidebarHeader_1ylxx_128", de = "_appName_1ylxx_140", ce = "_collapseButton_1ylxx_147", me = "_sidebarCollapsed_1ylxx_156", pe = "_userName_1ylxx_166", _e = "_userTitle_1ylxx_184", xe = "_title_1ylxx_196", he = "_sidebarNav_1ylxx_207", ue = "_list_1ylxx_213", be = "_listGroupTitle_1ylxx_219", ve = "_listItem_1ylxx_226", ye = "_listItemCollapsed_1ylxx_231", Ne = "_listLink_1ylxx_235", fe = "_listLinkCollapsed_1ylxx_298", ke = "_active_1ylxx_303", Ce = "_backdrop_1ylxx_321", ge = "_backdropOpened_1ylxx_331", Le = "_skipToContent_1ylxx_349", Ie = "_navbar_1ylxx_363", Me = "_navbarList_1ylxx_375", Ee = "_navbarItem_1ylxx_397", Te = "_headerContentExternal_1ylxx_448", Se = "_logoExternalContainer_1ylxx_456", ze = "_logoExternal_1ylxx_456", Be = "_logoExternalDesktop_1ylxx_468", Oe = "_navbarWrapper_1ylxx_477", a = {
|
|
31
31
|
baseLayout: U,
|
|
32
32
|
mainContent: V,
|
|
33
33
|
header: Y,
|
|
34
34
|
headerExternal: Z,
|
|
35
35
|
headerContent: ee,
|
|
36
|
-
logo:
|
|
37
|
-
headerItems:
|
|
38
|
-
toggleButton:
|
|
36
|
+
logo: ae,
|
|
37
|
+
headerItems: te,
|
|
38
|
+
toggleButton: ne,
|
|
39
39
|
sidebar: se,
|
|
40
40
|
main: ie,
|
|
41
41
|
app: re,
|
|
@@ -46,18 +46,18 @@ const K = [
|
|
|
46
46
|
sidebarCollapsed: me,
|
|
47
47
|
userName: pe,
|
|
48
48
|
userTitle: _e,
|
|
49
|
-
title:
|
|
49
|
+
title: xe,
|
|
50
50
|
sidebarNav: he,
|
|
51
51
|
list: ue,
|
|
52
52
|
listGroupTitle: be,
|
|
53
|
-
listItem:
|
|
54
|
-
listItemCollapsed:
|
|
55
|
-
listLink:
|
|
56
|
-
listLinkCollapsed:
|
|
57
|
-
active:
|
|
58
|
-
backdrop:
|
|
59
|
-
backdropOpened:
|
|
60
|
-
skipToContent:
|
|
53
|
+
listItem: ve,
|
|
54
|
+
listItemCollapsed: ye,
|
|
55
|
+
listLink: Ne,
|
|
56
|
+
listLinkCollapsed: fe,
|
|
57
|
+
active: ke,
|
|
58
|
+
backdrop: Ce,
|
|
59
|
+
backdropOpened: ge,
|
|
60
|
+
skipToContent: Le,
|
|
61
61
|
navbar: Ie,
|
|
62
62
|
navbarList: Me,
|
|
63
63
|
navbarItem: Ee,
|
|
@@ -66,36 +66,36 @@ const K = [
|
|
|
66
66
|
logoExternal: ze,
|
|
67
67
|
logoExternalDesktop: Be,
|
|
68
68
|
navbarWrapper: Oe
|
|
69
|
-
}, P =
|
|
69
|
+
}, P = y.createContext(
|
|
70
70
|
void 0
|
|
71
71
|
), we = ({
|
|
72
|
-
items:
|
|
73
|
-
title:
|
|
72
|
+
items: t,
|
|
73
|
+
title: n,
|
|
74
74
|
user: r,
|
|
75
75
|
app: i,
|
|
76
76
|
children: s,
|
|
77
77
|
clientSideRouter: p,
|
|
78
78
|
clientSideHref: d,
|
|
79
|
-
headerChildren:
|
|
79
|
+
headerChildren: x,
|
|
80
80
|
isCollapsed: _,
|
|
81
81
|
setIsCollapsed: m,
|
|
82
82
|
isOpened: h,
|
|
83
|
-
setIsOpened:
|
|
83
|
+
setIsOpened: v,
|
|
84
84
|
variant: l,
|
|
85
85
|
id: u
|
|
86
86
|
}) => /* @__PURE__ */ e(
|
|
87
87
|
P.Provider,
|
|
88
88
|
{
|
|
89
89
|
value: {
|
|
90
|
-
items:
|
|
91
|
-
title:
|
|
90
|
+
items: t,
|
|
91
|
+
title: n,
|
|
92
92
|
user: r,
|
|
93
93
|
app: i,
|
|
94
|
-
headerChildren:
|
|
94
|
+
headerChildren: x,
|
|
95
95
|
isCollapsed: _,
|
|
96
96
|
setIsCollapsed: m,
|
|
97
97
|
isOpened: h,
|
|
98
|
-
setIsOpened:
|
|
98
|
+
setIsOpened: v,
|
|
99
99
|
clientSideRouter: p,
|
|
100
100
|
clientSideHref: d,
|
|
101
101
|
variant: l,
|
|
@@ -103,42 +103,42 @@ const K = [
|
|
|
103
103
|
},
|
|
104
104
|
children: s
|
|
105
105
|
}
|
|
106
|
-
),
|
|
107
|
-
const
|
|
108
|
-
if (!
|
|
106
|
+
), N = () => {
|
|
107
|
+
const t = y.useContext(P);
|
|
108
|
+
if (!t)
|
|
109
109
|
throw new Error("useLayoutContext must be used within a LayoutProvider");
|
|
110
|
-
return
|
|
110
|
+
return t;
|
|
111
111
|
}, H = ({
|
|
112
|
-
title:
|
|
113
|
-
href:
|
|
112
|
+
title: t,
|
|
113
|
+
href: n,
|
|
114
114
|
icon: r,
|
|
115
115
|
active: i,
|
|
116
116
|
hasBadge: s,
|
|
117
117
|
onClick: p
|
|
118
118
|
}) => {
|
|
119
|
-
const { isCollapsed: d, setIsOpened:
|
|
119
|
+
const { isCollapsed: d, setIsOpened: x, clientSideHref: _ } = N(), m = _ ? _(n) : n, [h, v] = W(!1);
|
|
120
120
|
j(() => {
|
|
121
121
|
if (typeof window < "u") {
|
|
122
122
|
const u = window.location.pathname === m || window.location.pathname.startsWith(m + "/");
|
|
123
|
-
|
|
123
|
+
v(i ?? u);
|
|
124
124
|
}
|
|
125
125
|
}, [i, m]);
|
|
126
126
|
const l = () => {
|
|
127
|
-
|
|
128
|
-
title:
|
|
127
|
+
x?.(!1), p && p({
|
|
128
|
+
title: t,
|
|
129
129
|
href: m
|
|
130
130
|
});
|
|
131
131
|
};
|
|
132
132
|
return d ? /* @__PURE__ */ o(D, { children: [
|
|
133
133
|
/* @__PURE__ */ e(
|
|
134
|
-
|
|
134
|
+
L,
|
|
135
135
|
{
|
|
136
|
-
href:
|
|
137
|
-
"aria-label":
|
|
136
|
+
href: n,
|
|
137
|
+
"aria-label": t,
|
|
138
138
|
className: b(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
h &&
|
|
139
|
+
a.listLink,
|
|
140
|
+
a.listLinkCollapsed,
|
|
141
|
+
h && a.active
|
|
142
142
|
),
|
|
143
143
|
onPress: l,
|
|
144
144
|
children: /* @__PURE__ */ o(I, { children: [
|
|
@@ -146,64 +146,64 @@ const K = [
|
|
|
146
146
|
r,
|
|
147
147
|
{
|
|
148
148
|
size: 20,
|
|
149
|
-
"aria-label":
|
|
149
|
+
"aria-label": t
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
152
|
s && /* @__PURE__ */ e(M, {})
|
|
153
153
|
] })
|
|
154
154
|
}
|
|
155
155
|
),
|
|
156
|
-
/* @__PURE__ */ e(q, { placement: "right", children:
|
|
156
|
+
/* @__PURE__ */ e(q, { placement: "right", children: t })
|
|
157
157
|
] }) : /* @__PURE__ */ o(
|
|
158
|
-
|
|
158
|
+
L,
|
|
159
159
|
{
|
|
160
|
-
href:
|
|
161
|
-
"aria-label":
|
|
162
|
-
className: b(
|
|
160
|
+
href: n,
|
|
161
|
+
"aria-label": t,
|
|
162
|
+
className: b(a.listLink, h && a.active),
|
|
163
163
|
onPress: l,
|
|
164
164
|
children: [
|
|
165
165
|
/* @__PURE__ */ o(I, { children: [
|
|
166
166
|
/* @__PURE__ */ e(r, { size: 20 }),
|
|
167
167
|
s && /* @__PURE__ */ e(M, {})
|
|
168
168
|
] }),
|
|
169
|
-
|
|
169
|
+
t
|
|
170
170
|
]
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
|
-
}, Pe = { closeMenu: "Close menu", openMenu: "Open menu", maximizeMenu: "Maximize menu", minimizeMenu: "Minimize menu", sidebarMenu: "Sidebar menu", bottomMenu: "Bottom menu", skipToContent: "Skip to main content" }, He = { closeMenu: "Stäng meny", openMenu: "Öppna meny", maximizeMenu: "Maximera meny", minimizeMenu: "Minimera meny", sidebarMenu: "Sidomeny", bottomMenu: "Bottenmeny", skipToContent: "Hoppa till huvudinnehåll" },
|
|
173
|
+
}, Pe = { closeMenu: "Close menu", openMenu: "Open menu", maximizeMenu: "Maximize menu", minimizeMenu: "Minimize menu", sidebarMenu: "Sidebar menu", bottomMenu: "Bottom menu", skipToContent: "Skip to main content" }, He = { closeMenu: "Stäng meny", openMenu: "Öppna meny", maximizeMenu: "Maximera meny", minimizeMenu: "Minimera meny", sidebarMenu: "Sidomeny", bottomMenu: "Bottenmeny", skipToContent: "Hoppa till huvudinnehåll" }, k = {
|
|
174
174
|
en: Pe,
|
|
175
175
|
sv: He
|
|
176
176
|
}, Ge = ({
|
|
177
|
-
onLinkClick:
|
|
177
|
+
onLinkClick: t
|
|
178
178
|
}) => {
|
|
179
179
|
const {
|
|
180
|
-
items:
|
|
180
|
+
items: n,
|
|
181
181
|
app: r,
|
|
182
182
|
isOpened: i,
|
|
183
183
|
isCollapsed: s,
|
|
184
184
|
setIsCollapsed: p,
|
|
185
185
|
setIsOpened: d,
|
|
186
|
-
clientSideRouter:
|
|
186
|
+
clientSideRouter: x,
|
|
187
187
|
clientSideHref: _,
|
|
188
188
|
id: m
|
|
189
|
-
} =
|
|
189
|
+
} = N(), h = f(k), v = ({ group: l }) => /* @__PURE__ */ e("ul", { className: a.list, children: l.items.map((u, C) => /* @__PURE__ */ e(
|
|
190
190
|
"li",
|
|
191
191
|
{
|
|
192
192
|
className: b(
|
|
193
|
-
|
|
194
|
-
s &&
|
|
193
|
+
a.listItem,
|
|
194
|
+
s && a.listItemCollapsed
|
|
195
195
|
),
|
|
196
196
|
children: /* @__PURE__ */ e(
|
|
197
197
|
H,
|
|
198
198
|
{
|
|
199
|
-
onClick:
|
|
199
|
+
onClick: t,
|
|
200
200
|
...u
|
|
201
201
|
}
|
|
202
202
|
)
|
|
203
203
|
},
|
|
204
|
-
"link_" +
|
|
204
|
+
"link_" + C
|
|
205
205
|
)) });
|
|
206
|
-
return
|
|
206
|
+
return y.useEffect(() => {
|
|
207
207
|
const l = (u) => {
|
|
208
208
|
u.key === "Escape" && d !== void 0 && d(!1);
|
|
209
209
|
};
|
|
@@ -215,20 +215,20 @@ const K = [
|
|
|
215
215
|
{
|
|
216
216
|
id: m,
|
|
217
217
|
className: b(
|
|
218
|
-
|
|
219
|
-
s &&
|
|
220
|
-
i &&
|
|
218
|
+
a.sidebar,
|
|
219
|
+
s && a.sidebarCollapsed,
|
|
220
|
+
i && a.sidebarOpened
|
|
221
221
|
),
|
|
222
222
|
children: [
|
|
223
|
-
/* @__PURE__ */ o("div", { className:
|
|
224
|
-
!s && /* @__PURE__ */ e("p", { className:
|
|
223
|
+
/* @__PURE__ */ o("div", { className: a.sidebarHeader, children: [
|
|
224
|
+
!s && /* @__PURE__ */ e("p", { className: a.appName, children: r.name }),
|
|
225
225
|
/* @__PURE__ */ e(
|
|
226
226
|
E,
|
|
227
227
|
{
|
|
228
228
|
variant: "icon",
|
|
229
229
|
"aria-label": s ? h.format("maximizeMenu") : h.format("minimizeMenu"),
|
|
230
230
|
onPress: () => p(!s),
|
|
231
|
-
className:
|
|
231
|
+
className: a.collapseButton,
|
|
232
232
|
children: s ? /* @__PURE__ */ e(Q, { size: 20 }) : /* @__PURE__ */ e(J, { size: 20 })
|
|
233
233
|
}
|
|
234
234
|
)
|
|
@@ -236,18 +236,18 @@ const K = [
|
|
|
236
236
|
/* @__PURE__ */ e(
|
|
237
237
|
"nav",
|
|
238
238
|
{
|
|
239
|
-
className:
|
|
239
|
+
className: a.sidebarNav,
|
|
240
240
|
"aria-label": h.format("sidebarMenu"),
|
|
241
|
-
children: /* @__PURE__ */ e("ul", { className:
|
|
242
|
-
l.title && !s && /* @__PURE__ */ e("p", { className:
|
|
243
|
-
|
|
241
|
+
children: /* @__PURE__ */ e("ul", { className: a.list, children: n.map((l, u) => /* @__PURE__ */ o("li", { children: [
|
|
242
|
+
l.title && !s && /* @__PURE__ */ e("p", { className: a.listGroupTitle, children: l.title }),
|
|
243
|
+
x ? /* @__PURE__ */ e(
|
|
244
244
|
w,
|
|
245
245
|
{
|
|
246
|
-
navigate:
|
|
246
|
+
navigate: x,
|
|
247
247
|
useHref: _,
|
|
248
|
-
children: /* @__PURE__ */ e(
|
|
248
|
+
children: /* @__PURE__ */ e(v, { group: l })
|
|
249
249
|
}
|
|
250
|
-
) : /* @__PURE__ */ e(
|
|
250
|
+
) : /* @__PURE__ */ e(v, { group: l })
|
|
251
251
|
] }, "list_" + u)) })
|
|
252
252
|
}
|
|
253
253
|
)
|
|
@@ -256,51 +256,51 @@ const K = [
|
|
|
256
256
|
);
|
|
257
257
|
}, We = () => {
|
|
258
258
|
const {
|
|
259
|
-
title:
|
|
260
|
-
user:
|
|
259
|
+
title: t,
|
|
260
|
+
user: n,
|
|
261
261
|
app: r,
|
|
262
262
|
isOpened: i,
|
|
263
263
|
setIsOpened: s,
|
|
264
264
|
setIsCollapsed: p,
|
|
265
265
|
headerChildren: d,
|
|
266
|
-
variant:
|
|
266
|
+
variant: x,
|
|
267
267
|
id: _
|
|
268
|
-
} =
|
|
269
|
-
return
|
|
270
|
-
/* @__PURE__ */ o("div", { className:
|
|
268
|
+
} = N(), m = f(k);
|
|
269
|
+
return x === "external" ? /* @__PURE__ */ e("header", { className: b(a.header, a.headerExternal), children: /* @__PURE__ */ o("div", { className: a.headerContentExternal, children: [
|
|
270
|
+
/* @__PURE__ */ o("div", { className: a.logoExternalContainer, children: [
|
|
271
271
|
/* @__PURE__ */ e(
|
|
272
|
-
|
|
272
|
+
g,
|
|
273
273
|
{
|
|
274
274
|
size: "x-small",
|
|
275
275
|
padding: !1,
|
|
276
|
-
className:
|
|
276
|
+
className: a.logoExternal
|
|
277
277
|
}
|
|
278
278
|
),
|
|
279
279
|
/* @__PURE__ */ e(
|
|
280
|
-
|
|
280
|
+
g,
|
|
281
281
|
{
|
|
282
282
|
size: "small",
|
|
283
283
|
padding: !1,
|
|
284
|
-
className:
|
|
284
|
+
className: a.logoExternalDesktop
|
|
285
285
|
}
|
|
286
286
|
),
|
|
287
287
|
/* @__PURE__ */ o("div", { children: [
|
|
288
|
-
/* @__PURE__ */ e("p", { className:
|
|
289
|
-
/* @__PURE__ */ e("p", { className:
|
|
288
|
+
/* @__PURE__ */ e("p", { className: a.userName, children: n.name }),
|
|
289
|
+
/* @__PURE__ */ e("p", { className: a.userTitle, children: n.title })
|
|
290
290
|
] })
|
|
291
291
|
] }),
|
|
292
|
-
/* @__PURE__ */ e("div", { className:
|
|
292
|
+
/* @__PURE__ */ e("div", { className: a.headerItems, children: d })
|
|
293
293
|
] }) }) : /* @__PURE__ */ o(
|
|
294
294
|
"header",
|
|
295
295
|
{
|
|
296
|
-
className:
|
|
296
|
+
className: a.header,
|
|
297
297
|
style: {
|
|
298
298
|
borderTop: `solid 4px ${r.color ? r.color : A.brandPrimary}`
|
|
299
299
|
},
|
|
300
300
|
children: [
|
|
301
|
-
/* @__PURE__ */ o("div", { className:
|
|
302
|
-
/* @__PURE__ */ e("div", { className:
|
|
303
|
-
|
|
301
|
+
/* @__PURE__ */ o("div", { className: a.headerContent, children: [
|
|
302
|
+
/* @__PURE__ */ e("div", { className: a.logo, children: /* @__PURE__ */ e(
|
|
303
|
+
g,
|
|
304
304
|
{
|
|
305
305
|
size: "small",
|
|
306
306
|
padding: !1
|
|
@@ -310,7 +310,7 @@ const K = [
|
|
|
310
310
|
E,
|
|
311
311
|
{
|
|
312
312
|
variant: "icon",
|
|
313
|
-
className:
|
|
313
|
+
className: a.toggleButton,
|
|
314
314
|
"aria-label": i ? m.format("closeMenu") : m.format("openMenu"),
|
|
315
315
|
"aria-controls": _,
|
|
316
316
|
onPressStart: () => {
|
|
@@ -332,53 +332,53 @@ const K = [
|
|
|
332
332
|
}
|
|
333
333
|
),
|
|
334
334
|
/* @__PURE__ */ o("div", { children: [
|
|
335
|
-
/* @__PURE__ */ e("p", { className:
|
|
336
|
-
/* @__PURE__ */ e("p", { className:
|
|
337
|
-
/* @__PURE__ */ e("p", { className:
|
|
335
|
+
/* @__PURE__ */ e("p", { className: a.userName, children: n.name }),
|
|
336
|
+
/* @__PURE__ */ e("p", { className: a.userTitle, children: n.title }),
|
|
337
|
+
/* @__PURE__ */ e("p", { className: a.title, children: t })
|
|
338
338
|
] })
|
|
339
339
|
] }),
|
|
340
|
-
/* @__PURE__ */ e("div", { className:
|
|
340
|
+
/* @__PURE__ */ e("div", { className: a.headerItems, children: d })
|
|
341
341
|
]
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
344
|
}, B = ({
|
|
345
|
-
id:
|
|
345
|
+
id: t = "main:first-of-type"
|
|
346
346
|
}) => {
|
|
347
|
-
const
|
|
348
|
-
const i = document.querySelector(
|
|
347
|
+
const n = () => {
|
|
348
|
+
const i = document.querySelector(t);
|
|
349
349
|
i && (i.tabIndex = -1, i.focus(), setTimeout(() => i.removeAttribute("tabindex"), 1e3));
|
|
350
|
-
}, r =
|
|
350
|
+
}, r = f(k);
|
|
351
351
|
return /* @__PURE__ */ e(
|
|
352
352
|
E,
|
|
353
353
|
{
|
|
354
|
-
onPress:
|
|
355
|
-
className:
|
|
354
|
+
onPress: n,
|
|
355
|
+
className: a.skipToContent,
|
|
356
356
|
children: r.format("skipToContent")
|
|
357
357
|
}
|
|
358
358
|
);
|
|
359
359
|
}, je = () => {
|
|
360
|
-
const { isOpened:
|
|
361
|
-
return
|
|
360
|
+
const { isOpened: t, setIsOpened: n } = N();
|
|
361
|
+
return t ? /* @__PURE__ */ e(
|
|
362
362
|
"div",
|
|
363
363
|
{
|
|
364
|
-
className: b(
|
|
364
|
+
className: b(a.backdrop, a.backdropOpened),
|
|
365
365
|
onClick: () => {
|
|
366
|
-
|
|
366
|
+
n?.(!1);
|
|
367
367
|
},
|
|
368
368
|
"aria-hidden": !0
|
|
369
369
|
}
|
|
370
370
|
) : null;
|
|
371
371
|
}, De = () => {
|
|
372
|
-
const { items:
|
|
372
|
+
const { items: t, clientSideRouter: n, clientSideHref: r } = N(), i = f(k), s = t.at(0)?.items;
|
|
373
373
|
return /* @__PURE__ */ e(
|
|
374
374
|
"nav",
|
|
375
375
|
{
|
|
376
|
-
className:
|
|
376
|
+
className: a.navbar,
|
|
377
377
|
"aria-label": i.format("bottomMenu"),
|
|
378
|
-
children: s && /* @__PURE__ */ e("ul", { className: b(
|
|
378
|
+
children: s && /* @__PURE__ */ e("ul", { className: b(a.navbarList), children: n ? /* @__PURE__ */ e(
|
|
379
379
|
w,
|
|
380
380
|
{
|
|
381
|
-
navigate:
|
|
381
|
+
navigate: n,
|
|
382
382
|
useHref: r,
|
|
383
383
|
children: /* @__PURE__ */ e(O, { items: s })
|
|
384
384
|
}
|
|
@@ -386,12 +386,12 @@ const K = [
|
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
388
|
}, O = ({
|
|
389
|
-
items:
|
|
390
|
-
}) => /* @__PURE__ */ e(G, { children:
|
|
391
|
-
|
|
389
|
+
items: t
|
|
390
|
+
}) => /* @__PURE__ */ e(G, { children: t.map(({ href: n, active: r, icon: i, title: s, hasBadge: p }, d) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
|
|
391
|
+
L,
|
|
392
392
|
{
|
|
393
|
-
href:
|
|
394
|
-
className: b(
|
|
393
|
+
href: n,
|
|
394
|
+
className: b(a.navbarItem),
|
|
395
395
|
"data-active": r,
|
|
396
396
|
"aria-current": r && "page",
|
|
397
397
|
children: [
|
|
@@ -403,66 +403,66 @@ const K = [
|
|
|
403
403
|
]
|
|
404
404
|
}
|
|
405
405
|
) }, d)) }), c = ({
|
|
406
|
-
items:
|
|
407
|
-
title:
|
|
406
|
+
items: t,
|
|
407
|
+
title: n,
|
|
408
408
|
user: r,
|
|
409
409
|
app: i,
|
|
410
410
|
children: s,
|
|
411
411
|
headerChildren: p,
|
|
412
412
|
clientSideRouter: d,
|
|
413
|
-
clientSideHref:
|
|
413
|
+
clientSideHref: x,
|
|
414
414
|
variant: _,
|
|
415
415
|
className: m,
|
|
416
416
|
onSidebarLinkClick: h
|
|
417
417
|
}) => {
|
|
418
|
-
const [
|
|
418
|
+
const [v, l] = y.useState(!1), [u, C] = y.useState(!1), S = y.useId();
|
|
419
419
|
return _ === "external" ? /* @__PURE__ */ e(
|
|
420
420
|
c.Provider,
|
|
421
421
|
{
|
|
422
|
-
items:
|
|
423
|
-
title:
|
|
422
|
+
items: t,
|
|
423
|
+
title: n,
|
|
424
424
|
user: r,
|
|
425
425
|
app: i,
|
|
426
426
|
clientSideRouter: d,
|
|
427
|
-
clientSideHref:
|
|
427
|
+
clientSideHref: x,
|
|
428
428
|
headerChildren: p,
|
|
429
|
-
isCollapsed:
|
|
429
|
+
isCollapsed: v,
|
|
430
430
|
setIsCollapsed: l,
|
|
431
431
|
variant: _,
|
|
432
432
|
id: S,
|
|
433
|
-
children: /* @__PURE__ */ o("div", { className: b(
|
|
433
|
+
children: /* @__PURE__ */ o("div", { className: b(a.baseLayout, m), children: [
|
|
434
434
|
/* @__PURE__ */ e(B, {}),
|
|
435
435
|
/* @__PURE__ */ e(c.Header, {}),
|
|
436
|
-
/* @__PURE__ */ o("div", { className:
|
|
436
|
+
/* @__PURE__ */ o("div", { className: a.mainContent, children: [
|
|
437
437
|
/* @__PURE__ */ e(c.Sidebar, { onLinkClick: h }),
|
|
438
|
-
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e("main", { className:
|
|
438
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: s }) }) }),
|
|
439
439
|
/* @__PURE__ */ e(c.Backdrop, {})
|
|
440
440
|
] }),
|
|
441
|
-
/* @__PURE__ */ e("div", { className:
|
|
441
|
+
/* @__PURE__ */ e("div", { className: a.navbarWrapper, children: /* @__PURE__ */ e(c.Navbar, {}) })
|
|
442
442
|
] })
|
|
443
443
|
}
|
|
444
444
|
) : /* @__PURE__ */ e(
|
|
445
445
|
c.Provider,
|
|
446
446
|
{
|
|
447
|
-
items:
|
|
448
|
-
title:
|
|
447
|
+
items: t,
|
|
448
|
+
title: n,
|
|
449
449
|
user: r,
|
|
450
450
|
app: i,
|
|
451
451
|
clientSideRouter: d,
|
|
452
|
-
clientSideHref:
|
|
452
|
+
clientSideHref: x,
|
|
453
453
|
headerChildren: p,
|
|
454
|
-
isCollapsed:
|
|
454
|
+
isCollapsed: v,
|
|
455
455
|
setIsCollapsed: l,
|
|
456
456
|
isOpened: u,
|
|
457
|
-
setIsOpened:
|
|
457
|
+
setIsOpened: C,
|
|
458
458
|
variant: _,
|
|
459
459
|
id: S,
|
|
460
|
-
children: /* @__PURE__ */ o("div", { className: b(
|
|
460
|
+
children: /* @__PURE__ */ o("div", { className: b(a.baseLayout, m), children: [
|
|
461
461
|
/* @__PURE__ */ e(B, {}),
|
|
462
462
|
/* @__PURE__ */ e(c.Header, {}),
|
|
463
|
-
/* @__PURE__ */ o("div", { className:
|
|
463
|
+
/* @__PURE__ */ o("div", { className: a.mainContent, children: [
|
|
464
464
|
/* @__PURE__ */ e(c.Sidebar, { onLinkClick: h }),
|
|
465
|
-
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e("main", { className:
|
|
465
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: s }) }) }),
|
|
466
466
|
/* @__PURE__ */ e(c.Backdrop, {})
|
|
467
467
|
] })
|
|
468
468
|
] })
|
package/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { G as ao } from "./chunks/GridItem-z7zclNdT.js";
|
|
|
21
21
|
import { H as eo } from "./chunks/Heading-D8tNNJkt.js";
|
|
22
22
|
import { I as so } from "./chunks/InfoBanner-C4HnaXQO.js";
|
|
23
23
|
import { L as xo } from "./chunks/Label-6GZmmff9.js";
|
|
24
|
-
import { H as io, L as fo, N as no, S as To, a as co } from "./chunks/Layout-
|
|
24
|
+
import { H as io, L as fo, N as no, S as To, a as co } from "./chunks/Layout-BclBqFzc.js";
|
|
25
25
|
import { L as uo } from "./chunks/Link-rqGQvFQq.js";
|
|
26
26
|
import { L as Bo } from "./chunks/LinkButton-B1zayj7k.js";
|
|
27
27
|
import { L as Lo } from "./chunks/Logo-CCxPAmgw.js";
|
|
@@ -49,7 +49,7 @@ import { c as Na } from "./chunks/clsx-AexbMWKp.js";
|
|
|
49
49
|
import { DialogTrigger as za, MenuTrigger as Oa, RouterProvider as Qa } from "react-aria-components";
|
|
50
50
|
import { u as Za } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
|
|
51
51
|
import { useToastState as qa } from "react-stately";
|
|
52
|
-
const o = "17.2.
|
|
52
|
+
const o = "17.2.6", a = {
|
|
53
53
|
version: o
|
|
54
54
|
}, r = a.version;
|
|
55
55
|
export {
|
package/layout/index.js
CHANGED
package/package.json
CHANGED