@midas-ds/layout 0.2.11 → 0.2.12

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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.2.12 (2026-08-13)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **layout,navigation:** migrate off unresolvable @react-aria/collections dependency ([2322e21ef9a](https://github.com/migrationsverket/midas/commit/2322e21ef9a))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated components to 17.18.0
10
+
1
11
  ## 0.2.11 (2026-07-10)
2
12
 
3
13
  ### 🚀 Features
@@ -6,12 +6,11 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
6
  import { useContext as a } from "react";
7
7
  import { Collection as o, Focusable as s, Link as c, OverlayTriggerStateContext as l } from "react-aria-components";
8
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", {
9
+ import '../assets/navigation.css';var m = { rootList: "_rootList_l3v98_1" }, h = ({ className: e, items: t, children: n, dependencies: i, idScope: a, addIdAndValue: s, ...c }) => /* @__PURE__ */ r("nav", {
11
10
  className: e,
12
11
  ...c,
13
12
  children: /* @__PURE__ */ r("ul", {
14
- className: h.rootList,
13
+ className: m.rootList,
15
14
  children: /* @__PURE__ */ r(o, {
16
15
  items: t,
17
16
  children: n,
@@ -20,38 +19,38 @@ import '../assets/navigation.css';var h = { rootList: "_rootList_l3v98_1" }, g =
20
19
  addIdAndValue: s
21
20
  })
22
21
  })
23
- }), _ = {
22
+ }), g = {
24
23
  navigationHeader: "_navigationHeader_18u5f_1",
25
24
  collapsed: "_collapsed_18u5f_7"
26
- }, v = ({ className: e, ...t }) => {
25
+ }, _ = ({ className: e, ...t }) => {
27
26
  let i = a(n);
28
27
  return /* @__PURE__ */ r(u, {
29
- className: p(e, _.navigationHeader, { [_.collapsed]: i?.isCollapsed }),
28
+ className: p(e, g.navigationHeader, { [g.collapsed]: i?.isCollapsed }),
30
29
  ...t
31
30
  });
32
- }, y = { navigationItem: "_navigationItem_1jt2l_1" }, b = ({ className: t, ...i }) => {
31
+ }, v = { navigationItem: "_navigationItem_1jt2l_1" }, y = ({ className: t, ...i }) => {
33
32
  let o = a(n);
34
33
  return /* @__PURE__ */ r("li", {
35
- className: e(t, y.navigationItem, { [y.collapsed]: o?.isCollapsed }),
34
+ className: e(t, v.navigationItem, { [v.collapsed]: o?.isCollapsed }),
36
35
  ...i
37
36
  });
38
- }, x = {
37
+ }, b = {
39
38
  navigationLink: "_navigationLink_1kvxy_1",
40
39
  sidebar: "_sidebar_1kvxy_29",
41
40
  collapsed: "_collapsed_1kvxy_43",
42
41
  title: "_title_1kvxy_54"
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 = () => {
42
+ }, x = ({ as: e, children: o, className: u, isActive: m, icon: h, "aria-label": g, ..._ }) => {
43
+ let v = a(t), y = a(n), x = y?.isCollapsed, S = a(l), C = e || c, w = () => {
45
44
  S?.isOpen && S?.setOpen(!1);
46
45
  }, T = typeof o == "string" ? o : void 0;
47
46
  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,
47
+ isDisabled: !x || !T && !g,
49
48
  children: [/* @__PURE__ */ r(s, { children: /* @__PURE__ */ i(C, {
50
49
  "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
50
+ "aria-label": g || (x ? T : void 0),
51
+ className: p(u, b.navigationLink, {
52
+ [b.sidebar]: y || v,
53
+ [b.collapsed]: x
55
54
  }),
56
55
  "data-active": m || void 0,
57
56
  ...e ? { onClick: (e) => {
@@ -61,7 +60,7 @@ import '../assets/navigation.css';var h = { rootList: "_rootList_l3v98_1" }, g =
61
60
  } },
62
61
  ..._,
63
62
  children: [h, /* @__PURE__ */ r("span", {
64
- className: x.title,
63
+ className: b.title,
65
64
  children: o
66
65
  })]
67
66
  }) }), /* @__PURE__ */ r(d, {
@@ -69,28 +68,28 @@ import '../assets/navigation.css';var h = { rootList: "_rootList_l3v98_1" }, g =
69
68
  children: T
70
69
  })]
71
70
  });
72
- }, C = {
71
+ }, S = {
73
72
  navigationSection: "_navigationSection_1ae77_1",
74
73
  collapsed: "_collapsed_1ae77_5"
75
- }, w = ({ className: t, title: o, ...s }) => {
76
- let c = a(n);
77
- return /* @__PURE__ */ i(b, { children: [o && /* @__PURE__ */ r(v, { children: o }), /* @__PURE__ */ r("ul", {
78
- className: e(t, C.navigationSection, { [C.collapsed]: c?.isCollapsed }),
79
- children: /* @__PURE__ */ r(m, { ...s })
74
+ }, C = ({ className: t, title: s, ...c }) => {
75
+ let l = a(n);
76
+ return /* @__PURE__ */ i(y, { children: [s && /* @__PURE__ */ r(_, { children: s }), /* @__PURE__ */ r("ul", {
77
+ className: e(t, S.navigationSection, { [S.collapsed]: l?.isCollapsed }),
78
+ children: /* @__PURE__ */ r(o, { ...c })
80
79
  })] });
81
- }, T = {
80
+ }, w = {
82
81
  navigationSubMenu: "_navigationSubMenu_vfyl6_1",
83
82
  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,
83
+ }, T = ({ className: t, children: i, items: s, ...c }) => {
84
+ let l = a(n), { length: u } = Array.from(s || []);
85
+ return typeof i == "function" && u === 0 ? null : /* @__PURE__ */ r("ul", {
86
+ className: e(t, w.navigationSubMenu, { [w.collapsed]: l?.isCollapsed }),
87
+ children: /* @__PURE__ */ r(o, {
88
+ items: s,
89
+ ...c,
91
90
  children: i
92
91
  })
93
92
  });
94
93
  };
95
94
  //#endregion
96
- export { v as a, b as i, w as n, g as o, S as r, E as t };
95
+ export { _ as a, y as i, C as n, h as o, x as r, T as t };
package/index.js CHANGED
@@ -3,6 +3,6 @@ import { n as s, t as c } from "./chunks/sidebar-c0uIh8ge.js";
3
3
  import { a as l, c as u, i as d, l as f, n as p, o as m, r as h, s as g, t as _, u as v } from "./chunks/panel-CJr6C1-h.js";
4
4
  import { n as y, t as b } from "./chunks/layout-BL0juoss.js";
5
5
  import { t as x } from "./chunks/main-BHQLIt4r.js";
6
- import { a as S, i as C, n as w, o as T, r as E, t as D } from "./chunks/navigation-C7NE8eU6.js";
6
+ import { a as S, i as C, n as w, o as T, r as E, t as D } from "./chunks/navigation-CTvX1yRi.js";
7
7
  import { t as O } from "./chunks/navbar-C63VGKFb.js";
8
8
  export { o as Header, r as HeaderAction, a as HeaderActions, e as HeaderLogo, t as HeaderTitle, y as Layout, b as LayoutContent, x as Main, n as MobileMenu, i as MobileMenuContext, O as Navbar, T as Navigation, S as NavigationHeader, C as NavigationItem, E as NavigationLink, w as NavigationSection, D as NavigationSubMenu, m as Panel, v as PanelBody, f as PanelContent, d as PanelContext, u as PanelHeader, h as PanelProvider, _ as PanelRegion, g as PanelTitle, c as Sidebar, s as SidebarContext, l as UsePanels, p as usePanels };
@@ -1,4 +1,4 @@
1
1
  import { DetailedHTMLProps, HTMLAttributes } from 'react';
2
- import { CollectionProps } from '@react-aria/collections';
2
+ import { CollectionProps } from 'react-aria-components';
3
3
  export type NavigationProps<T extends object> = CollectionProps<T> & Omit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, 'children'>;
4
4
  export declare const Navigation: <T extends object>({ className, items, children, dependencies, idScope, addIdAndValue, ...rest }: NavigationProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/navigation-C7NE8eU6.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/navigation-CTvX1yRi.js";
2
2
  export { r as Navigation, e as NavigationHeader, t as NavigationItem, i as NavigationLink, n as NavigationSection, a as NavigationSubMenu };
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
2
2
  import { NavigationLink } from '.';
3
3
  type Story = StoryObj<typeof NavigationLink>;
4
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, icon, "aria-label": ariaLabel, ...rest }: import('./NavigationLink').NavigationLinkProps<C>) => import("react/jsx-runtime").JSX.Element;
5
+ component: <C extends import('react').ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null>({ as, children, className, isActive, icon, "aria-label": ariaLabel, ...rest }: import('./NavigationLink').NavigationLinkProps<C>) => import("react/jsx-runtime").JSX.Element;
6
6
  title: string;
7
7
  tags: string[];
8
8
  args: {
@@ -1,4 +1,4 @@
1
- import { CollectionProps } from '@react-aria/collections';
1
+ import { CollectionProps } from 'react-aria-components';
2
2
  export interface NavigationSectionProps<T extends object> extends CollectionProps<T> {
3
3
  title?: string;
4
4
  className?: string;
@@ -1,4 +1,4 @@
1
- import { CollectionProps } from '@react-aria/collections';
1
+ import { CollectionProps } from 'react-aria-components';
2
2
  export type NavigationSubMenuProps<T extends object> = CollectionProps<T> & {
3
3
  className?: string;
4
4
  };
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "description": "Midas Layout components",
15
15
  "homepage": "https://designsystem.migrationsverket.se/",
16
16
  "license": "CC0-1.0",
17
- "version": "0.2.11",
17
+ "version": "0.2.12",
18
18
  "module": "./index.js",
19
19
  "type": "module",
20
20
  "main": "./index.js",
@@ -37,7 +37,7 @@
37
37
  "./*": "./*/index.js"
38
38
  },
39
39
  "dependencies": {
40
- "@midas-ds/components": "17.17.3",
40
+ "@midas-ds/components": "17.18.0",
41
41
  "@react-aria/collections": "^3.0.3",
42
42
  "@react-aria/utils": "^3.33.1",
43
43
  "@react-stately/utils": "^3.11.0"