@statsbygg/layout 0.0.7 → 0.0.10
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/dist/components/Breadcrumbs/Breadcrumbs.module.css +22 -0
- package/dist/components/GlobalFooter/GlobalFooter.module.css +28 -0
- package/dist/components/GlobalHeader/GlobalHeader.module.css +70 -0
- package/dist/components/MenuButton/MenuButton.module.css +41 -0
- package/dist/components/RootLayout/RootLayout.module.css +9 -0
- package/dist/index.js +4 -391
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -352
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -12
- package/dist/index.css +0 -154
- package/dist/index.css.map +0 -1
- package/dist/logo-JRXKWS5H.svg +0 -29
package/dist/index.mjs
CHANGED
|
@@ -1,356 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { useEffect } from "react";
|
|
5
|
-
import clsx4 from "clsx";
|
|
6
|
-
|
|
7
|
-
// src/components/GlobalHeader/GlobalHeader.tsx
|
|
8
|
-
import { useState } from "react";
|
|
9
|
-
import { Link as Link2, Textfield } from "@digdir/designsystemet-react";
|
|
10
|
-
import clsx2 from "clsx";
|
|
11
|
-
|
|
12
|
-
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
13
|
-
import { usePathname } from "next/navigation";
|
|
14
|
-
import { Breadcrumbs } from "@digdir/designsystemet-react";
|
|
15
|
-
import clsx from "clsx";
|
|
16
|
-
|
|
17
|
-
// src/components/Breadcrumbs/Breadcrumbs.module.css
|
|
18
|
-
var Breadcrumbs_default = {
|
|
19
|
-
breadcrumbs: "Breadcrumbs_breadcrumbs",
|
|
20
|
-
link: "Breadcrumbs_link",
|
|
21
|
-
currentLink: "Breadcrumbs_currentLink"
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// src/routes.ts
|
|
25
|
-
var ZONE_TREES_INPUT = {
|
|
26
|
-
sbno: {
|
|
27
|
-
segment: "",
|
|
28
|
-
// primary root route, no breadcrumb
|
|
29
|
-
label: "Hjem",
|
|
30
|
-
children: [
|
|
31
|
-
{ segment: "nyheter", label: "Nyheter" }
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
lokaler: {
|
|
35
|
-
segment: "lokaler",
|
|
36
|
-
label: "Statens eide og leide lokaler",
|
|
37
|
-
children: [
|
|
38
|
-
{
|
|
39
|
-
segment: "lokalbruk",
|
|
40
|
-
label: "Lokalbruk"
|
|
41
|
-
},
|
|
42
|
-
{ segment: "veiledning", label: "Veiledning" },
|
|
43
|
-
{ segment: "statlige-eiendommer", label: "Statlige eiendommer" },
|
|
44
|
-
{ segment: "ledig-for-fremleie", label: "Ledig for fremleie" },
|
|
45
|
-
{ segment: "statistikk", label: "Statistikk" }
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var ROUTES_INDEX = {};
|
|
50
|
-
var PARENT_INDEX = /* @__PURE__ */ new Map();
|
|
51
|
-
var ZONE_TREES = {};
|
|
52
|
-
function isSegmentNode(n) {
|
|
53
|
-
return n.segment !== void 0 && n.path === void 0;
|
|
54
|
-
}
|
|
55
|
-
function isPathNode(n) {
|
|
56
|
-
return n.path !== void 0;
|
|
57
|
-
}
|
|
58
|
-
function joinPath(base, seg) {
|
|
59
|
-
if (!base) return seg ? `/${seg}` : "/";
|
|
60
|
-
return seg ? `${base.replace(/\/+$/, "")}/${seg.replace(/^\/+/, "")}` : base || "/";
|
|
61
|
-
}
|
|
62
|
-
function normalizeToAbsolute(node, base = "") {
|
|
63
|
-
var _a;
|
|
64
|
-
const path = isSegmentNode(node) ? joinPath(base, node.segment) : isPathNode(node) ? node.path === "" ? "/" : node.path : "/";
|
|
65
|
-
const children = ((_a = node.children) != null ? _a : []).map((c) => normalizeToAbsolute(c, path));
|
|
66
|
-
return { path, label: node.label, children: children.length ? children : void 0 };
|
|
67
|
-
}
|
|
68
|
-
(function buildAll() {
|
|
69
|
-
Object.keys(ZONE_TREES_INPUT).forEach((zone) => {
|
|
70
|
-
ZONE_TREES[zone] = normalizeToAbsolute(ZONE_TREES_INPUT[zone]);
|
|
71
|
-
});
|
|
72
|
-
function walk(zone, node, parentKey) {
|
|
73
|
-
var _a;
|
|
74
|
-
const def = { zone, path: node.path, label: node.label };
|
|
75
|
-
const key = `${zone}:${node.path}`;
|
|
76
|
-
ROUTES_INDEX[zone].push(def);
|
|
77
|
-
PARENT_INDEX.set(key, parentKey);
|
|
78
|
-
for (const child of (_a = node.children) != null ? _a : []) {
|
|
79
|
-
walk(zone, child, key);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
Object.keys(ZONE_TREES).forEach((zone) => {
|
|
83
|
-
ROUTES_INDEX[zone] = [];
|
|
84
|
-
walk(zone, ZONE_TREES[zone], null);
|
|
85
|
-
});
|
|
86
|
-
})();
|
|
87
|
-
function findBestMatch(zone, pathname) {
|
|
88
|
-
var _a;
|
|
89
|
-
const list = (_a = ROUTES_INDEX[zone]) != null ? _a : [];
|
|
90
|
-
let best;
|
|
91
|
-
for (const r of list) {
|
|
92
|
-
if (pathname === r.path) {
|
|
93
|
-
best = r;
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
if (pathname.startsWith(r.path.endsWith("/") ? r.path : r.path + "/")) {
|
|
97
|
-
if (!best || r.path.length > best.path.length) best = r;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return best != null ? best : list.find((r) => {
|
|
101
|
-
var _a2;
|
|
102
|
-
return r.path === ((_a2 = ZONE_TREES[zone]) == null ? void 0 : _a2.path);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function getZoneMenuRoutes(zone) {
|
|
106
|
-
var _a;
|
|
107
|
-
const root = ZONE_TREES[zone];
|
|
108
|
-
const children = (_a = root == null ? void 0 : root.children) != null ? _a : [];
|
|
109
|
-
return children.map((c) => ({ zone, path: c.path, label: c.label }));
|
|
110
|
-
}
|
|
111
|
-
function getAllZones() {
|
|
112
|
-
return Object.keys(ZONE_TREES);
|
|
113
|
-
}
|
|
114
|
-
function getZoneRoot(zone) {
|
|
115
|
-
var _a;
|
|
116
|
-
return ((_a = ZONE_TREES[zone]) == null ? void 0 : _a.path) || "/";
|
|
117
|
-
}
|
|
118
|
-
function labelFromSlug(slug) {
|
|
119
|
-
try {
|
|
120
|
-
const s = decodeURIComponent(slug).replace(/[-_]+/g, " ").trim();
|
|
121
|
-
return s ? s.charAt(0).toUpperCase() + s.slice(1) : slug;
|
|
122
|
-
} catch (e) {
|
|
123
|
-
return slug;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function getBreadcrumbs(zone, pathname) {
|
|
127
|
-
var _a, _b;
|
|
128
|
-
const normalizedPathname = pathname === "/" ? pathname : pathname.replace(/\/+$/, "");
|
|
129
|
-
if (zone === "sbno" && normalizedPathname === "/") return [];
|
|
130
|
-
const match = findBestMatch(zone, normalizedPathname);
|
|
131
|
-
if (!match) return [];
|
|
132
|
-
const chain = [];
|
|
133
|
-
let key = `${zone}:${match.path}`;
|
|
134
|
-
while (key) {
|
|
135
|
-
const parentKey = PARENT_INDEX.get(key);
|
|
136
|
-
const [z, p] = key.split(":");
|
|
137
|
-
const def = ((_a = ROUTES_INDEX[z]) != null ? _a : []).find((r) => r.path === p);
|
|
138
|
-
if (def) chain.unshift(def);
|
|
139
|
-
key = parentKey != null ? parentKey : void 0;
|
|
140
|
-
}
|
|
141
|
-
const homeRoute = ((_b = ROUTES_INDEX.sbno) != null ? _b : []).find((r) => r.path === "/");
|
|
142
|
-
if (homeRoute && !(chain.length === 1 && chain[0].zone === "sbno" && chain[0].path === "/") && (chain.length === 0 || chain[0].path !== homeRoute.path)) {
|
|
143
|
-
chain.unshift(homeRoute);
|
|
144
|
-
}
|
|
145
|
-
const last = chain[chain.length - 1];
|
|
146
|
-
if (last && normalizedPathname !== last.path && normalizedPathname.startsWith(last.path.endsWith("/") ? last.path : last.path + "/")) {
|
|
147
|
-
const segments = normalizedPathname.split("/").filter(Boolean);
|
|
148
|
-
const tail = segments[segments.length - 1];
|
|
149
|
-
chain.push({ zone, path: normalizedPathname, label: labelFromSlug(tail) });
|
|
150
|
-
}
|
|
151
|
-
return chain.map((r) => ({ label: r.label, href: r.path }));
|
|
152
|
-
}
|
|
153
|
-
function transformHrefForZone(targetPath, currentZone, options) {
|
|
154
|
-
const { isDev, prodUrl } = options;
|
|
155
|
-
const targetZone = getZoneFromPathname(targetPath);
|
|
156
|
-
const isCrossZone = targetZone !== currentZone;
|
|
157
|
-
if (isCrossZone && isDev && prodUrl) {
|
|
158
|
-
return `${prodUrl}${targetPath}`;
|
|
159
|
-
}
|
|
160
|
-
const currentZoneRoot = getZoneRoot(currentZone);
|
|
161
|
-
if (!isCrossZone && isDev && currentZoneRoot !== "/") {
|
|
162
|
-
return targetPath.replace(currentZoneRoot, "") || "/";
|
|
163
|
-
}
|
|
164
|
-
return targetPath;
|
|
165
|
-
}
|
|
166
|
-
function getZoneFromPathname(pathname) {
|
|
167
|
-
if (pathname.startsWith("/lokaler")) return "lokaler";
|
|
168
|
-
return "sbno";
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
172
|
-
import { jsx } from "react/jsx-runtime";
|
|
173
|
-
function SbBreadcrumbs({ className, zone }) {
|
|
174
|
-
const pathname = usePathname();
|
|
175
|
-
const isDev = process.env.NODE_ENV === "development";
|
|
176
|
-
const prodUrl = "https://www.statsbygg.no";
|
|
177
|
-
const zoneRoot = getZoneRoot(zone);
|
|
178
|
-
const fullPath = isDev && zoneRoot !== "/" && !pathname.startsWith(zoneRoot) ? `${zoneRoot}${pathname}` : pathname;
|
|
179
|
-
const breadcrumbs = getBreadcrumbs(zone, fullPath);
|
|
180
|
-
if (breadcrumbs.length <= 1) {
|
|
181
|
-
return null;
|
|
182
|
-
}
|
|
183
|
-
return /* @__PURE__ */ jsx(Breadcrumbs, { "aria-label": "Du er her:", className: clsx(Breadcrumbs_default.breadcrumbs, className), children: /* @__PURE__ */ jsx(Breadcrumbs.List, { children: breadcrumbs.map((crumb, index) => {
|
|
184
|
-
const isLast = index === breadcrumbs.length - 1;
|
|
185
|
-
const href = transformHrefForZone(crumb.href, zone, { isDev, prodUrl });
|
|
186
|
-
return /* @__PURE__ */ jsx(Breadcrumbs.Item, { children: /* @__PURE__ */ jsx(
|
|
187
|
-
Breadcrumbs.Link,
|
|
188
|
-
{
|
|
189
|
-
href,
|
|
190
|
-
"aria-current": isLast ? "page" : void 0,
|
|
191
|
-
className: isLast ? Breadcrumbs_default.currentLink : Breadcrumbs_default.link,
|
|
192
|
-
children: crumb.label
|
|
193
|
-
}
|
|
194
|
-
) }, crumb.href);
|
|
195
|
-
}) }) });
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
// src/components/MenuButton/MenuButton.tsx
|
|
199
|
-
import Link from "next/link";
|
|
200
|
-
import { Dropdown } from "@digdir/designsystemet-react";
|
|
201
|
-
import { Menu } from "lucide-react";
|
|
202
|
-
|
|
203
|
-
// src/components/MenuButton/MenuButton.module.css
|
|
204
|
-
var MenuButton_default = {
|
|
205
|
-
userInfo: "MenuButton_userInfo",
|
|
206
|
-
userName: "MenuButton_userName",
|
|
207
|
-
userEmail: "MenuButton_userEmail",
|
|
208
|
-
menuButton: "MenuButton_menuButton",
|
|
209
|
-
devContainer: "MenuButton_devContainer",
|
|
210
|
-
zoneSection: "MenuButton_zoneSection",
|
|
211
|
-
zoneTitle: "MenuButton_zoneTitle"
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
// src/components/MenuButton/MenuButton.tsx
|
|
215
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
216
|
-
function MenuButton({ zone }) {
|
|
217
|
-
const isDev = process.env.NODE_ENV === "development";
|
|
218
|
-
const prodUrl = "https://www.statsbygg.no";
|
|
219
|
-
const allZones = getAllZones();
|
|
220
|
-
return /* @__PURE__ */ jsxs(Dropdown.TriggerContext, { children: [
|
|
221
|
-
/* @__PURE__ */ jsxs(Dropdown.Trigger, { asChild: true, className: MenuButton_default.menuButton, children: [
|
|
222
|
-
/* @__PURE__ */ jsx2(Menu, { size: 20, "aria-hidden": true }),
|
|
223
|
-
"Meny"
|
|
224
|
-
] }),
|
|
225
|
-
/* @__PURE__ */ jsx2(Dropdown, { children: isDev ? /* @__PURE__ */ jsx2("div", { className: MenuButton_default.devContainer, children: allZones.map((z) => {
|
|
226
|
-
const routes = getZoneMenuRoutes(z);
|
|
227
|
-
return /* @__PURE__ */ jsxs("div", { className: MenuButton_default.zoneSection, children: [
|
|
228
|
-
/* @__PURE__ */ jsx2("div", { className: MenuButton_default.zoneTitle, children: z }),
|
|
229
|
-
/* @__PURE__ */ jsx2(Dropdown.List, { children: routes.map((r) => /* @__PURE__ */ jsx2(Dropdown.Item, { children: /* @__PURE__ */ jsx2(Link, { href: transformHrefForZone(r.path, zone, { isDev, prodUrl }), children: r.label }) }, `${r.zone}:${r.path}`)) })
|
|
230
|
-
] }, z);
|
|
231
|
-
}) }) : /* @__PURE__ */ jsx2(Dropdown.List, { children: getZoneMenuRoutes(zone).map((r) => /* @__PURE__ */ jsx2(Dropdown.Item, { children: /* @__PURE__ */ jsx2(Link, { href: transformHrefForZone(r.path, zone, { isDev, prodUrl }), children: r.label }) }, `${r.zone}:${r.path}`)) }) })
|
|
232
|
-
] });
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// src/components/GlobalHeader/GlobalHeader.module.css
|
|
236
|
-
var GlobalHeader_default = {
|
|
237
|
-
header: "GlobalHeader_header",
|
|
238
|
-
headerContainer: "GlobalHeader_headerContainer",
|
|
239
|
-
topBarContainer: "GlobalHeader_topBarContainer",
|
|
240
|
-
logo: "GlobalHeader_logo",
|
|
241
|
-
actionsContainer: "GlobalHeader_actionsContainer",
|
|
242
|
-
searchInput: "GlobalHeader_searchInput",
|
|
243
|
-
container: "GlobalHeader_container",
|
|
244
|
-
topBar: "GlobalHeader_topBar",
|
|
245
|
-
actions: "GlobalHeader_actions",
|
|
246
|
-
menuButton: "GlobalHeader_menuButton"
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
// src/logo.svg
|
|
250
|
-
var logo_default = "./logo-JRXKWS5H.svg";
|
|
251
|
-
|
|
252
|
-
// src/components/GlobalHeader/GlobalHeader.tsx
|
|
253
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
254
|
-
function GlobalHeader({ className, zone }) {
|
|
255
|
-
const [searchValue, setSearchValue] = useState("");
|
|
256
|
-
return /* @__PURE__ */ jsx3("header", { className: clsx2(GlobalHeader_default.header, className), children: /* @__PURE__ */ jsxs2("div", { className: GlobalHeader_default.headerContainer, children: [
|
|
257
|
-
/* @__PURE__ */ jsxs2("div", { className: GlobalHeader_default.topBarContainer, children: [
|
|
258
|
-
/* @__PURE__ */ jsx3(Link2, { href: "https://www.statsbygg.no", children: /* @__PURE__ */ jsx3("img", { src: logo_default, alt: "Logo", className: GlobalHeader_default.logo }) }),
|
|
259
|
-
/* @__PURE__ */ jsxs2("div", { className: GlobalHeader_default.actionsContainer, children: [
|
|
260
|
-
/* @__PURE__ */ jsx3(
|
|
261
|
-
Textfield,
|
|
262
|
-
{
|
|
263
|
-
value: searchValue,
|
|
264
|
-
onChange: (e) => setSearchValue(e.target.value),
|
|
265
|
-
placeholder: "S\xF8k...",
|
|
266
|
-
className: GlobalHeader_default.searchInput,
|
|
267
|
-
"aria-label": "S\xF8k"
|
|
268
|
-
}
|
|
269
|
-
),
|
|
270
|
-
/* @__PURE__ */ jsx3(MenuButton, { zone })
|
|
271
|
-
] })
|
|
272
|
-
] }),
|
|
273
|
-
/* @__PURE__ */ jsx3(SbBreadcrumbs, { zone })
|
|
274
|
-
] }) });
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// src/components/GlobalFooter/GlobalFooter.tsx
|
|
278
|
-
import { Paragraph } from "@digdir/designsystemet-react";
|
|
279
|
-
import clsx3 from "clsx";
|
|
280
|
-
|
|
281
|
-
// src/components/GlobalFooter/GlobalFooter.module.css
|
|
282
|
-
var GlobalFooter_default = {
|
|
283
|
-
footer: "GlobalFooter_footer",
|
|
284
|
-
container: "GlobalFooter_container",
|
|
285
|
-
content: "GlobalFooter_content"
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
// src/components/GlobalFooter/GlobalFooter.tsx
|
|
289
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
290
|
-
function GlobalFooter({ className }) {
|
|
291
|
-
return /* @__PURE__ */ jsx4("footer", { className: clsx3(GlobalFooter_default.footer, className), children: /* @__PURE__ */ jsx4("div", { className: GlobalFooter_default.container, children: /* @__PURE__ */ jsx4("div", { className: GlobalFooter_default.content, children: /* @__PURE__ */ jsx4(Paragraph, { children: "Statsbygg Footer" }) }) }) });
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// src/components/RootLayout/RootLayout.module.css
|
|
295
|
-
var RootLayout_default = {
|
|
296
|
-
root: "RootLayout_root",
|
|
297
|
-
main: "RootLayout_main"
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
// src/store/globalState.ts
|
|
301
|
-
import { create } from "zustand";
|
|
302
|
-
import { persist, createJSONStorage } from "zustand/middleware";
|
|
303
|
-
var creator = (set, get) => ({
|
|
304
|
-
user: null,
|
|
305
|
-
theme: "light",
|
|
306
|
-
locale: "no",
|
|
307
|
-
setUser: (user) => set({ user }),
|
|
308
|
-
setTheme: (theme) => {
|
|
309
|
-
set({ theme });
|
|
310
|
-
if (typeof document !== "undefined") {
|
|
311
|
-
document.documentElement.setAttribute("data-color-scheme", theme);
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
setLocale: (locale) => set({ locale }),
|
|
315
|
-
initialize: () => {
|
|
316
|
-
if (typeof document !== "undefined") {
|
|
317
|
-
document.documentElement.setAttribute("data-color-scheme", get().theme);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
var useGlobalStore = create()(
|
|
322
|
-
persist(creator, {
|
|
323
|
-
name: "statsbygg-global-state",
|
|
324
|
-
storage: createJSONStorage(() => localStorage)
|
|
325
|
-
})
|
|
326
|
-
);
|
|
327
|
-
|
|
328
|
-
// src/components/RootLayout/RootLayout.tsx
|
|
329
|
-
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
330
|
-
function RootLayout({
|
|
331
|
-
children,
|
|
332
|
-
zone,
|
|
333
|
-
className
|
|
334
|
-
}) {
|
|
335
|
-
const initialize = useGlobalStore((state) => state.initialize);
|
|
336
|
-
useEffect(() => {
|
|
337
|
-
try {
|
|
338
|
-
const maybe = initialize();
|
|
339
|
-
if (maybe && typeof maybe.then === "function") {
|
|
340
|
-
maybe.catch((error) => {
|
|
341
|
-
console.error("Failed to initialize global state:", error);
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
} catch (error) {
|
|
345
|
-
console.error("Failed to initialize global state:", error);
|
|
346
|
-
}
|
|
347
|
-
}, [initialize]);
|
|
348
|
-
return /* @__PURE__ */ jsxs3("div", { className: clsx4(RootLayout_default.root, className), "data-zone": zone, children: [
|
|
349
|
-
/* @__PURE__ */ jsx5(GlobalHeader, { zone }),
|
|
350
|
-
/* @__PURE__ */ jsx5("main", { className: RootLayout_default.main, children }),
|
|
351
|
-
/* @__PURE__ */ jsx5(GlobalFooter, {})
|
|
352
|
-
] });
|
|
353
|
-
}
|
|
2
|
+
import { RootLayout } from "./components/RootLayout";
|
|
3
|
+
import { useGlobalStore } from "./store/globalState";
|
|
354
4
|
export {
|
|
355
5
|
RootLayout,
|
|
356
6
|
useGlobalStore
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/RootLayout/RootLayout.tsx","../src/components/GlobalHeader/GlobalHeader.tsx","../src/components/Breadcrumbs/Breadcrumbs.tsx","../src/components/Breadcrumbs/Breadcrumbs.module.css","../src/routes.ts","../src/components/MenuButton/MenuButton.tsx","../src/components/MenuButton/MenuButton.module.css","../src/components/GlobalHeader/GlobalHeader.module.css","../src/components/GlobalFooter/GlobalFooter.tsx","../src/components/GlobalFooter/GlobalFooter.module.css","../src/components/RootLayout/RootLayout.module.css","../src/store/globalState.ts"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\nimport clsx from 'clsx';\nimport { GlobalHeader } from '../GlobalHeader';\nimport { GlobalFooter } from '../GlobalFooter';\nimport type { RootLayoutProps } from './RootLayout.types';\nimport styles from './RootLayout.module.css';\nimport { useGlobalStore } from '@/store/globalState';\n\nexport function RootLayout({\n children,\n zone, \n className,\n}: RootLayoutProps) {\n const initialize = useGlobalStore((state) => state.initialize);\n\n useEffect(() => {\n try {\n const maybe = initialize();\n if (maybe && typeof (maybe as Promise<void>).then === 'function') {\n (maybe as Promise<void>).catch((error) => {\n console.error('Failed to initialize global state:', error);\n });\n }\n } catch (error) {\n console.error('Failed to initialize global state:', error);\n }\n }, [initialize]);\n\n\n return (\n <div className={clsx(styles.root, className)} data-zone={zone}>\n <GlobalHeader zone={zone}/>\n <main className={styles.main}>{children}</main>\n <GlobalFooter />\n </div>\n );\n}\n","'use client';\n\nimport { useState } from 'react';\nimport { Link, Textfield } from '@digdir/designsystemet-react';\nimport clsx from 'clsx';\nimport { Breadcrumbs } from '../Breadcrumbs';\nimport { MenuButton } from '../MenuButton';\nimport type { GlobalHeaderProps } from './GlobalHeader.types';\nimport styles from './GlobalHeader.module.css';\nimport logo from '../../logo.svg'; \n\nexport function GlobalHeader({ className, zone }: GlobalHeaderProps) {\n const [searchValue, setSearchValue] = useState('');\n\n return (\n <header className={clsx(styles.header, className)}>\n <div className={styles.headerContainer}>\n <div className={styles.topBarContainer}>\n <Link href=\"https://www.statsbygg.no\">\n <img src={logo} alt=\"Logo\" className={styles.logo} />\n </Link>\n <div className={styles.actionsContainer}>\n <Textfield\n value={searchValue}\n onChange={(e) => setSearchValue(e.target.value)}\n placeholder=\"Søk...\"\n className={styles.searchInput}\n aria-label=\"Søk\"\n />\n <MenuButton zone={zone}/>\n </div>\n </div>\n <Breadcrumbs zone={zone} />\n </div>\n </header>\n );\n}","'use client';\n\nimport { usePathname } from 'next/navigation';\nimport { Breadcrumbs } from '@digdir/designsystemet-react';\nimport clsx from 'clsx';\nimport type { BreadcrumbsProps } from './Breadcrumbs.types';\nimport styles from './Breadcrumbs.module.css';\nimport { getBreadcrumbs, getZoneRoot, transformHrefForZone } from '@/routes';\n\nexport function SbBreadcrumbs({ className, zone }: BreadcrumbsProps) {\n const pathname = usePathname();\n const isDev = process.env.NODE_ENV === 'development';\n const prodUrl = 'https://www.statsbygg.no';\n const zoneRoot = getZoneRoot(zone);\n \n const fullPath = isDev && zoneRoot !== '/' && !pathname.startsWith(zoneRoot)\n ? `${zoneRoot}${pathname}`\n : pathname;\n \n const breadcrumbs = getBreadcrumbs(zone, fullPath);\n\n if (breadcrumbs.length <= 1) {\n return null;\n }\n\n\n return (\n <Breadcrumbs aria-label=\"Du er her:\" className={clsx(styles.breadcrumbs, className)}>\n <Breadcrumbs.List>\n {breadcrumbs.map((crumb, index) => {\n const isLast = index === breadcrumbs.length - 1;\n const href = transformHrefForZone(crumb.href, zone, { isDev, prodUrl });\n \n return (\n <Breadcrumbs.Item key={crumb.href}>\n <Breadcrumbs.Link\n href={href}\n aria-current={isLast ? 'page' : undefined}\n className={isLast ? styles.currentLink : styles.link}\n >\n {crumb.label}\n </Breadcrumbs.Link>\n </Breadcrumbs.Item>\n );\n })}\n </Breadcrumbs.List>\n </Breadcrumbs>\n );\n}",".breadcrumbs {\n --dsc-breadcrumbs-color: var(--ds-color-text-default);\n padding: 2.5rem 0 0 0;\n}\n\n.link {\n text-decoration: underline;\n text-underline-offset: 2px;\n color: var(--ds-color-text-default);\n}\n\n.link:hover \n.link:visited{\n color: var(--ds-color-text-default);\n}\n\n.currentLink {\n text-decoration: none;\n font-weight: 500;\n pointer-events: none;\n color: var(--ds-color-text-default);\n}\n","export type RouteNodeInput =\n | { segment: string; label: string; children?: RouteNodeInput[] }\n | { path: string; label: string; children?: RouteNodeInput[] };\n\nexport type RouteNode = {\n path: string;\n label: string;\n children?: RouteNode[];\n};\n\nexport type RouteDefinition = {\n path: string;\n label: string;\n zone: string;\n};\n\nconst ZONE_TREES_INPUT: Record<string, RouteNodeInput> = {\n sbno: {\n segment: '',// primary root route, no breadcrumb\n label: 'Hjem',\n children: [\n { segment: 'nyheter', label: 'Nyheter' },\n ],\n },\n lokaler: {\n segment: 'lokaler',\n label: 'Statens eide og leide lokaler',\n children: [\n {\n segment: 'lokalbruk', label: 'Lokalbruk'\n },\n { segment: 'veiledning', label: 'Veiledning' },\n { segment: 'statlige-eiendommer', label: 'Statlige eiendommer' },\n { segment: 'ledig-for-fremleie', label: 'Ledig for fremleie' },\n { segment: 'statistikk', label: 'Statistikk' },\n ],\n },\n};\n\n\ntype Key = `${string}:${string}`; // `${zone}:${absolutePath}`\n\nconst ROUTES_INDEX: Record<string, RouteDefinition[]> = {};\nconst PARENT_INDEX = new Map<Key, Key | null>(); // child -> parent\nconst ZONE_TREES: Record<string, RouteNode> = {}; // normalized absolute trees\n\nfunction isSegmentNode(n: RouteNodeInput): n is Extract<RouteNodeInput, { segment: string }> {\n return (n as any).segment !== undefined && (n as any).path === undefined;\n}\nfunction isPathNode(n: RouteNodeInput): n is Extract<RouteNodeInput, { path: string }> {\n return (n as any).path !== undefined;\n}\n\nfunction joinPath(base: string, seg: string): string {\n if (!base) return seg ? `/${seg}` : '/';\n return seg ? `${base.replace(/\\/+$/, '')}/${seg.replace(/^\\/+/, '')}` : base || '/';\n}\n\nfunction normalizeToAbsolute(node: RouteNodeInput, base = ''): RouteNode {\n const path = isSegmentNode(node)\n ? joinPath(base, node.segment)\n : isPathNode(node)\n ? (node.path === '' ? '/' : node.path)\n : '/';\n\n const children = (node.children ?? []).map((c) => normalizeToAbsolute(c, path));\n return { path, label: (node as any).label, children: children.length ? children : undefined };\n}\n\n(function buildAll() {\n // Normalize each zone tree to absolute paths\n Object.keys(ZONE_TREES_INPUT).forEach((zone) => {\n ZONE_TREES[zone] = normalizeToAbsolute(ZONE_TREES_INPUT[zone]);\n });\n\n // Build flat indexes + parent relationships\n function walk(zone: string, node: RouteNode, parentKey: Key | null) {\n const def: RouteDefinition = { zone, path: node.path, label: node.label };\n const key: Key = `${zone}:${node.path}`;\n ROUTES_INDEX[zone].push(def);\n PARENT_INDEX.set(key, parentKey);\n for (const child of node.children ?? []) {\n walk(zone, child, key);\n }\n }\n\n (Object.keys(ZONE_TREES) as string[]).forEach((zone) => {\n ROUTES_INDEX[zone] = [];\n walk(zone, ZONE_TREES[zone], null);\n });\n})();\n\n\nfunction findBestMatch(zone: string, pathname: string): RouteDefinition | undefined {\n const list = ROUTES_INDEX[zone] ?? [];\n let best: RouteDefinition | undefined;\n\n for (const r of list) {\n if (pathname === r.path) {\n best = r; // exact wins\n break;\n }\n if (pathname.startsWith(r.path.endsWith('/') ? r.path : r.path + '/')) {\n if (!best || r.path.length > best.path.length) best = r;\n }\n }\n // fallback: zone root\n return best ?? list.find((r) => r.path === ZONE_TREES[zone]?.path);\n}\n\nexport function getZoneRoutes(zone: string): RouteDefinition[] {\n return ROUTES_INDEX[zone] ?? [];\n}\n\n// Top-level links for a zone’s menu (children of the zone root)\nexport function getZoneMenuRoutes(zone: string): RouteDefinition[] {\n const root = ZONE_TREES[zone];\n const children = root?.children ?? [];\n return children.map((c) => ({ zone, path: c.path, label: c.label }));\n}\n\nexport function getAllZones(): string[] {\n return Object.keys(ZONE_TREES);\n}\n\nexport function getZoneRoot(zone: string): string {\n return ZONE_TREES[zone]?.path || '/';\n}\n\n// prettify dynamic slug labels\nfunction labelFromSlug(slug: string): string {\n try {\n const s = decodeURIComponent(slug).replace(/[-_]+/g, ' ').trim();\n return s ? s.charAt(0).toUpperCase() + s.slice(1) : slug;\n } catch {\n return slug;\n }\n}\n\nexport function getBreadcrumbs(\n zone: string,\n pathname: string\n): Array<{ label: string; href: string }> {\n\n const normalizedPathname = pathname === '/' ? pathname : pathname.replace(/\\/+$/, '');\n\n // sbno root has no crumbs\n if (zone === 'sbno' && normalizedPathname === '/') return [];\n\n const match = findBestMatch(zone, normalizedPathname);\n if (!match) return [];\n\n const chain: RouteDefinition[] = [];\n let key: Key | undefined = `${zone}:${match.path}`;\n while (key) {\n const parentKey = PARENT_INDEX.get(key);\n const [z, p] = key.split(':') as [string, string];\n const def = (ROUTES_INDEX[z] ?? []).find((r) => r.path === p);\n if (def) chain.unshift(def);\n key = parentKey ?? undefined;\n }\n\n const homeRoute = (ROUTES_INDEX.sbno ?? []).find((r) => r.path === '/');\n if (\n homeRoute &&\n !(chain.length === 1 && chain[0].zone === 'sbno' && chain[0].path === '/') &&\n (chain.length === 0 || chain[0].path !== homeRoute.path)\n ) {\n chain.unshift(homeRoute);\n }\n\n // If the pathname is deeper than the best static match, add a dynamic tail\n const last = chain[chain.length - 1];\n if (last && normalizedPathname !== last.path && normalizedPathname.startsWith(last.path.endsWith('/') ? last.path : last.path + '/')) {\n const segments = normalizedPathname.split('/').filter(Boolean);\n const tail = segments[segments.length - 1];\n chain.push({ zone, path: normalizedPathname, label: labelFromSlug(tail) });\n }\n\n return chain.map((r) => ({ label: r.label, href: r.path }));\n}\n\nexport function transformHrefForZone(\n targetPath: string,\n currentZone: string,\n options: {\n isDev: boolean;\n prodUrl?: string;\n }\n): string {\n const { isDev, prodUrl } = options;\n\n const targetZone = getZoneFromPathname(targetPath);\n const isCrossZone = targetZone !== currentZone;\n\n if (isCrossZone && isDev && prodUrl) {\n return `${prodUrl}${targetPath}`;\n }\n\n const currentZoneRoot = getZoneRoot(currentZone);\n if (!isCrossZone && isDev && currentZoneRoot !== '/') {\n return targetPath.replace(currentZoneRoot, '') || '/';\n }\n\n return targetPath;\n}\n\nexport function getZoneFromPathname(pathname: string): string {\n if (pathname.startsWith('/lokaler')) return 'lokaler';\n return 'sbno';\n}","'use client';\n\nimport Link from 'next/link';\nimport { Dropdown } from '@digdir/designsystemet-react';\nimport { Menu } from 'lucide-react';\nimport { getZoneMenuRoutes, getAllZones, transformHrefForZone } from '@/routes';\nimport type { MenuButtonProps } from './MenuButton.types';\nimport styles from './MenuButton.module.css';\n\nexport function MenuButton({ zone }: MenuButtonProps) {\n const isDev = process.env.NODE_ENV === 'development';\n // TODO: Temporary here. Should come from env or something\n const prodUrl = 'https://www.statsbygg.no';\n const allZones = getAllZones();\n\n return (\n <Dropdown.TriggerContext>\n <Dropdown.Trigger asChild className={styles.menuButton}>\n <Menu size={20} aria-hidden />\n Meny\n </Dropdown.Trigger>\n <Dropdown>\n {isDev ? (\n <div className={styles.devContainer}>\n {allZones.map((z) => {\n const routes = getZoneMenuRoutes(z);\n return (\n <div key={z} className={styles.zoneSection}>\n <div className={styles.zoneTitle}>{z}</div>\n <Dropdown.List>\n {routes.map((r) => (\n <Dropdown.Item key={`${r.zone}:${r.path}`}>\n <Link href={transformHrefForZone(r.path, zone, { isDev, prodUrl })}>\n {r.label}\n </Link>\n </Dropdown.Item>\n ))}\n </Dropdown.List>\n </div>\n );\n })}\n </div>\n ) : (\n <Dropdown.List>\n {getZoneMenuRoutes(zone).map((r) => (\n <Dropdown.Item key={`${r.zone}:${r.path}`}>\n <Link href={transformHrefForZone(r.path, zone, { isDev, prodUrl })}>\n {r.label}\n </Link>\n </Dropdown.Item>\n ))}\n </Dropdown.List>\n )}\n </Dropdown>\n </Dropdown.TriggerContext>\n );\n}",".userInfo {\n display: flex;\n flex-direction: column;\n gap: var(--ds-spacing-1);\n padding: var(--ds-spacing-2) var(--ds-spacing-3);\n}\n\n.userName {\n font-size: var(--ds-font-size-sm);\n font-weight: var(--ds-font-weight-medium);\n color: var(--ds-color-neutral-text-default);\n}\n\n.userEmail {\n font-size: var(--ds-font-size-xs);\n color: var(--ds-color-neutral-text-subtle);\n}\n\n.menuButton {\n background-color: var(--ds-color-neutral-base-default);\n}\n\n.devContainer {\n display: flex;\n gap: var(--ds-spacing-4);\n padding: var(--ds-spacing-2);\n}\n\n.zoneSection {\n flex: 1;\n min-width: 12rem;\n}\n\n.zoneTitle {\n font-weight: 600;\n padding: var(--ds-spacing-2);\n color: var(--ds-color-neutral-text-default);\n border-bottom: 1px solid var(--ds-color-neutral-border-subtle);\n margin-bottom: var(--ds-spacing-2);\n text-transform: capitalize;\n}\n",".header {\n background-color: var(--ds-color-accent-surface-tinted);\n border-bottom: 1px solid var(--ds-color-neutral-border-subtle);\n position: sticky;\n top: 0;\n z-index: 100;\n}\n\n.headerContainer {\n max-width: 90rem;\n margin: 0 auto;\n padding: 0 var(--ds-size-30);\n}\n\n.topBarContainer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1.25rem 0;\n}\n\n.logo {\n margin: 0;\n color: var(--ds-color-neutral-text-default);\n white-space: nowrap;\n display: flex;\n align-items: center;\n min-height: inherit;\n}\n\n.actionsContainer {\n display: flex;\n align-items: stretch;\n gap: var(--ds-size-9);\n min-height: inherit;\n}\n\n.searchInput {\n min-width: 12.5rem;\n display: flex;\n align-items: center;\n}\n\n@media (max-width: 768px) {\n .container {\n padding: 0 var(--ds-spacing-4);\n }\n\n .topBar {\n flex-wrap: wrap;\n padding: var(--ds-spacing-4) 0;\n }\n\n .actions {\n order: 3;\n width: 100%;\n flex-direction: column;\n gap: var(--ds-spacing-3);\n }\n\n .searchInput {\n width: 100%;\n min-width: auto;\n }\n\n .menuButton {\n width: 100%;\n justify-content: center;\n }\n}","'use client';\n\nimport { Paragraph } from '@digdir/designsystemet-react';\nimport clsx from 'clsx';\nimport type { GlobalFooterProps } from './GlobalFooter.types';\nimport styles from './GlobalFooter.module.css';\n\nexport function GlobalFooter({ className }: GlobalFooterProps) {\n\n return (\n <footer className={clsx(styles.footer, className)}>\n <div className={styles.container}>\n <div className={styles.content}>\n <Paragraph>\n Statsbygg Footer\n </Paragraph>\n\n\n </div>\n </div>\n </footer>\n );\n}",".footer {\n background-color: var(--ds-color-neutral-surface-subtle);\n border-top: 1px solid var(--ds-color-neutral-border-subtle);\n margin-top: auto;\n}\n\n.container {\n max-width: 1440px;\n margin: 0 auto;\n padding: var(--ds-spacing-6) var(--ds-spacing-4);\n}\n\n.content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--ds-spacing-4);\n flex-wrap: wrap;\n}\n\n@media (max-width: 768px) {\n .content {\n flex-direction: column;\n align-items: flex-start;\n }\n\n\n}",".root {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n}\n\n.main {\n flex: 1;\n}","import { create, StateCreator } from 'zustand';\nimport { persist, createJSONStorage } from 'zustand/middleware';\n\nexport type Theme = 'light' | 'dark' | 'system';\n\nexport type GlobalState = {\n user?: { id: string; name?: string } | null;\n theme: Theme;\n locale: string;\n setUser: (user: GlobalState['user']) => void;\n setTheme: (theme: Theme) => void;\n setLocale: (locale: string) => void;\n initialize: () => void | Promise<void>;\n};\n\nconst creator: StateCreator<GlobalState, [['zustand/persist', unknown]]> = (set, get) => ({\n user: null,\n theme: 'light',\n locale: 'no',\n setUser: (user) => set({ user }),\n setTheme: (theme) => {\n set({ theme });\n if (typeof document !== 'undefined') {\n document.documentElement.setAttribute('data-color-scheme', theme);\n }\n },\n setLocale: (locale) => set({ locale }),\n initialize: () => {\n if (typeof document !== 'undefined') {\n document.documentElement.setAttribute('data-color-scheme', get().theme);\n }\n },\n});\n\nexport const useGlobalStore = create<GlobalState>()(\n persist(creator, {\n name: 'statsbygg-global-state',\n storage: createJSONStorage(() => localStorage),\n })\n);\n"],"mappings":";;;AAEA,SAAS,iBAAiB;AAC1B,OAAOA,WAAU;;;ACDjB,SAAS,gBAAgB;AACzB,SAAS,QAAAC,OAAM,iBAAiB;AAChC,OAAOC,WAAU;;;ACFjB,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,OAAO,UAAU;;;ACJjB;AAAA,EAAC,aAAAC;AAAA,EAKA,MAAAC;AAAA,EAWA,aAAAC;AAAA;;;ACAD,IAAM,mBAAmD;AAAA,EACvD,MAAM;AAAA,IACJ,SAAS;AAA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AClE;AAAA,EACF;AAAA,EACA,WAAW,CAAC,WAAW,IAAI,EAAE,OAAO,CAAC;AAAA,EACrC,YAAY,MAAM;AAChB,QAAI,OAAO,aAAa,aAAa;AACnC,eAAS,gBAAgB,aAAa,qBAAqB,IAAI,EAAE,KAAK;AAAA,IACxE;AAAA,EACF;AACF;AAEO,IAAM,iBAAiB,OAAoB;AAAA,EAChD,QAAQ,SAAS;AAAA,IACf,MAAM;AAAA,IACN,SAAS,kBAAkB,MAAM,YAAY;AAAA,EAC/C,CAAC;AACH;;;AXPI,SACE,OAAAC,MADF,QAAAC,aAAA;AAtBG,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAAoB;AAClB,QAAM,aAAa,eAAe,CAAC,UAAU,MAAM,UAAU;AAE7D,YAAU,MAAM;AACd,QAAI;AACF,YAAM,QAAQ,WAAW;AACzB,UAAI,SAAS,OAAQ,MAAwB,SAAS,YAAY;AAChE,QAAC,MAAwB,MAAM,CAAC,UAAU;AACxC,kBAAQ,MAAM,sCAAsC,KAAK;AAAA,QAC3D,CAAC;AAAA,MACH;AAAA,IACF,SAAS,OAAO;AACd,cAAQ,MAAM,sCAAsC,KAAK;AAAA,IAC3D;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AAGf,SACE,gBAAAA,MAAC,SAAI,WAAWC,MAAK,mBAAO,MAAM,SAAS,GAAG,aAAW,MACvD;AAAA,oBAAAF,KAAC,gBAAa,MAAW;AAAA,IACzB,gBAAAA,KAAC,UAAK,WAAW,mBAAO,MAAO,UAAS;AAAA,IACxC,gBAAAA,KAAC,gBAAa;AAAA,KAChB;AAEJ;","names":["clsx","Link","clsx","breadcrumbs","link","currentLink","_a","userInfo","userName","userEmail","menuButton","devContainer","zoneSection","zoneTitle","jsx","header","headerContainer","topBarContainer","logo","actionsContainer","searchInput","container","topBar","actions","menuButton","jsx","jsxs","clsx","Link","clsx","footer","container","content","jsx","clsx","root","main","jsx","jsxs","clsx"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["'use client';\n\nexport { RootLayout } from './components/RootLayout';\nexport type { RootLayoutProps } from './components/RootLayout';\n\nexport { useGlobalStore } from './store/globalState';\nexport type { GlobalState } from './store/globalState';\n"],"mappings":";AAEA,SAAS,kBAAkB;AAG3B,SAAS,sBAAsB;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsbygg/layout",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"publishConfig": {
|
|
3
|
+
"version": "0.0.10",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
5
7
|
"description": "Shared layout components for Statsbygg microfrontend architecture",
|
|
6
8
|
"main": "./dist/index.js",
|
|
7
9
|
"module": "./dist/index.mjs",
|
|
8
10
|
"types": "./dist/index.d.ts",
|
|
9
|
-
"files": [
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/**"
|
|
13
|
+
],
|
|
10
14
|
"exports": {
|
|
11
15
|
".": {
|
|
12
16
|
"import": "./dist/index.mjs",
|
|
13
17
|
"require": "./dist/index.js",
|
|
14
18
|
"types": "./dist/index.d.ts"
|
|
15
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"./components/*": "./dist/components/*",
|
|
21
|
+
"./store/*": "./dist/store/*"
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"**/*.css"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsup && npm run copy:css",
|
|
28
|
+
"copy:css": "node scripts/copy-css.js",
|
|
29
|
+
"dev": "tsup --watch",
|
|
30
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
31
|
+
"type-check": "tsc --noEmit",
|
|
32
|
+
"clean": "rm -rf dist"
|
|
16
33
|
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsup",
|
|
19
|
-
"dev": "tsup --watch",
|
|
20
|
-
"lint": "eslint src --ext .ts,.tsx",
|
|
21
|
-
"type-check": "tsc --noEmit"
|
|
22
|
-
},
|
|
23
34
|
"peerDependencies": {
|
|
24
35
|
"next": ">=14.0.0",
|
|
25
36
|
"react": ">=18.0.0",
|
|
@@ -36,8 +47,9 @@
|
|
|
36
47
|
"@types/node": "^20.0.0",
|
|
37
48
|
"@types/react": "^18.2.0",
|
|
38
49
|
"@types/react-dom": "^18.2.0",
|
|
50
|
+
"fs-extra": "^11.1.1",
|
|
51
|
+
"glob": "^10.3.10",
|
|
39
52
|
"tsup": "^8.0.0",
|
|
40
53
|
"typescript": "^5.0.0"
|
|
41
|
-
}
|
|
42
|
-
"sideEffects": ["**/*.css"]
|
|
54
|
+
}
|
|
43
55
|
}
|
package/dist/index.css
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/* src/components/Breadcrumbs/Breadcrumbs.module.css */
|
|
2
|
-
.Breadcrumbs_breadcrumbs {
|
|
3
|
-
--dsc-breadcrumbs-color: var(--ds-color-text-default);
|
|
4
|
-
padding: 2.5rem 0 0 0;
|
|
5
|
-
}
|
|
6
|
-
.Breadcrumbs_link {
|
|
7
|
-
text-decoration: underline;
|
|
8
|
-
text-underline-offset: 2px;
|
|
9
|
-
color: var(--ds-color-text-default);
|
|
10
|
-
}
|
|
11
|
-
.Breadcrumbs_link:hover .Breadcrumbs_link:visited {
|
|
12
|
-
color: var(--ds-color-text-default);
|
|
13
|
-
}
|
|
14
|
-
.Breadcrumbs_currentLink {
|
|
15
|
-
text-decoration: none;
|
|
16
|
-
font-weight: 500;
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
color: var(--ds-color-text-default);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* src/components/MenuButton/MenuButton.module.css */
|
|
22
|
-
.MenuButton_userInfo {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
gap: var(--ds-spacing-1);
|
|
26
|
-
padding: var(--ds-spacing-2) var(--ds-spacing-3);
|
|
27
|
-
}
|
|
28
|
-
.MenuButton_userName {
|
|
29
|
-
font-size: var(--ds-font-size-sm);
|
|
30
|
-
font-weight: var(--ds-font-weight-medium);
|
|
31
|
-
color: var(--ds-color-neutral-text-default);
|
|
32
|
-
}
|
|
33
|
-
.MenuButton_userEmail {
|
|
34
|
-
font-size: var(--ds-font-size-xs);
|
|
35
|
-
color: var(--ds-color-neutral-text-subtle);
|
|
36
|
-
}
|
|
37
|
-
.MenuButton_menuButton {
|
|
38
|
-
background-color: var(--ds-color-neutral-base-default);
|
|
39
|
-
}
|
|
40
|
-
.MenuButton_devContainer {
|
|
41
|
-
display: flex;
|
|
42
|
-
gap: var(--ds-spacing-4);
|
|
43
|
-
padding: var(--ds-spacing-2);
|
|
44
|
-
}
|
|
45
|
-
.MenuButton_zoneSection {
|
|
46
|
-
flex: 1;
|
|
47
|
-
min-width: 12rem;
|
|
48
|
-
}
|
|
49
|
-
.MenuButton_zoneTitle {
|
|
50
|
-
font-weight: 600;
|
|
51
|
-
padding: var(--ds-spacing-2);
|
|
52
|
-
color: var(--ds-color-neutral-text-default);
|
|
53
|
-
border-bottom: 1px solid var(--ds-color-neutral-border-subtle);
|
|
54
|
-
margin-bottom: var(--ds-spacing-2);
|
|
55
|
-
text-transform: capitalize;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* src/components/GlobalHeader/GlobalHeader.module.css */
|
|
59
|
-
.GlobalHeader_header {
|
|
60
|
-
background-color: var(--ds-color-accent-surface-tinted);
|
|
61
|
-
border-bottom: 1px solid var(--ds-color-neutral-border-subtle);
|
|
62
|
-
position: sticky;
|
|
63
|
-
top: 0;
|
|
64
|
-
z-index: 100;
|
|
65
|
-
}
|
|
66
|
-
.GlobalHeader_headerContainer {
|
|
67
|
-
max-width: 90rem;
|
|
68
|
-
margin: 0 auto;
|
|
69
|
-
padding: 0 var(--ds-size-30);
|
|
70
|
-
}
|
|
71
|
-
.GlobalHeader_topBarContainer {
|
|
72
|
-
display: flex;
|
|
73
|
-
justify-content: space-between;
|
|
74
|
-
align-items: center;
|
|
75
|
-
padding: 1.25rem 0;
|
|
76
|
-
}
|
|
77
|
-
.GlobalHeader_logo {
|
|
78
|
-
margin: 0;
|
|
79
|
-
color: var(--ds-color-neutral-text-default);
|
|
80
|
-
white-space: nowrap;
|
|
81
|
-
display: flex;
|
|
82
|
-
align-items: center;
|
|
83
|
-
min-height: inherit;
|
|
84
|
-
}
|
|
85
|
-
.GlobalHeader_actionsContainer {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: stretch;
|
|
88
|
-
gap: var(--ds-size-9);
|
|
89
|
-
min-height: inherit;
|
|
90
|
-
}
|
|
91
|
-
.GlobalHeader_searchInput {
|
|
92
|
-
min-width: 12.5rem;
|
|
93
|
-
display: flex;
|
|
94
|
-
align-items: center;
|
|
95
|
-
}
|
|
96
|
-
@media (max-width: 768px) {
|
|
97
|
-
.GlobalHeader_container {
|
|
98
|
-
padding: 0 var(--ds-spacing-4);
|
|
99
|
-
}
|
|
100
|
-
.GlobalHeader_topBar {
|
|
101
|
-
flex-wrap: wrap;
|
|
102
|
-
padding: var(--ds-spacing-4) 0;
|
|
103
|
-
}
|
|
104
|
-
.GlobalHeader_actions {
|
|
105
|
-
order: 3;
|
|
106
|
-
width: 100%;
|
|
107
|
-
flex-direction: column;
|
|
108
|
-
gap: var(--ds-spacing-3);
|
|
109
|
-
}
|
|
110
|
-
.GlobalHeader_searchInput {
|
|
111
|
-
width: 100%;
|
|
112
|
-
min-width: auto;
|
|
113
|
-
}
|
|
114
|
-
.GlobalHeader_menuButton {
|
|
115
|
-
width: 100%;
|
|
116
|
-
justify-content: center;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* src/components/GlobalFooter/GlobalFooter.module.css */
|
|
121
|
-
.GlobalFooter_footer {
|
|
122
|
-
background-color: var(--ds-color-neutral-surface-subtle);
|
|
123
|
-
border-top: 1px solid var(--ds-color-neutral-border-subtle);
|
|
124
|
-
margin-top: auto;
|
|
125
|
-
}
|
|
126
|
-
.GlobalFooter_container {
|
|
127
|
-
max-width: 1440px;
|
|
128
|
-
margin: 0 auto;
|
|
129
|
-
padding: var(--ds-spacing-6) var(--ds-spacing-4);
|
|
130
|
-
}
|
|
131
|
-
.GlobalFooter_content {
|
|
132
|
-
display: flex;
|
|
133
|
-
justify-content: space-between;
|
|
134
|
-
align-items: center;
|
|
135
|
-
gap: var(--ds-spacing-4);
|
|
136
|
-
flex-wrap: wrap;
|
|
137
|
-
}
|
|
138
|
-
@media (max-width: 768px) {
|
|
139
|
-
.GlobalFooter_content {
|
|
140
|
-
flex-direction: column;
|
|
141
|
-
align-items: flex-start;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* src/components/RootLayout/RootLayout.module.css */
|
|
146
|
-
.RootLayout_root {
|
|
147
|
-
display: flex;
|
|
148
|
-
flex-direction: column;
|
|
149
|
-
min-height: 100vh;
|
|
150
|
-
}
|
|
151
|
-
.RootLayout_main {
|
|
152
|
-
flex: 1;
|
|
153
|
-
}
|
|
154
|
-
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Breadcrumbs/Breadcrumbs.module.css","../src/components/MenuButton/MenuButton.module.css","../src/components/GlobalHeader/GlobalHeader.module.css","../src/components/GlobalFooter/GlobalFooter.module.css","../src/components/RootLayout/RootLayout.module.css"],"sourcesContent":[".breadcrumbs {\n --dsc-breadcrumbs-color: var(--ds-color-text-default);\n padding: 2.5rem 0 0 0;\n}\n\n.link {\n text-decoration: underline;\n text-underline-offset: 2px;\n color: var(--ds-color-text-default);\n}\n\n.link:hover \n.link:visited{\n color: var(--ds-color-text-default);\n}\n\n.currentLink {\n text-decoration: none;\n font-weight: 500;\n pointer-events: none;\n color: var(--ds-color-text-default);\n}\n",".userInfo {\n display: flex;\n flex-direction: column;\n gap: var(--ds-spacing-1);\n padding: var(--ds-spacing-2) var(--ds-spacing-3);\n}\n\n.userName {\n font-size: var(--ds-font-size-sm);\n font-weight: var(--ds-font-weight-medium);\n color: var(--ds-color-neutral-text-default);\n}\n\n.userEmail {\n font-size: var(--ds-font-size-xs);\n color: var(--ds-color-neutral-text-subtle);\n}\n\n.menuButton {\n background-color: var(--ds-color-neutral-base-default);\n}\n\n.devContainer {\n display: flex;\n gap: var(--ds-spacing-4);\n padding: var(--ds-spacing-2);\n}\n\n.zoneSection {\n flex: 1;\n min-width: 12rem;\n}\n\n.zoneTitle {\n font-weight: 600;\n padding: var(--ds-spacing-2);\n color: var(--ds-color-neutral-text-default);\n border-bottom: 1px solid var(--ds-color-neutral-border-subtle);\n margin-bottom: var(--ds-spacing-2);\n text-transform: capitalize;\n}\n",".header {\n background-color: var(--ds-color-accent-surface-tinted);\n border-bottom: 1px solid var(--ds-color-neutral-border-subtle);\n position: sticky;\n top: 0;\n z-index: 100;\n}\n\n.headerContainer {\n max-width: 90rem;\n margin: 0 auto;\n padding: 0 var(--ds-size-30);\n}\n\n.topBarContainer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1.25rem 0;\n}\n\n.logo {\n margin: 0;\n color: var(--ds-color-neutral-text-default);\n white-space: nowrap;\n display: flex;\n align-items: center;\n min-height: inherit;\n}\n\n.actionsContainer {\n display: flex;\n align-items: stretch;\n gap: var(--ds-size-9);\n min-height: inherit;\n}\n\n.searchInput {\n min-width: 12.5rem;\n display: flex;\n align-items: center;\n}\n\n@media (max-width: 768px) {\n .container {\n padding: 0 var(--ds-spacing-4);\n }\n\n .topBar {\n flex-wrap: wrap;\n padding: var(--ds-spacing-4) 0;\n }\n\n .actions {\n order: 3;\n width: 100%;\n flex-direction: column;\n gap: var(--ds-spacing-3);\n }\n\n .searchInput {\n width: 100%;\n min-width: auto;\n }\n\n .menuButton {\n width: 100%;\n justify-content: center;\n }\n}",".footer {\n background-color: var(--ds-color-neutral-surface-subtle);\n border-top: 1px solid var(--ds-color-neutral-border-subtle);\n margin-top: auto;\n}\n\n.container {\n max-width: 1440px;\n margin: 0 auto;\n padding: var(--ds-spacing-6) var(--ds-spacing-4);\n}\n\n.content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--ds-spacing-4);\n flex-wrap: wrap;\n}\n\n@media (max-width: 768px) {\n .content {\n flex-direction: column;\n align-items: flex-start;\n }\n\n\n}",".root {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n}\n\n.main {\n flex: 1;\n}"],"mappings":";AAAA,CAACA;AACC,2BAAyB,IAAI;AAC7B,WAAS,OAAO,EAAE,EAAE;AACtB;AAEA,CAACC;AACC,mBAAiB;AACjB,yBAAuB;AACvB,SAAO,IAAI;AACb;AAEA,CANCA,gBAMI,OACL,CAPCA,gBAOI;AACH,SAAO,IAAI;AACb;AAEA,CAACC;AACC,mBAAiB;AACjB,eAAa;AACb,kBAAgB;AAChB,SAAO,IAAI;AACb;;;ACrBA,CAACC;AACC,WAAS;AACT,kBAAgB;AAChB,OAAK,IAAI;AACT,WAAS,IAAI,gBAAgB,IAAI;AACnC;AAEA,CAACC;AACC,aAAW,IAAI;AACf,eAAa,IAAI;AACjB,SAAO,IAAI;AACb;AAEA,CAACC;AACC,aAAW,IAAI;AACf,SAAO,IAAI;AACb;AAEA,CAACC;AACC,oBAAkB,IAAI;AACxB;AAEA,CAACC;AACC,WAAS;AACT,OAAK,IAAI;AACT,WAAS,IAAI;AACf;AAEA,CAACC;AACC,QAAM;AACN,aAAW;AACb;AAEA,CAACC;AACC,eAAa;AACb,WAAS,IAAI;AACb,SAAO,IAAI;AACX,iBAAe,IAAI,MAAM,IAAI;AAC7B,iBAAe,IAAI;AACnB,kBAAgB;AAClB;;;ACxCA,CAACC;AACC,oBAAkB,IAAI;AACtB,iBAAe,IAAI,MAAM,IAAI;AAC7B,YAAU;AACV,OAAK;AACL,WAAS;AACX;AAEA,CAACC;AACC,aAAW;AACX,UAAQ,EAAE;AACV,WAAS,EAAE,IAAI;AACjB;AAEA,CAACC;AACC,WAAS;AACT,mBAAiB;AACjB,eAAa;AACb,WAAS,QAAQ;AACnB;AAEA,CAACC;AACC,UAAQ;AACR,SAAO,IAAI;AACX,eAAa;AACb,WAAS;AACT,eAAa;AACb,cAAY;AACd;AAEA,CAACC;AACC,WAAS;AACT,eAAa;AACb,OAAK,IAAI;AACT,cAAY;AACd;AAEA,CAACC;AACC,aAAW;AACX,WAAS;AACT,eAAa;AACf;AAEA,OAAO,CAAC,SAAS,EAAE;AACjB,GAACC;AACC,aAAS,EAAE,IAAI;AACjB;AAEA,GAACC;AACC,eAAW;AACX,aAAS,IAAI,gBAAgB;AAC/B;AAEA,GAACC;AACC,WAAO;AACP,WAAO;AACP,oBAAgB;AAChB,SAAK,IAAI;AACX;AAEA,GAvBDH;AAwBG,WAAO;AACP,eAAW;AACb;AAEA,GAACI;AACC,WAAO;AACP,qBAAiB;AACnB;AACF;;;ACrEA,CAACC;AACC,oBAAkB,IAAI;AACtB,cAAY,IAAI,MAAM,IAAI;AAC1B,cAAY;AACd;AAEA,CAACC;AACC,aAAW;AACX,UAAQ,EAAE;AACV,WAAS,IAAI,gBAAgB,IAAI;AACnC;AAEA,CAACC;AACC,WAAS;AACT,mBAAiB;AACjB,eAAa;AACb,OAAK,IAAI;AACT,aAAW;AACb;AAEA,OAAO,CAAC,SAAS,EAAE;AACjB,GATDA;AAUG,oBAAgB;AAChB,iBAAa;AACf;AAGF;;;AC3BA,CAACC;AACC,WAAS;AACT,kBAAgB;AAChB,cAAY;AACd;AAEA,CAACC;AACC,QAAM;AACR;","names":["breadcrumbs","link","currentLink","userInfo","userName","userEmail","menuButton","devContainer","zoneSection","zoneTitle","header","headerContainer","topBarContainer","logo","actionsContainer","searchInput","container","topBar","actions","menuButton","footer","container","content","root","main"]}
|