@midas-ds/layout 0.2.1 → 0.2.2
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/header.css +1 -0
- package/assets/layout.css +1 -0
- package/assets/main.css +1 -0
- package/assets/navbar.css +1 -0
- package/assets/navigation.css +1 -0
- package/assets/panel.css +1 -0
- package/assets/sidebar.css +1 -0
- package/chunks/clsx-CbxlCXZ3.js +16 -0
- package/chunks/createLucideIcon-BgluSHFG.js +39 -0
- package/chunks/header--aFkqcRB.js +86 -0
- package/chunks/layout-BL0juoss.js +27 -0
- package/chunks/main-BHQLIt4r.js +8 -0
- package/chunks/navbar-C63VGKFb.js +8 -0
- package/chunks/navigation-C27FuxMS.js +96 -0
- package/chunks/panel-CJr6C1-h.js +165 -0
- package/chunks/sidebar-BhbGgFMU.js +93 -0
- package/chunks/utils-B0BlrR1T.js +23 -0
- package/header/index.js +2 -9
- package/index.js +8 -39
- package/layout/index.js +2 -5
- package/main/index.js +2 -4
- package/navbar/index.js +2 -4
- package/navigation/index.js +2 -9
- package/package.json +2 -2
- package/panel/index.js +2 -14
- package/sidebar/index.js +2 -6
- package/utils/index.js +2 -4
- package/assets/Header.css +0 -1
- package/assets/LayoutContent.css +0 -1
- package/assets/Main.css +0 -1
- package/assets/Navbar.css +0 -1
- package/assets/NavigationSubMenu.css +0 -1
- package/assets/PanelRegion.css +0 -1
- package/assets/PanelTitle.css +0 -1
- package/assets/Sidebar.css +0 -1
- package/chunks/Header-Wswx-yQj.js +0 -107
- package/chunks/LayoutContent-DDWtDRL5.js +0 -53
- package/chunks/Main-BVvbCTMX.js +0 -14
- package/chunks/MobileMenuContext-Coj0sJ0N.js +0 -6
- package/chunks/Navbar-Do2dFMRr.js +0 -14
- package/chunks/NavigationSubMenu-DabVRyqI.js +0 -166
- package/chunks/PanelRegion-X9t7HDPS.js +0 -193
- package/chunks/PanelTitle-CSjU7dUj.js +0 -51
- package/chunks/Sidebar-uZAklu0a.js +0 -91
- package/chunks/SidebarContext-CoDRKR2m.js +0 -8
- package/chunks/clsx-OuTLNxxd.js +0 -16
- package/chunks/createLucideIcon-CP-mMPfa.js +0 -75
- package/chunks/useIsMobileDevice-D0iMVFPx.js +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 0.2.2 (2026-06-30)
|
|
2
|
+
|
|
3
|
+
### 🔧 Maintenance
|
|
4
|
+
|
|
5
|
+
- **workspace:** migrate Nx to 23.0.1 ([82bdb31fc57](https://github.com/migrationsverket/midas/commit/82bdb31fc57))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated components to 17.15.4
|
|
10
|
+
|
|
1
11
|
## 0.2.1 (2026-06-11)
|
|
2
12
|
|
|
3
13
|
### 🧱 Updated Dependencies
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._headerActions_1rka5_1{align-items:center;gap:.25rem;margin-inline-start:auto;display:flex}@media (width<=640px){._label_1191f_1{clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}}._overlay_1gblg_1{display:block}._overlay_1gblg_1[data-entering]{animation:_drawer-blur_1gblg_1 var(--midas-transition-duration-quick)}._overlay_1gblg_1[data-exiting]{animation:_drawer-blur_1gblg_1 var(--midas-transition-duration-quick) reverse var(--midas-transition-timing-ease-in)}._drawer_1gblg_14{background-color:var(--midas-background-base);border-right:1px solid var(--midas-border-color-subtle);outline:none;width:clamp(10rem,15rem,90%);height:calc(100dvh + 200px);margin-right:auto;position:sticky;top:-100px;left:0;overflow-y:auto;box-shadow:-8px 0 20px #0000001a}._drawer_1gblg_14[data-entering]{animation:_drawer-slide_1gblg_1 var(--midas-transition-duration-quick)}._drawer_1gblg_14[data-exiting]{animation:_drawer-slide_1gblg_1 var(--midas-transition-duration-quick) reverse var(--midas-transition-timing-ease-in)}._dialog_1gblg_39:focus-visible{outline:none}._header_1gblg_45{background-color:var(--midas-background-base);margin-bottom:var(--midas-space-medium);padding:var(--midas-space-medium);display:block;position:sticky;top:0}@keyframes _drawer-blur_1gblg_1{0%{-webkit-backdrop-filter:blur();backdrop-filter:blur();background:0 0}to{background:var(--midas-overlay-background);-webkit-backdrop-filter:var(--midas-overlay-blur);backdrop-filter:var(--midas-overlay-blur)}}@keyframes _drawer-slide_1gblg_1{0%{transform:translate(-100%)}to{transform:translate(0)}}._header_i5439_1{background-color:var(--midas-background-base);border-bottom:1px solid var(--midas-border-color-subtle);gap:var(--midas-space-xlarge);display:flex}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._layout_4r2tn_1{font-family:var(--midas-typography-font-family);flex-direction:column;width:100%;height:100dvh;display:flex}._skipToContent_yjoos_1{z-index:var(--midas-z-index-skip-to-content);position:absolute;top:0;right:100%}._skipToContent_yjoos_1[data-focus-visible]{top:5px;left:5px;right:auto}._layoutContent_rtwdj_1{height:100%;display:flex;position:relative;overflow:hidden}@media (width<800px){._layoutContent_rtwdj_1{flex-direction:column}}
|
package/assets/main.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._main_5eaab_1{box-sizing:border-box;scrollbar-gutter:stable;min-width:0;height:100%;padding:var(--midas-space-xlarge);flex:auto;overflow:hidden auto}._main_5eaab_1:focus-visible{box-shadow:var(--midas-state-focus-inset);outline:none}@media (forced-colors:active){._main_5eaab_1:focus-visible{outline:var(--midas-state-focus-contrast-mode-outline) solid highlight;outline-offset:calc(var(--midas-state-focus-contrast-mode-outline) * -1)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._navbar_18aqo_1{background-color:var(--midas-layer-01-base)}._navbar_18aqo_1 ul{justify-content:center;margin:0;padding:0;display:flex}._navbar_18aqo_1 ul li{align-items:center;list-style:none;display:flex}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._rootList_l3v98_1{margin:0;padding:0}._navigationHeader_j94pq_1{color:var(--midas-text-secondary);font-size:var(--midas-typography-font-size-20);padding:var(--midas-spacing-30)}._navigationHeader_j94pq_1._collapsed_j94pq_6{display:none}._navigationItem_1jt2l_1{list-style:none}._navigationLink_1787b_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_1787b_1[data-hovered],._navigationLink_1787b_1:hover,._navigationLink_1787b_1[data-active]{background-color:var(--midas-menu-item-background-hover)}._navigationLink_1787b_1._sidebar_1787b_21{padding:.625rem var(--midas-spacing-30);transition:padding-inline-start var(--midas-transition-duration-fast) ease-out;flex-direction:row;justify-content:flex-start;align-items:flex-start}._navigationLink_1787b_1._sidebar_1787b_21[data-active]{border-color:var(--midas-border-color-tertiary);font-weight:var(--midas-typography-weight-bold)}._navigationLink_1787b_1._sidebar_1787b_21._collapsed_1787b_34{padding-inline-start:calc((80px - 2 * var(--midas-space-small) - var(--midas-size-90)) / 2)}._navigationLink_1787b_1 svg{height:var(--midas-size-90);width:var(--midas-size-90);flex-shrink:0}._navigationLink_1787b_1 ._title_1787b_49{interpolate-size:allow-keywords;opacity:1;height:auto;transition:display var(--midas-transition-duration-fast) allow-discrete, height var(--midas-transition-duration-fast) ease-out, opacity var(--midas-transition-duration-instant) ease-out;display:block;overflow:hidden}@starting-style{._navigationLink_1787b_1 ._title_1787b_49{opacity:0;height:0}}._navigationLink_1787b_1._collapsed_1787b_34 ._title_1787b_49{opacity:0;height:0;display: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}
|
package/assets/panel.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._panelBody_1p0jk_1{background-color:var(--midas-background-base);box-sizing:border-box;flex-direction:column;gap:0;display:flex}._panelContent_1gfrc_1{padding:var(--midas-space-small) var(--midas-space-medium) 0;flex:auto;overflow:hidden auto}._panelContent_1gfrc_1:focus-visible{box-shadow:var(--midas-state-focus-inset);outline:none}@media (forced-colors:active){._panelContent_1gfrc_1:focus-visible{outline:var(--midas-state-focus-contrast-mode-outline) solid highlight;outline-offset:calc(var(--midas-state-focus-contrast-mode-outline) * -1)}}._panelHeader_1g1ux_1{padding:var(--midas-space-small) var(--midas-space-30) var(--midas-space-small) var(--midas-space-medium);justify-content:space-between;align-items:center;display:flex}._panelTitle_w7y4m_1{display:block}:root{--panel-width:300px;--panel-height-mobile:40vh}._panel_11eci_6{background:var(--midas-background-base);box-shadow:var(--midas-panel-shadow);height:100%;width:var(--panel-width);border-left:1px solid var(--midas-border-color-subtle);position:absolute;top:0;right:0;overflow:hidden}._panel_11eci_6[data-promoting]{animation:_promote_11eci_1 var(--midas-transition-duration-slow) ease-out}@media (prefers-reduced-motion:reduce){._panel_11eci_6[data-promoting]{animation-duration:1ms}}._panel_11eci_6[data-entering]{animation:_slide-horizontally_11eci_1 var(--midas-transition-duration-slow)}._panel_11eci_6[data-exiting]{animation:_slide-horizontally_11eci_1 var(--midas-transition-duration-slow) reverse ease-in}@media (prefers-reduced-motion:reduce){._panel_11eci_6[data-entering],._panel_11eci_6[data-exiting]{animation-duration:1ms}}@media (width<800px){._panel_11eci_6{width:100%;height:var(--panel-height-mobile);bottom:0;left:0;top:unset;border-left:none;border-top:1px solid var(--midas-border-color-subtle)}._panel_11eci_6[data-entering]{animation:_slide-vertically_11eci_1 var(--midas-transition-duration-slow)}._panel_11eci_6[data-exiting]{animation:_slide-vertically_11eci_1 var(--midas-transition-duration-slow) reverse ease-in}}._panelActions_11eci_63{flex-shrink:0;align-items:center;display:flex}._panelTitle_11eci_69{font-size:var(--midas-typography-font-size-30);font-weight:var(--midas-typography-weight-semi-bold);line-height:var(--midas-typography-line-height-50);display:block}@keyframes _promote_11eci_1{0%{opacity:.7;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes _slide-horizontally_11eci_1{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes _slide-vertically_11eci_1{0%{transform:translateY(100%)}to{transform:translateY(0)}}._push_a83oo_1{height:100%;transition:width var(--midas-transition-duration-slow);flex-shrink:0;width:0;position:relative;overflow:hidden}._push_a83oo_1[data-open]{width:var(--panel-width)}@media (width<800px){._push_a83oo_1{width:100%;height:0;transition:height var(--midas-transition-duration-slow)}._push_a83oo_1[data-open]{height:var(--panel-height-mobile);width:100%}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._sidebar_zlaev_1{background-color:var(--midas-background-base);border-right:1px solid var(--midas-border-color-subtle);transition:width var(--midas-transition-duration-fast) ease-out;flex-shrink:0;width:15rem}._sidebar_zlaev_1._collapsed_zlaev_8{width:80px}@media (width<=640px){._sidebar_zlaev_1{display:none}}._sidebarHeader_zlaev_17{gap:0}._sidebarHeader_zlaev_17._collapsed_zlaev_8{padding:var(--midas-space-small);justify-content:center}._sidebarTitle_zlaev_26{font-size:var(--midas-typography-font-size-20);interpolate-size:allow-keywords;opacity:1;height:auto;transition:height var(--midas-transition-duration-fast) ease-out, opacity var(--midas-transition-duration-instant) ease-out;display:block;overflow:hidden}@starting-style{._sidebarTitle_zlaev_26{opacity:0;height:0}}._sidebarTitle_zlaev_26._collapsed_zlaev_8{opacity:0;height:0;display:none}._sidebarContent_zlaev_49{padding:var(--midas-space-small)}._sidebar_zlaev_1[data-transitioning] [data-badge]{opacity:0;transition:none}._sidebar_zlaev_1 [data-badge]{transition:opacity var(--midas-transition-duration-normal) ease var(--midas-transition-duration-fast)}@media (prefers-reduced-motion:reduce){._sidebar_zlaev_1[data-transitioning] [data-badge],._sidebar_zlaev_1 [data-badge]{transition:none}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region ../../node_modules/clsx/dist/clsx.mjs
|
|
2
|
+
function e(t) {
|
|
3
|
+
var n, r, i = "";
|
|
4
|
+
if (typeof t == "string" || typeof t == "number") i += t;
|
|
5
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
6
|
+
var a = t.length;
|
|
7
|
+
for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
|
|
8
|
+
} else for (r in t) t[r] && (i && (i += " "), i += r);
|
|
9
|
+
return i;
|
|
10
|
+
}
|
|
11
|
+
function t() {
|
|
12
|
+
for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
|
|
13
|
+
return i;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createElement as e, forwardRef as t } from "react";
|
|
2
|
+
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
3
|
+
var n = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), r = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), i = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), a = (e) => {
|
|
4
|
+
let t = i(e);
|
|
5
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
6
|
+
}, o = {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: 24,
|
|
9
|
+
height: 24,
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
strokeWidth: 2,
|
|
14
|
+
strokeLinecap: "round",
|
|
15
|
+
strokeLinejoin: "round"
|
|
16
|
+
}, s = (e) => {
|
|
17
|
+
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
18
|
+
return !1;
|
|
19
|
+
}, c = t(({ color: t = "currentColor", size: r = 24, strokeWidth: i = 2, absoluteStrokeWidth: a, className: c = "", children: l, iconNode: u, ...d }, f) => e("svg", {
|
|
20
|
+
ref: f,
|
|
21
|
+
...o,
|
|
22
|
+
width: r,
|
|
23
|
+
height: r,
|
|
24
|
+
stroke: t,
|
|
25
|
+
strokeWidth: a ? Number(i) * 24 / Number(r) : i,
|
|
26
|
+
className: n("lucide", c),
|
|
27
|
+
...!l && !s(d) && { "aria-hidden": "true" },
|
|
28
|
+
...d
|
|
29
|
+
}, [...u.map(([t, n]) => e(t, n)), ...Array.isArray(l) ? l : [l]])), l = (i, o) => {
|
|
30
|
+
let s = t(({ className: t, ...s }, l) => e(c, {
|
|
31
|
+
ref: l,
|
|
32
|
+
iconNode: o,
|
|
33
|
+
className: n(`lucide-${r(a(i))}`, `lucide-${i}`, t),
|
|
34
|
+
...s
|
|
35
|
+
}));
|
|
36
|
+
return s.displayName = a(i), s;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { l as t };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
3
|
+
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
+
import { t as n } from "./utils-B0BlrR1T.js";
|
|
5
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { createContext as o, forwardRef as s } from "react";
|
|
7
|
+
import { Dialog as c, Modal as l, composeRenderProps as u } from "react-aria-components";
|
|
8
|
+
import { Button as d, DialogTrigger as f, LogoContext as p, ModalOverlay as m, Text as h, clsx as g, useLocalizedStringFormatter as _ } from "@midas-ds/components";
|
|
9
|
+
import '../assets/header.css';var v = { headerActions: "_headerActions_1rka5_1" }, y = ({ className: t, ...n }) => /* @__PURE__ */ i("div", {
|
|
10
|
+
className: e(t, v.headerActions),
|
|
11
|
+
...n
|
|
12
|
+
}), b = { label: "_label_1191f_1" }, x = s(({ children: e, icon: t, ...n }, o) => (!e && !n["aria-label"] && process.env.NODE_ENV !== "production" && console.warn("Please provide an 'aria-label' for HeaderAction components that doesnt have a visible label (children)"), /* @__PURE__ */ i(d, {
|
|
13
|
+
ref: o,
|
|
14
|
+
size: "medium",
|
|
15
|
+
variant: "tertiary",
|
|
16
|
+
...n,
|
|
17
|
+
children: u(e, (e) => /* @__PURE__ */ a(r, { children: [t, e !== void 0 && /* @__PURE__ */ i("span", {
|
|
18
|
+
className: b.label,
|
|
19
|
+
children: e
|
|
20
|
+
})] }))
|
|
21
|
+
})));
|
|
22
|
+
x.displayName = "HeaderAction";
|
|
23
|
+
var S = t("menu", [
|
|
24
|
+
["path", {
|
|
25
|
+
d: "M4 5h16",
|
|
26
|
+
key: "1tepv9"
|
|
27
|
+
}],
|
|
28
|
+
["path", {
|
|
29
|
+
d: "M4 12h16",
|
|
30
|
+
key: "1lakjw"
|
|
31
|
+
}],
|
|
32
|
+
["path", {
|
|
33
|
+
d: "M4 19h16",
|
|
34
|
+
key: "1djgab"
|
|
35
|
+
}]
|
|
36
|
+
]), C = o(void 0), w = {
|
|
37
|
+
en: { openMenu: "Open menu" },
|
|
38
|
+
sv: { openMenu: "Öppna meny" }
|
|
39
|
+
}, T = {
|
|
40
|
+
overlay: "_overlay_1gblg_1",
|
|
41
|
+
"drawer-blur": "_drawer-blur_1gblg_1",
|
|
42
|
+
drawer: "_drawer_1gblg_14",
|
|
43
|
+
"drawer-slide": "_drawer-slide_1gblg_1",
|
|
44
|
+
dialog: "_dialog_1gblg_39",
|
|
45
|
+
header: "_header_1gblg_45"
|
|
46
|
+
}, E = ({ children: e, className: t, defaultOpen: r, isOpen: o, onOpenChange: s, title: p, ...v }) => {
|
|
47
|
+
let y = n(), b = _(w);
|
|
48
|
+
return y ? /* @__PURE__ */ i(C.Provider, {
|
|
49
|
+
value: {},
|
|
50
|
+
children: /* @__PURE__ */ a(f, {
|
|
51
|
+
isOpen: o,
|
|
52
|
+
onOpenChange: s,
|
|
53
|
+
defaultOpen: r,
|
|
54
|
+
children: [/* @__PURE__ */ i(d, {
|
|
55
|
+
"aria-label": b.format("openMenu"),
|
|
56
|
+
icon: S,
|
|
57
|
+
variant: "icon"
|
|
58
|
+
}), /* @__PURE__ */ i(m, {
|
|
59
|
+
className: g(t, T.overlay),
|
|
60
|
+
isDismissable: !0,
|
|
61
|
+
...v,
|
|
62
|
+
children: u(e, (e) => /* @__PURE__ */ i(l, {
|
|
63
|
+
className: T.drawer,
|
|
64
|
+
children: /* @__PURE__ */ a(c, {
|
|
65
|
+
className: T.dialog,
|
|
66
|
+
children: [p && /* @__PURE__ */ i(h, {
|
|
67
|
+
className: T.header,
|
|
68
|
+
children: p
|
|
69
|
+
}), e]
|
|
70
|
+
})
|
|
71
|
+
}))
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
}) : null;
|
|
75
|
+
}, D = { header: "_header_i5439_1" }, O = ({ className: t, ...r }) => {
|
|
76
|
+
let a = n();
|
|
77
|
+
return /* @__PURE__ */ i(p.Provider, {
|
|
78
|
+
value: { size: a ? "x-small" : "large" },
|
|
79
|
+
children: /* @__PURE__ */ i("header", {
|
|
80
|
+
className: e(t, D.header),
|
|
81
|
+
...r
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
export { y as a, x as i, E as n, C as r, O as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { Button as r, useLocalizedStringFormatter as i } from "@midas-ds/components";
|
|
5
|
+
import '../assets/layout.css';var a = { layout: "_layout_4r2tn_1" }, o = {
|
|
6
|
+
en: { skipToContent: "Skip to main content" },
|
|
7
|
+
sv: { skipToContent: "Hoppa till huvudinnehåll" }
|
|
8
|
+
}, s = { skipToContent: "_skipToContent_yjoos_1" }, c = ({ selector: e = "main:first-of-type" }) => {
|
|
9
|
+
let n = () => {
|
|
10
|
+
let t = document.querySelector(e);
|
|
11
|
+
t && (t.tabIndex = -1, t.focus(), t.addEventListener("blur", () => t.removeAttribute("tabindex"), { once: !0 }));
|
|
12
|
+
}, a = i(o);
|
|
13
|
+
return /* @__PURE__ */ t(r, {
|
|
14
|
+
onPress: n,
|
|
15
|
+
className: s.skipToContent,
|
|
16
|
+
children: a.format("skipToContent")
|
|
17
|
+
});
|
|
18
|
+
}, l = ({ children: r, className: i, ...o }) => /* @__PURE__ */ n("div", {
|
|
19
|
+
className: e(i, a.layout),
|
|
20
|
+
...o,
|
|
21
|
+
children: [/* @__PURE__ */ t(c, {}), r]
|
|
22
|
+
}), u = { layoutContent: "_layoutContent_rtwdj_1" }, d = ({ className: n, ...r }) => /* @__PURE__ */ t("div", {
|
|
23
|
+
className: e(n, u.layoutContent),
|
|
24
|
+
...r
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { l as n, d as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import '../assets/main.css';var n = { main: "_main_5eaab_1" }, r = ({ className: r, ...i }) => /* @__PURE__ */ t("main", {
|
|
4
|
+
className: e(r, n.main),
|
|
5
|
+
...i
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { r as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
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_18aqo_1" }, r = ({ className: r, ...i }) => /* @__PURE__ */ t("footer", {
|
|
4
|
+
className: e(r, n.navbar),
|
|
5
|
+
...i
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { r as t };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
3
|
+
import { r as t } from "./header--aFkqcRB.js";
|
|
4
|
+
import { n } from "./sidebar-BhbGgFMU.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 { Collection as m } from "@react-aria/collections";
|
|
10
|
+
import '../assets/navigation.css';var h = { rootList: "_rootList_l3v98_1" }, g = ({ className: e, items: t, children: n, dependencies: i, idScope: a, addIdAndValue: s, ...c }) => /* @__PURE__ */ r("nav", {
|
|
11
|
+
className: e,
|
|
12
|
+
...c,
|
|
13
|
+
children: /* @__PURE__ */ r("ul", {
|
|
14
|
+
className: h.rootList,
|
|
15
|
+
children: /* @__PURE__ */ r(o, {
|
|
16
|
+
items: t,
|
|
17
|
+
children: n,
|
|
18
|
+
dependencies: i,
|
|
19
|
+
idScope: a,
|
|
20
|
+
addIdAndValue: s
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
}), _ = {
|
|
24
|
+
navigationHeader: "_navigationHeader_j94pq_1",
|
|
25
|
+
collapsed: "_collapsed_j94pq_6"
|
|
26
|
+
}, v = ({ className: e, ...t }) => {
|
|
27
|
+
let i = a(n);
|
|
28
|
+
return /* @__PURE__ */ r(u, {
|
|
29
|
+
className: p(e, _.navigationHeader, { [_.collapsed]: i?.isCollapsed }),
|
|
30
|
+
...t
|
|
31
|
+
});
|
|
32
|
+
}, y = { navigationItem: "_navigationItem_1jt2l_1" }, b = ({ className: t, ...i }) => {
|
|
33
|
+
let o = a(n);
|
|
34
|
+
return /* @__PURE__ */ r("li", {
|
|
35
|
+
className: e(t, y.navigationItem, { [y.collapsed]: o?.isCollapsed }),
|
|
36
|
+
...i
|
|
37
|
+
});
|
|
38
|
+
}, x = {
|
|
39
|
+
navigationLink: "_navigationLink_1787b_1",
|
|
40
|
+
sidebar: "_sidebar_1787b_21",
|
|
41
|
+
collapsed: "_collapsed_1787b_34",
|
|
42
|
+
title: "_title_1787b_49"
|
|
43
|
+
}, S = ({ as: e, children: o, className: u, isActive: m, icon: h, "aria-label": g, ..._ }) => {
|
|
44
|
+
let v = a(t), y = a(n), b = y?.isCollapsed, S = a(l), C = e || c, w = () => {
|
|
45
|
+
S?.isOpen && S?.setOpen(!1);
|
|
46
|
+
}, T = typeof o == "string" ? o : void 0;
|
|
47
|
+
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, {
|
|
48
|
+
isDisabled: !b || !T && !g,
|
|
49
|
+
children: [/* @__PURE__ */ r(s, { children: /* @__PURE__ */ i(C, {
|
|
50
|
+
"aria-current": m && "page",
|
|
51
|
+
"aria-label": g || (b ? T : void 0),
|
|
52
|
+
className: p(u, x.navigationLink, {
|
|
53
|
+
[x.sidebar]: y || v,
|
|
54
|
+
[x.collapsed]: b
|
|
55
|
+
}),
|
|
56
|
+
"data-active": m || void 0,
|
|
57
|
+
...e ? { onClick: (e) => {
|
|
58
|
+
w(), _.onClick?.(e);
|
|
59
|
+
} } : { onPress: (e) => {
|
|
60
|
+
w(), _.onPress?.(e);
|
|
61
|
+
} },
|
|
62
|
+
..._,
|
|
63
|
+
children: [h, /* @__PURE__ */ r("span", {
|
|
64
|
+
className: x.title,
|
|
65
|
+
children: o
|
|
66
|
+
})]
|
|
67
|
+
}) }), /* @__PURE__ */ r(d, {
|
|
68
|
+
placement: "right",
|
|
69
|
+
children: T
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}, C = {
|
|
73
|
+
navigationSection: "_navigationSection_1ae77_1",
|
|
74
|
+
collapsed: "_collapsed_1ae77_5"
|
|
75
|
+
}, w = ({ className: t, title: o, ...s }) => {
|
|
76
|
+
let c = a(n);
|
|
77
|
+
return /* @__PURE__ */ r(b, { children: /* @__PURE__ */ i("ul", {
|
|
78
|
+
className: e(t, C.navigationSection, { [C.collapsed]: c?.isCollapsed }),
|
|
79
|
+
children: [o && /* @__PURE__ */ r(v, { children: o }), /* @__PURE__ */ r(m, { ...s })]
|
|
80
|
+
}) });
|
|
81
|
+
}, T = {
|
|
82
|
+
navigationSubMenu: "_navigationSubMenu_vfyl6_1",
|
|
83
|
+
collapsed: "_collapsed_vfyl6_5"
|
|
84
|
+
}, E = ({ className: t, children: i, items: o, ...s }) => {
|
|
85
|
+
let c = a(n), { length: l } = Array.from(o || []);
|
|
86
|
+
return typeof i == "function" && l === 0 ? null : /* @__PURE__ */ r("ul", {
|
|
87
|
+
className: e(t, T.navigationSubMenu, { [T.collapsed]: c?.isCollapsed }),
|
|
88
|
+
children: /* @__PURE__ */ r(m, {
|
|
89
|
+
items: o,
|
|
90
|
+
...s,
|
|
91
|
+
children: i
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { v as a, b as i, w as n, g as o, S as r, E as t };
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
3
|
+
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { createContext as i, forwardRef as a, useContext as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
6
|
+
import { Button as u, Text as d, clsx as f, useLocalizedStringFormatter as p } from "@midas-ds/components";
|
|
7
|
+
import { useControlledState as m } from "@react-stately/utils";
|
|
8
|
+
import { filterDOMProps as h, useEnterAnimation as g, useExitAnimation as _, useObjectRef as v } from "@react-aria/utils";
|
|
9
|
+
import '../assets/panel.css';var y = t("x", [["path", {
|
|
10
|
+
d: "M18 6 6 18",
|
|
11
|
+
key: "1bl5f8"
|
|
12
|
+
}], ["path", {
|
|
13
|
+
d: "m6 6 12 12",
|
|
14
|
+
key: "d8bk6v"
|
|
15
|
+
}]]), b = { panelBody: "_panelBody_1p0jk_1" }, x = a(({ className: t, ...r }, i) => /* @__PURE__ */ n("aside", {
|
|
16
|
+
ref: i,
|
|
17
|
+
className: e(t, b.panelBody),
|
|
18
|
+
...r
|
|
19
|
+
})), S = { panelContent: "_panelContent_1gfrc_1" }, C = a(({ className: t, ...r }, i) => /* @__PURE__ */ n("div", {
|
|
20
|
+
ref: i,
|
|
21
|
+
tabIndex: 0,
|
|
22
|
+
className: e(t, S.panelContent),
|
|
23
|
+
...r
|
|
24
|
+
})), w = { panelHeader: "_panelHeader_1g1ux_1" }, T = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
25
|
+
className: e(t, w.panelHeader),
|
|
26
|
+
...r
|
|
27
|
+
}), E = { panelTitle: "_panelTitle_w7y4m_1" }, D = ({ className: e, title: t, ...r }) => /* @__PURE__ */ n(d, {
|
|
28
|
+
className: f(e, E.panelTitle),
|
|
29
|
+
...r,
|
|
30
|
+
children: t
|
|
31
|
+
}), O = {
|
|
32
|
+
en: { closePanel: "Close panel" },
|
|
33
|
+
sv: { closePanel: "Stäng panel" }
|
|
34
|
+
}, k = {
|
|
35
|
+
panel: "_panel_11eci_6",
|
|
36
|
+
promote: "_promote_11eci_1",
|
|
37
|
+
"slide-horizontally": "_slide-horizontally_11eci_1",
|
|
38
|
+
"slide-vertically": "_slide-vertically_11eci_1",
|
|
39
|
+
panelActions: "_panelActions_11eci_63",
|
|
40
|
+
panelTitle: "_panelTitle_11eci_69"
|
|
41
|
+
}, A = (e) => {
|
|
42
|
+
let { onExited: t } = e, [r, i] = m(e.isOpen, e.defaultOpen || !1, e.onOpenChange), a = c(null), o = _(a, r);
|
|
43
|
+
return s(() => {
|
|
44
|
+
!r && !o && t?.();
|
|
45
|
+
}, [
|
|
46
|
+
r,
|
|
47
|
+
o,
|
|
48
|
+
t
|
|
49
|
+
]), !r && !o ? null : /* @__PURE__ */ n(j, {
|
|
50
|
+
isExiting: o,
|
|
51
|
+
onPress: () => i((e) => !e),
|
|
52
|
+
ref: a,
|
|
53
|
+
...e
|
|
54
|
+
});
|
|
55
|
+
}, j = a(({ className: t, title: i, actions: a, onPress: o, children: s, isExiting: c, defaultOpen: l, promoting: d, onPromotionEnd: f, "aria-hidden": m, ..._ }, b) => {
|
|
56
|
+
let S = p(O), w = v(b), E = g(w, !l);
|
|
57
|
+
return /* @__PURE__ */ r(x, {
|
|
58
|
+
"aria-hidden": m || void 0,
|
|
59
|
+
"aria-label": i,
|
|
60
|
+
className: e(t, k.panel),
|
|
61
|
+
ref: w,
|
|
62
|
+
"data-entering": E || void 0,
|
|
63
|
+
"data-exiting": c || void 0,
|
|
64
|
+
"data-promoting": d || void 0,
|
|
65
|
+
onAnimationEnd: (e) => {
|
|
66
|
+
e.target === e.currentTarget && d && f?.();
|
|
67
|
+
},
|
|
68
|
+
...h(_),
|
|
69
|
+
children: [/* @__PURE__ */ r(T, { children: [/* @__PURE__ */ n(D, {
|
|
70
|
+
className: k.panelTitle,
|
|
71
|
+
title: i
|
|
72
|
+
}), /* @__PURE__ */ r("div", {
|
|
73
|
+
className: k.panelActions,
|
|
74
|
+
children: [a, /* @__PURE__ */ n(u, {
|
|
75
|
+
"aria-label": S.format("closePanel"),
|
|
76
|
+
onPress: o,
|
|
77
|
+
size: "medium",
|
|
78
|
+
variant: "icon",
|
|
79
|
+
children: /* @__PURE__ */ n(y, { size: 20 })
|
|
80
|
+
})]
|
|
81
|
+
})] }), /* @__PURE__ */ n(C, { children: s })]
|
|
82
|
+
});
|
|
83
|
+
}), M = (e) => null;
|
|
84
|
+
M.displayName = "usePanels";
|
|
85
|
+
var N = i({
|
|
86
|
+
panels: [],
|
|
87
|
+
panelVariant: "overlay",
|
|
88
|
+
addPanel: () => {},
|
|
89
|
+
closePanel: () => {},
|
|
90
|
+
removePanel: () => {},
|
|
91
|
+
resetPromoting: () => {}
|
|
92
|
+
}), P = ({ children: e, defaultPanels: t = [], panelBehavior: r = "replace", panelVariant: i = "overlay" }) => {
|
|
93
|
+
let [a, o] = l(t.map((e) => ({
|
|
94
|
+
...e,
|
|
95
|
+
isOpen: !0,
|
|
96
|
+
defaultOpen: !0
|
|
97
|
+
})));
|
|
98
|
+
return /* @__PURE__ */ n(N.Provider, {
|
|
99
|
+
value: {
|
|
100
|
+
panels: a,
|
|
101
|
+
panelVariant: i,
|
|
102
|
+
addPanel: (e) => {
|
|
103
|
+
o((t) => {
|
|
104
|
+
if (r === "replace") return [{
|
|
105
|
+
...e,
|
|
106
|
+
isOpen: !0
|
|
107
|
+
}];
|
|
108
|
+
let n = t.findIndex((t) => t.id === e.id);
|
|
109
|
+
if (n === -1) return [...t, {
|
|
110
|
+
...e,
|
|
111
|
+
isOpen: !0
|
|
112
|
+
}];
|
|
113
|
+
if (r === "bring-to-front") {
|
|
114
|
+
if (n === t.length - 1) return t;
|
|
115
|
+
let r = t[n];
|
|
116
|
+
return [...t.filter((t) => t.id !== e.id), {
|
|
117
|
+
...r,
|
|
118
|
+
isOpen: !0,
|
|
119
|
+
promoting: !0
|
|
120
|
+
}];
|
|
121
|
+
}
|
|
122
|
+
return r === "pop-to" ? t.map((e, t) => t > n ? {
|
|
123
|
+
...e,
|
|
124
|
+
isOpen: !1
|
|
125
|
+
} : e) : t;
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
closePanel: (e) => {
|
|
129
|
+
o((t) => t.map((t) => t.id === e ? {
|
|
130
|
+
...t,
|
|
131
|
+
isOpen: !1
|
|
132
|
+
} : t));
|
|
133
|
+
},
|
|
134
|
+
removePanel: (e) => {
|
|
135
|
+
o((t) => t.filter((t) => t.id !== e));
|
|
136
|
+
},
|
|
137
|
+
resetPromoting: (e) => {
|
|
138
|
+
o((t) => t.map((t) => t.id === e ? {
|
|
139
|
+
...t,
|
|
140
|
+
promoting: !1
|
|
141
|
+
} : t));
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
children: e
|
|
145
|
+
});
|
|
146
|
+
}, F = () => o(N), I = { push: "_push_a83oo_1" }, L = ({ children: t, className: i, ...a }) => {
|
|
147
|
+
let { panels: o, panelVariant: s, closePanel: c, removePanel: l, resetPromoting: u } = F(), d = o.length > 0;
|
|
148
|
+
return /* @__PURE__ */ r("div", {
|
|
149
|
+
className: e(i, s === "push" && I.push),
|
|
150
|
+
"data-open": s === "push" && d ? !0 : void 0,
|
|
151
|
+
...a,
|
|
152
|
+
children: [o.map(({ id: e, ...t }, r, { length: i }) => /* @__PURE__ */ n(A, {
|
|
153
|
+
"aria-hidden": r < i - 1 || void 0,
|
|
154
|
+
id: e,
|
|
155
|
+
onOpenChange: (t) => {
|
|
156
|
+
t || c(e);
|
|
157
|
+
},
|
|
158
|
+
onExited: () => l(e),
|
|
159
|
+
onPromotionEnd: () => u(e),
|
|
160
|
+
...t
|
|
161
|
+
}, e)), t]
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
//#endregion
|
|
165
|
+
export { M as a, T as c, N as i, C as l, F as n, A as o, P as r, D as s, L as t, x as u };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-CbxlCXZ3.js";
|
|
3
|
+
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
+
import { c as n, l as r, s as i, u as a } from "./panel-CJr6C1-h.js";
|
|
5
|
+
import { t as o } from "./utils-B0BlrR1T.js";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import l, { createContext as u } from "react";
|
|
8
|
+
import { Button as d, useLocalizedStringFormatter as f } from "@midas-ds/components";
|
|
9
|
+
import { useControlledState as p } from "@react-stately/utils";
|
|
10
|
+
import { filterDOMProps as m } from "@react-aria/utils";
|
|
11
|
+
import '../assets/sidebar.css';var h = t("panel-left-close", [
|
|
12
|
+
["rect", {
|
|
13
|
+
width: "18",
|
|
14
|
+
height: "18",
|
|
15
|
+
x: "3",
|
|
16
|
+
y: "3",
|
|
17
|
+
rx: "2",
|
|
18
|
+
key: "afitv7"
|
|
19
|
+
}],
|
|
20
|
+
["path", {
|
|
21
|
+
d: "M9 3v18",
|
|
22
|
+
key: "fh3hqa"
|
|
23
|
+
}],
|
|
24
|
+
["path", {
|
|
25
|
+
d: "m16 15-3-3 3-3",
|
|
26
|
+
key: "14y99z"
|
|
27
|
+
}]
|
|
28
|
+
]), g = t("panel-left-open", [
|
|
29
|
+
["rect", {
|
|
30
|
+
width: "18",
|
|
31
|
+
height: "18",
|
|
32
|
+
x: "3",
|
|
33
|
+
y: "3",
|
|
34
|
+
rx: "2",
|
|
35
|
+
key: "afitv7"
|
|
36
|
+
}],
|
|
37
|
+
["path", {
|
|
38
|
+
d: "M9 3v18",
|
|
39
|
+
key: "fh3hqa"
|
|
40
|
+
}],
|
|
41
|
+
["path", {
|
|
42
|
+
d: "m14 9 3 3-3 3",
|
|
43
|
+
key: "8010ee"
|
|
44
|
+
}]
|
|
45
|
+
]), _ = {
|
|
46
|
+
en: {
|
|
47
|
+
expandSidebar: "Expand sidebar",
|
|
48
|
+
collapseSidebar: "Collapse sidebar"
|
|
49
|
+
},
|
|
50
|
+
sv: {
|
|
51
|
+
expandSidebar: "Expandera sidopanel",
|
|
52
|
+
collapseSidebar: "Minimera sidopanel"
|
|
53
|
+
}
|
|
54
|
+
}, v = u(void 0), y = {
|
|
55
|
+
sidebar: "_sidebar_zlaev_1",
|
|
56
|
+
collapsed: "_collapsed_zlaev_8",
|
|
57
|
+
sidebarHeader: "_sidebarHeader_zlaev_17",
|
|
58
|
+
sidebarTitle: "_sidebarTitle_zlaev_26",
|
|
59
|
+
sidebarContent: "_sidebarContent_zlaev_49"
|
|
60
|
+
}, b = ({ children: t, className: u, title: b, ...x }) => {
|
|
61
|
+
let S = f(_), C = o(), [w, T] = p(x.isCollapsed, x.defaultCollapsed || !1, x.onCollapseChange), [E, D] = l.useState(!1), O = () => {
|
|
62
|
+
D(!0), T((e) => !e);
|
|
63
|
+
}, k = (e) => {
|
|
64
|
+
e.propertyName === "width" && e.target === e.currentTarget && D(!1);
|
|
65
|
+
};
|
|
66
|
+
return C ? null : /* @__PURE__ */ s(v.Provider, {
|
|
67
|
+
value: { isCollapsed: w },
|
|
68
|
+
children: /* @__PURE__ */ c(a, {
|
|
69
|
+
className: e(u, y.sidebar, { [y.collapsed]: w }),
|
|
70
|
+
"data-transitioning": E || void 0,
|
|
71
|
+
onTransitionEnd: k,
|
|
72
|
+
...m(x),
|
|
73
|
+
children: [/* @__PURE__ */ c(n, {
|
|
74
|
+
className: e(y.sidebarHeader, { [y.collapsed]: w }),
|
|
75
|
+
children: [b ? /* @__PURE__ */ s(i, {
|
|
76
|
+
className: e(y.sidebarTitle, { [y.collapsed]: w }),
|
|
77
|
+
title: b
|
|
78
|
+
}) : /* @__PURE__ */ s("div", {}), /* @__PURE__ */ s(d, {
|
|
79
|
+
"aria-label": w ? S.format("expandSidebar") : S.format("collapseSidebar"),
|
|
80
|
+
onPress: O,
|
|
81
|
+
variant: "icon",
|
|
82
|
+
size: w ? "large" : "medium",
|
|
83
|
+
children: s(w ? g : h, { size: 20 })
|
|
84
|
+
})]
|
|
85
|
+
}), /* @__PURE__ */ s(r, {
|
|
86
|
+
className: y.sidebarContent,
|
|
87
|
+
children: t
|
|
88
|
+
})]
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { v as n, b as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useEffect as e, useState as t } from "react";
|
|
3
|
+
import { useIsSSR as n } from "@react-aria/ssr";
|
|
4
|
+
//#region ../../node_modules/@react-spectrum/utils/dist/useMediaQuery.mjs
|
|
5
|
+
function r(r) {
|
|
6
|
+
let i = typeof window < "u" && typeof window.matchMedia == "function", [a, o] = t(() => i ? window.matchMedia(r).matches : !1);
|
|
7
|
+
return e(() => {
|
|
8
|
+
if (!i) return;
|
|
9
|
+
let e = window.matchMedia(r), t = (e) => {
|
|
10
|
+
o(e.matches);
|
|
11
|
+
};
|
|
12
|
+
return e.addListener(t), () => {
|
|
13
|
+
e.removeListener(t);
|
|
14
|
+
};
|
|
15
|
+
}, [i, r]), n() ? !1 : a;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/utils/useIsMobileDevice.ts
|
|
19
|
+
function i() {
|
|
20
|
+
return r("(max-width: 640px)");
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { i as t };
|
package/header/index.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
o as Header,
|
|
5
|
-
r as HeaderAction,
|
|
6
|
-
s as HeaderActions,
|
|
7
|
-
t as MobileMenu,
|
|
8
|
-
n as MobileMenuContext
|
|
9
|
-
};
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "../chunks/header--aFkqcRB.js";
|
|
2
|
+
export { i as Header, t as HeaderAction, e as HeaderActions, n as MobileMenu, r as MobileMenuContext };
|