@midas-ds/layout 0.2.49 → 0.2.51
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 +20 -0
- package/chunks/header-D4J0i_bA.js +90 -0
- package/chunks/{layout-D1po9FHB.js → layout-DNM8xMYM.js} +1 -1
- package/chunks/{main-fC0vGdZw.js → main-DsKDUX08.js} +1 -1
- package/chunks/{navbar-DwUBXEZn.js → navbar-BVgnjg2G.js} +1 -1
- package/chunks/{navigation-DBKcWjzG.js → navigation-R9Acriur.js} +23 -23
- package/chunks/panel-Dekrlpea.js +159 -0
- package/chunks/sidebar-D5GGUdTv.js +63 -0
- package/header/index.js +1 -1
- package/index.js +8 -8
- package/layout/index.js +1 -1
- package/main/index.js +1 -1
- package/navbar/index.js +1 -1
- package/navigation/index.js +1 -1
- package/package.json +4 -2
- package/panel/index.js +1 -1
- package/sidebar/index.js +1 -1
- package/utils/index.js +12 -2
- package/chunks/clsx-Bok9rGJm.js +0 -18
- package/chunks/createLucideIcon-BgluSHFG.js +0 -39
- package/chunks/header-CKgqPF7j.js +0 -103
- package/chunks/panel-MI09-Qe_.js +0 -165
- package/chunks/sidebar-BYqoekwF.js +0 -80
- package/chunks/utils-CjjqyX25.js +0 -39
- package/header/Header.stories.d.ts +0 -15
- package/header/header-action/HeaderAction.stories.d.ts +0 -14
- package/header/header-actions/HeaderActions.stories.d.ts +0 -13
- package/header/mobile-menu/MobileMenu.stories.d.ts +0 -19
- package/layout/Layout.stories.d.ts +0 -18
- package/navbar/Navbar.stories.d.ts +0 -23
- package/navigation/Navigation.stories.d.ts +0 -25
- package/navigation/navigation-link/NavigationLink.stories.d.ts +0 -25
- package/panel/Panel.stories.d.ts +0 -317
- package/sidebar/Sidebar.stories.d.ts +0 -22
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-Bok9rGJm.js";
|
|
3
|
-
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
-
import { t as n } from "./utils-CjjqyX25.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, Logo 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_zpqnd_1" }, y = ({ children: t, className: n }) => /* @__PURE__ */ i("div", {
|
|
10
|
-
className: e(v.headerActions, n),
|
|
11
|
-
children: t
|
|
12
|
-
}), b = {
|
|
13
|
-
headerAction: "_headerAction_dgfa1_1",
|
|
14
|
-
label: "_label_dgfa1_7"
|
|
15
|
-
}, x = s(({ children: t, icon: n, className: o, ...s }, c) => (!t && !s["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, {
|
|
16
|
-
ref: c,
|
|
17
|
-
size: "medium",
|
|
18
|
-
variant: "tertiary",
|
|
19
|
-
className: e(b.headerAction, o),
|
|
20
|
-
...s,
|
|
21
|
-
children: u(t, (e) => /* @__PURE__ */ a(r, { children: [n, e !== void 0 && /* @__PURE__ */ i("span", {
|
|
22
|
-
className: b.label,
|
|
23
|
-
children: e
|
|
24
|
-
})] }))
|
|
25
|
-
})));
|
|
26
|
-
x.displayName = "HeaderAction";
|
|
27
|
-
var S = {
|
|
28
|
-
mobile: "_mobile_vwr3x_1",
|
|
29
|
-
desktop: "_desktop_vwr3x_11"
|
|
30
|
-
}, C = ({ primary: e }) => /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(p, {
|
|
31
|
-
size: "x-small",
|
|
32
|
-
primary: e,
|
|
33
|
-
padding: !1,
|
|
34
|
-
className: S.mobile
|
|
35
|
-
}), /* @__PURE__ */ i(p, {
|
|
36
|
-
size: "small",
|
|
37
|
-
primary: e,
|
|
38
|
-
padding: !1,
|
|
39
|
-
className: S.desktop
|
|
40
|
-
})] }), w = { headerTitle: "_headerTitle_cw9hi_1" }, T = ({ className: t, ...n }) => /* @__PURE__ */ i("span", {
|
|
41
|
-
className: e(w.headerTitle, t),
|
|
42
|
-
...n
|
|
43
|
-
}), E = t("menu", [
|
|
44
|
-
["path", {
|
|
45
|
-
d: "M4 5h16",
|
|
46
|
-
key: "1tepv9"
|
|
47
|
-
}],
|
|
48
|
-
["path", {
|
|
49
|
-
d: "M4 12h16",
|
|
50
|
-
key: "1lakjw"
|
|
51
|
-
}],
|
|
52
|
-
["path", {
|
|
53
|
-
d: "M4 19h16",
|
|
54
|
-
key: "1djgab"
|
|
55
|
-
}]
|
|
56
|
-
]), D = o(void 0), O = {
|
|
57
|
-
en: { openMenu: "Open menu" },
|
|
58
|
-
sv: { openMenu: "Öppna meny" }
|
|
59
|
-
}, k = {
|
|
60
|
-
triggerButton: "_triggerButton_1k2eg_1",
|
|
61
|
-
overlay: "_overlay_1k2eg_5",
|
|
62
|
-
"drawer-blur": "_drawer-blur_1k2eg_1",
|
|
63
|
-
drawer: "_drawer_1k2eg_18",
|
|
64
|
-
"drawer-slide": "_drawer-slide_1k2eg_1",
|
|
65
|
-
dialog: "_dialog_1k2eg_43",
|
|
66
|
-
header: "_header_1k2eg_49"
|
|
67
|
-
}, A = ({ children: e, className: t, defaultOpen: r, isOpen: o, onOpenChange: s, title: p, ...v }) => {
|
|
68
|
-
let y = n(), b = _(O);
|
|
69
|
-
return y ? /* @__PURE__ */ i(D.Provider, {
|
|
70
|
-
value: {},
|
|
71
|
-
children: /* @__PURE__ */ a(f, {
|
|
72
|
-
isOpen: o,
|
|
73
|
-
onOpenChange: s,
|
|
74
|
-
defaultOpen: r,
|
|
75
|
-
children: [/* @__PURE__ */ i(d, {
|
|
76
|
-
"aria-label": b.format("openMenu"),
|
|
77
|
-
icon: E,
|
|
78
|
-
variant: "icon",
|
|
79
|
-
size: "medium",
|
|
80
|
-
className: k.triggerButton
|
|
81
|
-
}), /* @__PURE__ */ i(m, {
|
|
82
|
-
className: g(t, k.overlay),
|
|
83
|
-
isDismissable: !0,
|
|
84
|
-
...v,
|
|
85
|
-
children: u(e, (e) => /* @__PURE__ */ i(l, {
|
|
86
|
-
className: k.drawer,
|
|
87
|
-
children: /* @__PURE__ */ a(c, {
|
|
88
|
-
className: k.dialog,
|
|
89
|
-
children: [p && /* @__PURE__ */ i(h, {
|
|
90
|
-
className: k.header,
|
|
91
|
-
children: p
|
|
92
|
-
}), e]
|
|
93
|
-
})
|
|
94
|
-
}))
|
|
95
|
-
})]
|
|
96
|
-
})
|
|
97
|
-
}) : null;
|
|
98
|
-
}, j = { header: "_header_s0sjn_1" }, M = ({ className: t, ...n }) => /* @__PURE__ */ i("header", {
|
|
99
|
-
className: e(t, j.header),
|
|
100
|
-
...n
|
|
101
|
-
});
|
|
102
|
-
//#endregion
|
|
103
|
-
export { C as a, T as i, A as n, x as o, D as r, y as s, M as t };
|
package/chunks/panel-MI09-Qe_.js
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-Bok9rGJm.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_16dwe_6",
|
|
36
|
-
promote: "_promote_16dwe_1",
|
|
37
|
-
"slide-horizontally": "_slide-horizontally_16dwe_1",
|
|
38
|
-
"slide-vertically": "_slide-vertically_16dwe_1",
|
|
39
|
-
panelActions: "_panelActions_16dwe_63",
|
|
40
|
-
panelTitle: "_panelTitle_16dwe_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_xcbfl_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 };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { t as e } from "./clsx-Bok9rGJm.js";
|
|
3
|
-
import { t } from "./createLucideIcon-BgluSHFG.js";
|
|
4
|
-
import { c as n, l as r, s as i, u as a } from "./panel-MI09-Qe_.js";
|
|
5
|
-
import { t as o } from "./utils-CjjqyX25.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 = {
|
|
29
|
-
en: {
|
|
30
|
-
expandSidebar: "Expand sidebar",
|
|
31
|
-
collapseSidebar: "Collapse sidebar"
|
|
32
|
-
},
|
|
33
|
-
sv: {
|
|
34
|
-
expandSidebar: "Expandera sidopanel",
|
|
35
|
-
collapseSidebar: "Minimera sidopanel"
|
|
36
|
-
}
|
|
37
|
-
}, _ = u(void 0), v = {
|
|
38
|
-
sidebar: "_sidebar_1gkx7_1",
|
|
39
|
-
collapsed: "_collapsed_1gkx7_8",
|
|
40
|
-
sidebarHeader: "_sidebarHeader_1gkx7_20",
|
|
41
|
-
sidebarTitle: "_sidebarTitle_1gkx7_29",
|
|
42
|
-
collapseButton: "_collapseButton_1gkx7_47",
|
|
43
|
-
sidebarContent: "_sidebarContent_1gkx7_55"
|
|
44
|
-
}, y = ({ children: t, className: u, title: y, ...b }) => {
|
|
45
|
-
let x = f(g), S = o(), [C, w] = p(b.isCollapsed, b.defaultCollapsed || !1, b.onCollapseChange), [T, E] = l.useState(!1), D = () => {
|
|
46
|
-
E(!0), w((e) => !e);
|
|
47
|
-
}, O = (e) => {
|
|
48
|
-
e.propertyName === "width" && e.target === e.currentTarget && E(!1);
|
|
49
|
-
};
|
|
50
|
-
return S ? null : /* @__PURE__ */ s(_.Provider, {
|
|
51
|
-
value: { isCollapsed: C },
|
|
52
|
-
children: /* @__PURE__ */ c(a, {
|
|
53
|
-
className: e(u, v.sidebar, { [v.collapsed]: C }),
|
|
54
|
-
"data-transitioning": T || void 0,
|
|
55
|
-
onTransitionEnd: O,
|
|
56
|
-
...m(b, { propNames: /* @__PURE__ */ new Set(["style"]) }),
|
|
57
|
-
children: [/* @__PURE__ */ c(n, {
|
|
58
|
-
className: e(v.sidebarHeader, { [v.collapsed]: C }),
|
|
59
|
-
children: [/* @__PURE__ */ s(i, {
|
|
60
|
-
className: e(v.sidebarTitle, { [v.collapsed]: C }),
|
|
61
|
-
title: y
|
|
62
|
-
}), /* @__PURE__ */ s(d, {
|
|
63
|
-
"aria-label": C ? x.format("expandSidebar") : x.format("collapseSidebar"),
|
|
64
|
-
onPress: D,
|
|
65
|
-
variant: "icon",
|
|
66
|
-
size: "medium",
|
|
67
|
-
children: /* @__PURE__ */ s("span", {
|
|
68
|
-
className: e(v.collapseButton, { [v.collapsed]: C }),
|
|
69
|
-
children: /* @__PURE__ */ s(h, { size: 20 })
|
|
70
|
-
})
|
|
71
|
-
})]
|
|
72
|
-
}), /* @__PURE__ */ s(r, {
|
|
73
|
-
className: v.sidebarContent,
|
|
74
|
-
children: t
|
|
75
|
-
})]
|
|
76
|
-
})
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
//#endregion
|
|
80
|
-
export { _ as n, y as t };
|
package/chunks/utils-CjjqyX25.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import e, { useContext as t, useEffect as n, useState as r } from "react";
|
|
3
|
-
String(Math.round(Math.random() * 1e10));
|
|
4
|
-
//#region ../../node_modules/react-aria/dist/private/ssr/SSRProvider.mjs
|
|
5
|
-
var i = /*#__PURE__*/ e.createContext(!1);
|
|
6
|
-
typeof window < "u" && window.document && window.document.createElement, e.useId;
|
|
7
|
-
function a() {
|
|
8
|
-
return !1;
|
|
9
|
-
}
|
|
10
|
-
function o() {
|
|
11
|
-
return !0;
|
|
12
|
-
}
|
|
13
|
-
function s(e) {
|
|
14
|
-
return () => {};
|
|
15
|
-
}
|
|
16
|
-
function c() {
|
|
17
|
-
return typeof e.useSyncExternalStore == "function" ? e.useSyncExternalStore(s, a, o) : t(i);
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region ../../node_modules/@adobe/react-spectrum/dist/private/utils/useMediaQuery.mjs
|
|
21
|
-
function l(e) {
|
|
22
|
-
let t = typeof window < "u" && typeof window.matchMedia == "function", [i, a] = r(() => t ? window.matchMedia(e).matches : !1);
|
|
23
|
-
return n(() => {
|
|
24
|
-
if (!t) return;
|
|
25
|
-
let n = window.matchMedia(e), r = (e) => {
|
|
26
|
-
a(e.matches);
|
|
27
|
-
};
|
|
28
|
-
return n.addListener(r), () => {
|
|
29
|
-
n.removeListener(r);
|
|
30
|
-
};
|
|
31
|
-
}, [t, e]), !c() && i;
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/utils/useIsMobileDevice.ts
|
|
35
|
-
function u() {
|
|
36
|
-
return l("(max-width: 640px)");
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
export { u as t };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { Header } from './Header';
|
|
3
|
-
type Story = StoryObj<typeof Header>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
component: ({ className, ...rest }: import('./Header').HeaderProps) => import('react').JSX.Element;
|
|
6
|
-
title: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: string;
|
|
10
|
-
rootElement: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
14
|
-
export declare const Desktop: Story;
|
|
15
|
-
export declare const Mobile: Story;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { HeaderAction } from '.';
|
|
3
|
-
type Story = StoryObj<typeof HeaderAction>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
component: import('react').ForwardRefExoticComponent<import('./HeaderAction').HeaderActionProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
title: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
|
13
|
-
export declare const Primary: Story;
|
|
14
|
-
export declare const IconOnly: Story;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { HeaderActions } from './HeaderActions';
|
|
3
|
-
type Story = StoryObj<typeof HeaderActions>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
component: ({ children, className }: import('./HeaderActions').HeaderActionsProps) => import('react').JSX.Element;
|
|
6
|
-
title: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
|
13
|
-
export declare const Primary: Story;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { MobileMenu } from '.';
|
|
3
|
-
type Story = StoryObj<typeof MobileMenu>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
component: ({ children, className, defaultOpen, isOpen, onOpenChange, title, ...rest }: import('./MobileMenu').MobileMenuProps) => import('react').JSX.Element | null;
|
|
6
|
-
title: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
globals: {
|
|
9
|
-
viewport: {
|
|
10
|
-
value: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
args: {
|
|
14
|
-
children: import('react').JSX.Element;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export default _default;
|
|
18
|
-
export declare const Primary: Story;
|
|
19
|
-
export declare const Controlled: Story;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { Layout } from '.';
|
|
3
|
-
type Story = StoryObj<typeof Layout>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
component: ({ children, className, ...rest }: import('./Layout').LayoutProps) => import('react').JSX.Element;
|
|
6
|
-
title: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
args: {
|
|
9
|
-
children: string;
|
|
10
|
-
};
|
|
11
|
-
parameters: {
|
|
12
|
-
layout: string;
|
|
13
|
-
rootElement: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export default _default;
|
|
17
|
-
export declare const WithMobileMenu: Story;
|
|
18
|
-
export declare const WithNavbar: Story;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { Navbar } from './Navbar';
|
|
3
|
-
type Story = StoryObj<typeof Navbar>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
component: ({ className, children, ...rest }: import('./Navbar').NavbarProps) => import('react').JSX.Element;
|
|
6
|
-
title: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: string;
|
|
10
|
-
rootElement: string;
|
|
11
|
-
};
|
|
12
|
-
globals: {
|
|
13
|
-
viewport: {
|
|
14
|
-
value: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
args: {
|
|
18
|
-
children: import('react').JSX.Element;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
22
|
-
export declare const Primary: Story;
|
|
23
|
-
export declare const FiveItems: Story;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { Navigation } from '.';
|
|
3
|
-
import { Key } from 'react-aria-components';
|
|
4
|
-
import { ReactNode } from 'react';
|
|
5
|
-
type Story<T extends object = Item> = StoryObj<typeof Navigation<T>>;
|
|
6
|
-
type Section = {
|
|
7
|
-
id: Key;
|
|
8
|
-
title?: string;
|
|
9
|
-
children: Item[];
|
|
10
|
-
};
|
|
11
|
-
type Item = {
|
|
12
|
-
id: Key;
|
|
13
|
-
title: string;
|
|
14
|
-
href: string;
|
|
15
|
-
icon?: ReactNode;
|
|
16
|
-
children?: Item[];
|
|
17
|
-
};
|
|
18
|
-
declare const _default: {
|
|
19
|
-
component: <T extends object>({ className, items, children, dependencies, idScope, addIdAndValue, ...rest }: import('./Navigation').NavigationProps<T>) => import('react').JSX.Element;
|
|
20
|
-
title: string;
|
|
21
|
-
tags: string[];
|
|
22
|
-
};
|
|
23
|
-
export default _default;
|
|
24
|
-
export declare const Flat: Story;
|
|
25
|
-
export declare const Nested: Story<Section>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { NavigationLink } from '.';
|
|
3
|
-
type Story = StoryObj<typeof NavigationLink>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
component: <C extends import('react').ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null>({ as, children, className, isActive, isDisabled, icon, "aria-label": ariaLabel, ...rest }: import('./NavigationLink').NavigationLinkProps<C>) => import('react').JSX.Element;
|
|
6
|
-
title: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
args: {
|
|
9
|
-
children: string;
|
|
10
|
-
href: string;
|
|
11
|
-
icon: import('react').JSX.Element;
|
|
12
|
-
};
|
|
13
|
-
parameters: {
|
|
14
|
-
layout: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export default _default;
|
|
18
|
-
export declare const Primary: Story;
|
|
19
|
-
export declare const Active: Story;
|
|
20
|
-
export declare const Disabled: Story;
|
|
21
|
-
export declare const Collapsed: Story;
|
|
22
|
-
export declare const WithBadge: Story;
|
|
23
|
-
export declare const WithBadgeLabel: Story;
|
|
24
|
-
export declare const WithBadgeActive: Story;
|
|
25
|
-
export declare const WithBadgeCollapsed: Story;
|