@midas-ds/layout 0.0.54 → 0.0.55
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/Header.css +1 -1
- package/chunks/{Header-DZTCJyaZ.js → Header-Wswx-yQj.js} +29 -29
- package/header/index.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/assets/Header.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._headerActions_1rka5_1{display:flex;gap:.25rem;align-items:center;margin-inline-start:auto}@media(max-width:640px){._label_1191f_1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}}.
|
|
1
|
+
._headerActions_1rka5_1{display:flex;gap:.25rem;align-items:center;margin-inline-start:auto}@media(max-width:640px){._label_1191f_1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}}._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);left:0;position:sticky;width:clamp(10rem,15rem,90%);border-right:1px solid var(--midas-border-color-subtle);box-shadow:-8px 0 20px #0000001a;height:calc(100dvh + 200px);margin-right:auto;outline:none;overflow-y:auto;top:-100px}._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);display:block;margin-bottom:var(--midas-space-medium);padding:var(--midas-space-medium);position:sticky;top:0}@keyframes _drawer-blur_1gblg_1{0%{background:#0000;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(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);display:flex;gap:var(--midas-space-xlarge)}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as e, jsxs as
|
|
2
|
+
import { jsx as e, jsxs as t, Fragment as b } from "react/jsx-runtime";
|
|
3
3
|
import { c } from "./clsx-OuTLNxxd.js";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { composeRenderProps as d, Modal as
|
|
6
|
-
import { Button as m, useLocalizedStringFormatter as
|
|
4
|
+
import { forwardRef as v } from "react";
|
|
5
|
+
import { composeRenderProps as d, Modal as M, Dialog as f } from "react-aria-components";
|
|
6
|
+
import { Button as m, useLocalizedStringFormatter as y, DialogTrigger as N, ModalOverlay as x, Text as A, clsx as w, LogoContext as H } from "@midas-ds/components";
|
|
7
7
|
import { u as h } from "./useIsMobileDevice-D0iMVFPx.js";
|
|
8
|
-
import { M as
|
|
9
|
-
import { c as
|
|
10
|
-
import '../assets/Header.css';const
|
|
11
|
-
headerActions:
|
|
8
|
+
import { M as k } from "./MobileMenuContext-Coj0sJ0N.js";
|
|
9
|
+
import { c as D } from "./createLucideIcon-CP-mMPfa.js";
|
|
10
|
+
import '../assets/Header.css';const $ = "_headerActions_1rka5_1", j = {
|
|
11
|
+
headerActions: $
|
|
12
12
|
}, Z = ({ className: a, ...o }) => /* @__PURE__ */ e(
|
|
13
13
|
"div",
|
|
14
14
|
{
|
|
15
|
-
className: c(a,
|
|
15
|
+
className: c(a, j.headerActions),
|
|
16
16
|
...o
|
|
17
17
|
}
|
|
18
|
-
),
|
|
19
|
-
label:
|
|
20
|
-
}, L =
|
|
21
|
-
({ children: a, icon: o, ...r },
|
|
18
|
+
), P = "_label_1191f_1", z = {
|
|
19
|
+
label: P
|
|
20
|
+
}, L = v(
|
|
21
|
+
({ children: a, icon: o, ...r }, l) => (!a && !r["aria-label"] && process.env.NODE_ENV !== "production" && console.warn(
|
|
22
22
|
"Please provide an 'aria-label' for HeaderAction components that doesnt have a visible label (children)"
|
|
23
23
|
), /* @__PURE__ */ e(
|
|
24
24
|
m,
|
|
25
25
|
{
|
|
26
|
-
ref:
|
|
26
|
+
ref: l,
|
|
27
27
|
size: "medium",
|
|
28
28
|
variant: "tertiary",
|
|
29
29
|
...r,
|
|
30
|
-
children: d(a, (s) => /* @__PURE__ */
|
|
30
|
+
children: d(a, (s) => /* @__PURE__ */ t(b, { children: [
|
|
31
31
|
o,
|
|
32
|
-
typeof s < "u" && /* @__PURE__ */ e("span", { className:
|
|
32
|
+
typeof s < "u" && /* @__PURE__ */ e("span", { className: z.label, children: s })
|
|
33
33
|
] }))
|
|
34
34
|
}
|
|
35
35
|
))
|
|
@@ -39,10 +39,10 @@ const O = [
|
|
|
39
39
|
["path", { d: "M4 5h16", key: "1tepv9" }],
|
|
40
40
|
["path", { d: "M4 12h16", key: "1lakjw" }],
|
|
41
41
|
["path", { d: "M4 19h16", key: "1djgab" }]
|
|
42
|
-
], C =
|
|
42
|
+
], C = D("menu", O), E = { openMenu: "Open menu" }, F = { openMenu: "Öppna meny" }, I = {
|
|
43
43
|
en: E,
|
|
44
44
|
sv: F
|
|
45
|
-
}, R = "
|
|
45
|
+
}, R = "_overlay_1gblg_1", T = "_drawer_1gblg_14", B = "_dialog_1gblg_39", S = "_header_1gblg_45", n = {
|
|
46
46
|
overlay: R,
|
|
47
47
|
drawer: T,
|
|
48
48
|
dialog: B,
|
|
@@ -51,35 +51,35 @@ const O = [
|
|
|
51
51
|
children: a,
|
|
52
52
|
className: o,
|
|
53
53
|
defaultOpen: r,
|
|
54
|
-
isOpen:
|
|
54
|
+
isOpen: l,
|
|
55
55
|
onOpenChange: s,
|
|
56
56
|
title: i,
|
|
57
57
|
...p
|
|
58
58
|
}) => {
|
|
59
|
-
const
|
|
60
|
-
return
|
|
61
|
-
|
|
59
|
+
const _ = h(), g = y(I);
|
|
60
|
+
return _ ? /* @__PURE__ */ e(k.Provider, { value: {}, children: /* @__PURE__ */ t(
|
|
61
|
+
N,
|
|
62
62
|
{
|
|
63
|
-
isOpen:
|
|
63
|
+
isOpen: l,
|
|
64
64
|
onOpenChange: s,
|
|
65
65
|
defaultOpen: r,
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ e(
|
|
68
68
|
m,
|
|
69
69
|
{
|
|
70
|
-
"aria-label":
|
|
70
|
+
"aria-label": g.format("openMenu"),
|
|
71
71
|
icon: C,
|
|
72
72
|
variant: "icon"
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
75
|
/* @__PURE__ */ e(
|
|
76
|
-
|
|
76
|
+
x,
|
|
77
77
|
{
|
|
78
|
-
className:
|
|
78
|
+
className: w(o, n.overlay),
|
|
79
79
|
isDismissable: !0,
|
|
80
80
|
...p,
|
|
81
|
-
children: d(a, (u) => /* @__PURE__ */ e(
|
|
82
|
-
i && /* @__PURE__ */ e(
|
|
81
|
+
children: d(a, (u) => /* @__PURE__ */ e(M, { className: n.drawer, children: /* @__PURE__ */ t(f, { className: n.dialog, children: [
|
|
82
|
+
i && /* @__PURE__ */ e(A, { className: n.header, children: i }),
|
|
83
83
|
u
|
|
84
84
|
] }) }))
|
|
85
85
|
}
|
|
@@ -91,7 +91,7 @@ const O = [
|
|
|
91
91
|
header: V
|
|
92
92
|
}, ae = ({ className: a, ...o }) => {
|
|
93
93
|
const r = h();
|
|
94
|
-
return /* @__PURE__ */ e(
|
|
94
|
+
return /* @__PURE__ */ e(H.Provider, { value: { size: r ? "x-small" : "large" }, children: /* @__PURE__ */ e(
|
|
95
95
|
"header",
|
|
96
96
|
{
|
|
97
97
|
className: c(a, q.header),
|
package/header/index.js
CHANGED
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as o, a as t, b as n, M as r } from "./chunks/Header-
|
|
1
|
+
import { H as o, a as t, b as n, M as r } from "./chunks/Header-Wswx-yQj.js";
|
|
2
2
|
import { L as i, a as x } from "./chunks/LayoutContent-jW-93mu7.js";
|
|
3
3
|
import { M as P } from "./chunks/Main-CM4QXTmL.js";
|
|
4
4
|
import { N as b, a as d, b as f, c as p, d as M, e as N } from "./chunks/NavigationSubMenu-D3hvuVFG.js";
|
package/package.json
CHANGED