@midas-ds/components 1.0.2 → 1.1.0

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.
Files changed (175) hide show
  1. package/Button-DL6nqUco.js +182 -0
  2. package/CHANGELOG.md +15 -0
  3. package/Checkbox-q0dugR2t.js +402 -0
  4. package/{Collection-B3xUVWPF.js → Collection-KMFfVuzU.js} +179 -152
  5. package/Dialog-D6Bqrpn-.js +1952 -0
  6. package/Disclosure-dAZYXyTH.js +225 -0
  7. package/Disclosure.css +1 -0
  8. package/DragAndDrop-B0T3WgjL.js +40 -0
  9. package/FocusScope-B7CkxXNC.js +513 -0
  10. package/{Form-DXLoQL91.js → Form-BWBjJC6v.js} +79 -81
  11. package/Group-D7_8007y.js +42 -0
  12. package/Heading-RCRHv6hd.js +15 -0
  13. package/{Hidden-BQWDvze4.js → Hidden-CVlUgUJM.js} +1 -1
  14. package/Link-BnQvB-hH.js +75 -0
  15. package/ListBox-DBBiqvcR.js +474 -0
  16. package/ListKeyboardDelegate-gCXy-Xnn.js +172 -0
  17. package/PressResponder-B4g56kDz.js +31 -0
  18. package/README.md +21 -3
  19. package/{RSPContexts-EOiWkKOf.js → RSPContexts-BW2SEIqe.js} +2 -2
  20. package/SelectionManager-BfXUE1qg.js +1031 -0
  21. package/Separator-BBX9m2O2.js +49 -0
  22. package/Tag-DWt0koFj.js +728 -0
  23. package/Text-BCF0xvqL.js +15 -0
  24. package/TextField-CX4eOQf6.js +225 -0
  25. package/TextField.module-DdICj682.js +143 -0
  26. package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-Dhr5caPC.js} +1 -1
  27. package/accordion/Accordion.d.ts +8 -8
  28. package/accordion/AccordionItem.d.ts +11 -3
  29. package/accordion/index.d.ts +0 -3
  30. package/{context-ScOIq_Gu.js → context-BpJLnOuu.js} +11 -11
  31. package/global.css +1 -0
  32. package/index-B-jHjTDC.js +120 -0
  33. package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
  34. package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
  35. package/index.d.ts +1 -0
  36. package/index.js +105 -112
  37. package/index10.js +1 -1
  38. package/index11.js +1 -1
  39. package/index12.js +1 -1
  40. package/index13.js +1 -1
  41. package/index14.js +1 -1
  42. package/index15.js +2 -2
  43. package/index16.js +2 -2
  44. package/index17.js +1 -1
  45. package/index18.js +1 -1
  46. package/index19.js +2 -2
  47. package/index2.js +1 -1
  48. package/index20.js +2 -2
  49. package/index21.js +1 -1
  50. package/index22.js +1 -1
  51. package/index23.js +1 -1
  52. package/index24.js +1 -1
  53. package/index25.js +2 -2
  54. package/index26.js +2 -2
  55. package/index27.js +2 -2
  56. package/index28.js +1 -1
  57. package/index29.js +2 -8
  58. package/index3.js +2 -4
  59. package/index30.js +17 -16
  60. package/index31.js +3 -3
  61. package/index32.js +3 -3
  62. package/index33.js +2 -2
  63. package/index34.js +3 -3
  64. package/index35.js +1 -1
  65. package/index36.js +2 -2
  66. package/index37.js +2 -2
  67. package/index38.js +2 -2
  68. package/index39.js +2 -2
  69. package/index4.js +1 -1
  70. package/index40.js +19 -12
  71. package/index41.js +61 -14
  72. package/index42.js +44 -22
  73. package/index43.js +13 -11
  74. package/index44.js +25 -4
  75. package/index45.js +16 -51
  76. package/index46.js +19 -16
  77. package/index47.js +49 -27
  78. package/index48.js +5 -18
  79. package/index49.js +25 -21
  80. package/index5.js +1 -1
  81. package/index50.js +16 -47
  82. package/index51.js +7 -3
  83. package/index52.js +18 -18
  84. package/index53.js +16 -16
  85. package/index54.js +6 -4
  86. package/index55.js +8 -21
  87. package/index56.js +13 -16
  88. package/index57.js +6 -8
  89. package/index58.js +6 -9
  90. package/index59.js +17 -13
  91. package/index6.js +1 -1
  92. package/index60.js +20 -7
  93. package/index61.js +59 -7
  94. package/index62.js +13 -17
  95. package/index63.js +9 -20
  96. package/index64.js +40 -48
  97. package/index65.js +85 -15
  98. package/index66.js +74 -11
  99. package/index67.js +23 -62
  100. package/index68.js +64 -80
  101. package/index69.js +68 -62
  102. package/index7.js +1 -1
  103. package/index70.js +138 -22
  104. package/index71.js +66 -65
  105. package/index72.js +40 -78
  106. package/index73.js +75 -133
  107. package/index74.js +69 -68
  108. package/index75.js +96 -34
  109. package/index76.js +258 -65
  110. package/index77.js +715 -63
  111. package/index78.js +478 -93
  112. package/index79.js +303 -263
  113. package/index8.js +1 -1
  114. package/index80.js +343 -678
  115. package/index81.js +242 -481
  116. package/index82.js +1329 -282
  117. package/index83.js +968 -350
  118. package/index84.js +343 -211
  119. package/index85.js +2025 -1288
  120. package/index86.js +2313 -954
  121. package/index87.js +6782 -339
  122. package/index88.js +15 -2103
  123. package/index89.js +12 -2369
  124. package/index9.js +1 -1
  125. package/index90.js +4 -6832
  126. package/index91.js +7 -15
  127. package/link/Link.d.ts +2 -2
  128. package/link-button/LinkButton.d.ts +1 -1
  129. package/package.json +7 -1
  130. package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
  131. package/textfield/index.d.ts +0 -2
  132. package/useControlledState-Kv9K2AYu.js +30 -0
  133. package/{useDescription-D4_zk_sA.js → useDescription-B7stiK3j.js} +1 -1
  134. package/useEvent-Xk5kn5Ns.js +21 -0
  135. package/useField-DMzJIIN4.js +67 -0
  136. package/{useFilter-BnJDBCkt.js → useFilter-Bt9dbV1U.js} +1 -1
  137. package/useFocusRing-9PXyKy2A.js +1297 -0
  138. package/{useFocusable-C-N9wcwm.js → useFocusable-CcEBZe40.js} +11 -8
  139. package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-DYgEnElE.js} +3 -3
  140. package/useHasTabbableChild-D6DwR81L.js +34 -0
  141. package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-WYAbP4No.js} +19 -19
  142. package/useLabels-9zaZ9oa0.js +17 -0
  143. package/useListState-BfTeKTk5.js +119 -0
  144. package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-BlCbn-hX.js} +29 -29
  145. package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-DPkaL0la.js} +5 -5
  146. package/Button-CCevm2s3.js +0 -183
  147. package/Checkbox-CllWDBxF.js +0 -405
  148. package/Dialog-CLTyYwkS.js +0 -1889
  149. package/DragAndDrop-OTN7La7U.js +0 -42
  150. package/FocusScope-BR0SJ-cZ.js +0 -512
  151. package/Group-DPMuN3h8.js +0 -44
  152. package/Label-C18A_4Z5.js +0 -69
  153. package/Link-BU1h3K2a.js +0 -77
  154. package/ListBox-D21tdwTs.js +0 -463
  155. package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
  156. package/PressResponder-DP8ZDNGy.js +0 -31
  157. package/SelectionManager-D4WtKtey.js +0 -988
  158. package/Separator-DLUHK9vv.js +0 -48
  159. package/Tag-CEd6WWSc.js +0 -725
  160. package/Text-DGLaY3HR.js +0 -17
  161. package/TextField-C_hq9WeT.js +0 -226
  162. package/TextField.module-Cwq1FAm7.js +0 -141
  163. package/accordion/AccordionContent.d.ts +0 -3
  164. package/accordion/AccordionTagContext.d.ts +0 -3
  165. package/accordion/AccordionTrigger.d.ts +0 -3
  166. package/index-CEg5vZQH.js +0 -132
  167. package/index-CgfokhRq.js +0 -674
  168. package/index.css +0 -1
  169. package/index92.js +0 -14
  170. package/index93.js +0 -6
  171. package/index94.js +0 -9
  172. package/useControlledState-S_TYcV_c.js +0 -45
  173. package/useFocusRing-D97-G3fT.js +0 -1324
  174. package/useHasTabbableChild-DeuCnGGv.js +0 -34
  175. package/useListState-DSOTbsL3.js +0 -119
package/index75.js CHANGED
@@ -1,42 +1,104 @@
1
- import { jsxs as o, jsx as s } from "react/jsx-runtime";
2
- import { c as r } from "./clsx-OuTLNxxd.js";
3
- import { c as a } from "./createLucideIcon-DeWljiyi.js";
4
- import './Spinner.css';/**
1
+ import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
+ import { $ as p } from "./Link-BnQvB-hH.js";
3
+ import { c as m } from "./clsx-OuTLNxxd.js";
4
+ import { c as y } from "./createLucideIcon-DeWljiyi.js";
5
+ import { C as _, a as g } from "./chevron-right-DBMc9VMi.js";
6
+ import { $ as Z } from "./useFocusRing-9PXyKy2A.js";
7
+ import './LinkButton.css';/**
5
8
  * @license lucide-react v0.453.0 - ISC
6
9
  *
7
10
  * This source code is licensed under the ISC license.
8
11
  * See the LICENSE file in the root directory of this source tree.
9
12
  */
10
- const c = a("LoaderCircle", [
11
- ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
12
- ]), i = '"../theme/tokens.css"', d = "#b90835", _ = "#143c50", l = "_container_13uof_4", u = "_spinner_13uof_8", p = "_rotating_13uof_1", k = "_dark_13uof_18", m = "_vsHidden_13uof_22", n = {
13
- tokens: i,
14
- red100: d,
15
- blue150: _,
16
- container: l,
17
- spinner: u,
18
- rotating: p,
19
- dark: k,
20
- vsHidden: m
21
- }, b = ({ small: e, dark: t }) => /* @__PURE__ */ o(
22
- "div",
23
- {
24
- className: n.container,
25
- role: "status",
26
- children: [
27
- /* @__PURE__ */ s(
28
- c,
29
- {
30
- className: r(n.spinner, t && n.dark),
31
- size: e ? 16 : 32,
32
- strokeWidth: e ? 2 : 3,
33
- absoluteStrokeWidth: !0
34
- }
13
+ const h = y("SquareArrowOutUpRight", [
14
+ ["path", { d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6", key: "y09zxi" }],
15
+ ["path", { d: "m21 3-9 9", key: "mpx6sq" }],
16
+ ["path", { d: "M15 3h6v6", key: "1q9fwt" }]
17
+ ]), b = '"../theme/tokens.css"', k = "#143c50", q = "#25607f", x = "#4289ad", B = '"Inter", sans-serif', w = "1rem", R = "500", z = "#ffffff", L = "#bfbfbf", N = "#f2f2f2", $ = "#e6e6e6", S = "#000000", C = "undefined", j = "0 0 0 2px #ffffff, 0 0 0 4px #000000", A = "(max-width: 767px)", I = "#e62323", M = "#b31b1b", O = "#801313", U = "_linkButton_7qa6p_4", W = "_secondary_7qa6p_43", v = "_tertiary_7qa6p_67", H = "_danger_7qa6p_88", V = "_iconBtn_7qa6p_110", D = "_iconLeft_7qa6p_131", E = "_fullwidth_7qa6p_135", F = "_button_7qa6p_140", t = {
18
+ tokens: b,
19
+ blue150: k,
20
+ blue130: q,
21
+ blue90: x,
22
+ display: B,
23
+ desktopSize: w,
24
+ mediumWeight: R,
25
+ white: z,
26
+ gray50: L,
27
+ gray10: N,
28
+ gray20: $,
29
+ black: S,
30
+ medium: C,
31
+ focus: j,
32
+ smBreakpoint: A,
33
+ signalRed100: I,
34
+ signalRed130: M,
35
+ signalRed150: O,
36
+ linkButton: U,
37
+ secondary: W,
38
+ tertiary: v,
39
+ danger: H,
40
+ iconBtn: V,
41
+ iconLeft: D,
42
+ fullwidth: E,
43
+ button: F
44
+ }, T = ({
45
+ children: a,
46
+ variant: e,
47
+ fullwidth: r,
48
+ icon: o,
49
+ iconPlacement: s,
50
+ className: i,
51
+ as: f,
52
+ ...c
53
+ }) => {
54
+ const d = f || p, l = () => o ? /* @__PURE__ */ n(
55
+ o,
56
+ {
57
+ size: 20,
58
+ className: t.icon
59
+ }
60
+ ) : c.target === "_blank" ? /* @__PURE__ */ n(
61
+ h,
62
+ {
63
+ size: 20,
64
+ className: t.icon
65
+ }
66
+ ) : s === "left" ? /* @__PURE__ */ n(
67
+ _,
68
+ {
69
+ size: 20,
70
+ className: t.icon
71
+ }
72
+ ) : /* @__PURE__ */ n(
73
+ g,
74
+ {
75
+ size: 20,
76
+ className: t.icon
77
+ }
78
+ );
79
+ return /* @__PURE__ */ u(
80
+ d,
81
+ {
82
+ className: m(
83
+ t.linkButton,
84
+ e === "primary" && t.primary,
85
+ e === "secondary" && t.secondary,
86
+ e === "tertiary" && t.tertiary,
87
+ e === "danger" && t.danger,
88
+ e === "icon" && t.iconBtn,
89
+ r && t.fullwidth,
90
+ s === "left" && t.iconLeft,
91
+ i
35
92
  ),
36
- /* @__PURE__ */ s("span", { className: n.vsHidden, children: "Laddar, vänligen vänta." })
37
- ]
38
- }
39
- );
93
+ ...c,
94
+ children: [
95
+ a,
96
+ /* @__PURE__ */ n(l, {})
97
+ ]
98
+ }
99
+ );
100
+ };
40
101
  export {
41
- b as Spinner
102
+ T as LinkButton,
103
+ Z as RouterProvider
42
104
  };
package/index76.js CHANGED
@@ -1,82 +1,275 @@
1
- import { jsxs as t, jsx as c, Fragment as i } from "react/jsx-runtime";
2
- import { $ as d, a, b as l, c as f } from "./Dialog-CLTyYwkS.js";
3
- import { Button as p } from "./index69.js";
4
- import { c as u } from "./createLucideIcon-DeWljiyi.js";
5
- import './Dropdown.css';/**
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { LinkButton as f } from "./index75.js";
3
+ import { Button as k } from "./index66.js";
4
+ import { c as h } from "./clsx-OuTLNxxd.js";
5
+ import { FlexItem as N } from "./index44.js";
6
+ import { Logo as g } from "./index70.js";
7
+ import b from "react";
8
+ import './global.css';import './Layout.css';/* empty css */
9
+ import { m as v } from "./tokens-CjXmpXTi.js";
10
+ import { Dropdown as x, DropdownItem as C } from "./index73.js";
11
+ import { $ as L } from "./useFocusRing-9PXyKy2A.js";
12
+ import { c as y } from "./createLucideIcon-DeWljiyi.js";
13
+ import { X as T } from "./x-JK7i-TQC.js";
14
+ /**
6
15
  * @license lucide-react v0.453.0 - ISC
7
16
  *
8
17
  * This source code is licensed under the ISC license.
9
18
  * See the LICENSE file in the root directory of this source tree.
10
19
  */
11
- const x = u("EllipsisVertical", [
12
- ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
13
- ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
14
- ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
15
- ]), $ = '"../theme/tokens.css"', b = '"Inter", sans-serif', m = "0 0 0 2px #ffffff, 0 0 0 4px #000000", h = "#f2f2f2", y = "_dropDownMenu_1f4ap_4", w = "_dropdownMenu_1f4ap_15", s = {
16
- tokens: $,
17
- display: b,
18
- focus: m,
19
- gray10: h,
20
- dropDownMenu: y,
21
- dropdownMenu: w
22
- };
23
- function _({
24
- label: e,
20
+ const I = y("Menu", [
21
+ ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
22
+ ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
23
+ ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
24
+ ]);
25
+ /**
26
+ * @license lucide-react v0.453.0 - ISC
27
+ *
28
+ * This source code is licensed under the ISC license.
29
+ * See the LICENSE file in the root directory of this source tree.
30
+ */
31
+ const B = y("PanelLeftClose", [
32
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
33
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
34
+ ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
35
+ ]);
36
+ /**
37
+ * @license lucide-react v0.453.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */
42
+ const M = y("PanelRightClose", [
43
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
44
+ ["path", { d: "M15 3v18", key: "14nvp0" }],
45
+ ["path", { d: "m8 9 3 3-3 3", key: "12hl5m" }]
46
+ ]), P = '"../theme/tokens.css"', $ = '"Inter", sans-serif', H = "#143c50", O = "#f2f2f2", z = "#d9d9d9", E = "#b3b3b3", F = "#a6a6a6", S = "#5d5d5d", G = "(min-width: 768px)", j = "#b90835", D = "_baseLayout_1w6p5_4", R = "_mainContent_1w6p5_13", q = "_header_1w6p5_18", X = "_headerContent_1w6p5_35", A = "_headerItems_1w6p5_52", J = "_logo_1w6p5_53", K = "_headerMenu_1w6p5_61", Q = "_toggleButton_1w6p5_69", U = "_sidebar_1w6p5_77", V = "_main_1w6p5_13", W = "_app_1w6p5_112", Y = "_sidebarOpened_1w6p5_121", Z = "_sidebarHeader_1w6p5_125", ee = "_sidebarFooter_1w6p5_134", ae = "_sidebarCollapsed_1w6p5_148", te = "_userName_1w6p5_165", se = "_abbr_1w6p5_177", ne = "_userTitle_1w6p5_183", ie = "_title_1w6p5_194", re = "_sidebarNav_1w6p5_205", oe = "_list_1w6p5_211", le = "_listGroupTitle_1w6p5_218", de = "_listItem_1w6p5_227", ce = "_listItemCollapsed_1w6p5_231", me = "_listLink_1w6p5_235", pe = "_linkText_1w6p5_242", _e = "_linkTextCollapsed_1w6p5_252", he = "_listLinkCollapsed_1w6p5_263", be = "_collapseButton_1w6p5_267", ye = "_backdrop_1w6p5_272", ue = "_backdropOpened_1w6p5_281", a = {
47
+ tokens: P,
48
+ display: $,
49
+ primaryBackground: H,
50
+ gray10: O,
51
+ gray30: z,
52
+ gray60: E,
53
+ gray70: F,
54
+ gray130: S,
55
+ mdBreakpoint: G,
56
+ logoPrimary: j,
57
+ baseLayout: D,
58
+ mainContent: R,
59
+ header: q,
60
+ headerContent: X,
61
+ headerItems: A,
62
+ logo: J,
63
+ headerMenu: K,
64
+ toggleButton: Q,
65
+ sidebar: U,
66
+ main: V,
67
+ app: W,
68
+ sidebarOpened: Y,
69
+ sidebarHeader: Z,
70
+ sidebarFooter: ee,
71
+ sidebarCollapsed: ae,
72
+ userName: te,
73
+ abbr: se,
74
+ userTitle: ne,
75
+ title: ie,
76
+ sidebarNav: re,
77
+ list: oe,
78
+ listGroupTitle: le,
79
+ listItem: de,
80
+ listItemCollapsed: ce,
81
+ listLink: me,
82
+ linkText: pe,
83
+ linkTextCollapsed: _e,
84
+ listLinkCollapsed: he,
85
+ collapseButton: be,
86
+ backdrop: ye,
87
+ backdropOpened: ue
88
+ }, He = ({
89
+ items: p,
25
90
  title: r,
26
- children: n,
27
- ...o
28
- }) {
29
- return /* @__PURE__ */ t(d, { ...o, children: [
30
- /* @__PURE__ */ t(
31
- p,
91
+ user: d,
92
+ app: t,
93
+ children: i,
94
+ headerChildren: o,
95
+ clientSideRouter: c
96
+ }) => {
97
+ const [m, s] = b.useState(!1), [n, _] = b.useState(!1);
98
+ return b.useEffect(() => {
99
+ const u = (w) => {
100
+ w.key === "Escape" && _(!1);
101
+ };
102
+ return window.addEventListener("keydown", u), () => {
103
+ window.removeEventListener("keydown", u);
104
+ };
105
+ }, []), /* @__PURE__ */ l("div", { className: a.baseLayout, children: [
106
+ /* @__PURE__ */ e(
107
+ we,
32
108
  {
33
- "aria-label": e,
34
- variant: "icon",
35
- children: [
36
- r,
37
- /* @__PURE__ */ c(
38
- x,
39
- {
40
- size: 20,
41
- "aria-hidden": !0
42
- }
43
- )
44
- ]
109
+ title: r,
110
+ headerChildren: o,
111
+ user: d,
112
+ app: t,
113
+ isOpened: n,
114
+ setIsOpened: _,
115
+ setIsCollapsed: s
45
116
  }
46
117
  ),
47
- /* @__PURE__ */ c(a, { children: /* @__PURE__ */ c(
48
- l,
49
- {
50
- ...o,
51
- className: s.dropDownMenu,
52
- children: n
53
- }
54
- ) })
118
+ /* @__PURE__ */ l("div", { className: a.mainContent, children: [
119
+ /* @__PURE__ */ e(
120
+ ke,
121
+ {
122
+ items: p,
123
+ app: t,
124
+ isOpened: n,
125
+ isCollapsed: m,
126
+ setIsCollapsed: s,
127
+ clientSideRouter: c
128
+ }
129
+ ),
130
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: i }) }) }),
131
+ /* @__PURE__ */ e(
132
+ "div",
133
+ {
134
+ className: h(a.backdrop, n && a.backdropOpened),
135
+ onClick: () => _(!1),
136
+ "aria-hidden": !0
137
+ }
138
+ )
139
+ ] })
55
140
  ] });
56
- }
57
- function v(e) {
58
- const r = e.textValue || (typeof e.children == "string" ? e.children : void 0);
59
- return /* @__PURE__ */ c(
60
- f,
141
+ }, ke = ({
142
+ items: p,
143
+ app: r,
144
+ isOpened: d,
145
+ isCollapsed: t,
146
+ setIsCollapsed: i,
147
+ clientSideRouter: o
148
+ }) => {
149
+ const c = () => /* @__PURE__ */ e("div", { className: a.sidebarHeader, children: t ? /* @__PURE__ */ e("p", { className: a.name, children: r.shortName }) : /* @__PURE__ */ e("p", { className: a.abbr, children: r.name }) }), m = ({ group: s }) => /* @__PURE__ */ e("ul", { className: a.list, children: s.items.map((n, _) => /* @__PURE__ */ e(
150
+ "li",
151
+ {
152
+ className: h(
153
+ a.listItem,
154
+ t && a.listItemCollapsed
155
+ ),
156
+ children: /* @__PURE__ */ e(
157
+ f,
158
+ {
159
+ iconPlacement: "left",
160
+ href: n.href,
161
+ icon: n.icon,
162
+ className: h(
163
+ a.listLink,
164
+ t && a.listLinkCollapsed
165
+ ),
166
+ variant: "tertiary",
167
+ children: /* @__PURE__ */ e(
168
+ "span",
169
+ {
170
+ className: h(
171
+ a.linkText,
172
+ t && a.linkTextCollapsed
173
+ ),
174
+ children: n.title
175
+ }
176
+ )
177
+ }
178
+ )
179
+ },
180
+ "link_" + _
181
+ )) });
182
+ return /* @__PURE__ */ l(
183
+ "aside",
61
184
  {
62
- ...e,
63
- textValue: r,
64
- className: ({ isFocused: n, isOpen: o }) => `${s.dropdownMenu} ${n ? "focused" : ""} ${o ? "open" : ""}`,
65
- children: ({ hasSubmenu: n }) => /* @__PURE__ */ t(i, { children: [
66
- e.children,
67
- n && /* @__PURE__ */ c(
68
- "svg",
185
+ id: "midasMainMenu",
186
+ className: h(
187
+ a.sidebar,
188
+ t && a.sidebarCollapsed,
189
+ d && a.sidebarOpened
190
+ ),
191
+ children: [
192
+ /* @__PURE__ */ e(c, {}),
193
+ /* @__PURE__ */ e("nav", { className: a.sidebarNav, children: /* @__PURE__ */ e("ul", { className: a.list, children: p.map((s, n) => /* @__PURE__ */ l("li", { children: [
194
+ s.title && !t && /* @__PURE__ */ e("p", { className: a.listGroupTitle, children: s.title }),
195
+ o ? /* @__PURE__ */ e(L, { navigate: o, children: /* @__PURE__ */ e(m, { group: s }) }) : /* @__PURE__ */ e(m, { group: s })
196
+ ] }, "list_" + n)) }) }),
197
+ /* @__PURE__ */ e("div", { className: a.sidebarFooter, children: /* @__PURE__ */ e(
198
+ k,
69
199
  {
70
- className: "chevron",
71
- viewBox: "0 0 24 24",
72
- children: /* @__PURE__ */ c("path", { d: "m9 18 6-6-6-6" })
200
+ variant: "tertiary",
201
+ "aria-label": t ? "Maximera sidomenyn" : "Minimera sidomenyn",
202
+ onPress: () => i(!t),
203
+ className: a.collapseButton,
204
+ children: t ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(B, {})
73
205
  }
74
- )
75
- ] })
206
+ ) })
207
+ ]
76
208
  }
77
209
  );
78
- }
210
+ }, we = ({
211
+ title: p,
212
+ user: r,
213
+ app: d,
214
+ headerChildren: t,
215
+ isOpened: i,
216
+ setIsOpened: o,
217
+ setIsCollapsed: c
218
+ }) => /* @__PURE__ */ l(
219
+ "header",
220
+ {
221
+ className: a.header,
222
+ style: {
223
+ borderTop: `solid 4px ${d.color ? d.color : v.logoPrimary}`
224
+ },
225
+ children: [
226
+ /* @__PURE__ */ l("div", { className: a.headerContent, children: [
227
+ /* @__PURE__ */ e(
228
+ g,
229
+ {
230
+ padding: !1,
231
+ size: "small",
232
+ className: a.logo
233
+ }
234
+ ),
235
+ i !== void 0 && c && o && /* @__PURE__ */ e(
236
+ k,
237
+ {
238
+ variant: "icon",
239
+ className: a.toggleButton,
240
+ "aria-label": i ? "Stäng meny" : "Öppna meny",
241
+ "aria-controls": "midasMainMenu",
242
+ onPress: () => {
243
+ c(!1), o(!i);
244
+ },
245
+ children: i ? /* @__PURE__ */ e(
246
+ T,
247
+ {
248
+ size: 20,
249
+ "aria-hidden": !0
250
+ }
251
+ ) : /* @__PURE__ */ e(
252
+ I,
253
+ {
254
+ size: 20,
255
+ "aria-hidden": !0
256
+ }
257
+ )
258
+ }
259
+ ),
260
+ /* @__PURE__ */ l("div", { children: [
261
+ /* @__PURE__ */ e("p", { className: a.userName, children: r.name }),
262
+ /* @__PURE__ */ e("p", { className: a.userTitle, children: r.title }),
263
+ /* @__PURE__ */ e("p", { className: a.title, children: p })
264
+ ] })
265
+ ] }),
266
+ /* @__PURE__ */ e("div", { className: a.headerItems, children: t }),
267
+ /* @__PURE__ */ e("div", { className: a.headerMenu, children: /* @__PURE__ */ e(x, { children: b.Children.map(t, (m) => /* @__PURE__ */ e(C, { children: m })) }) })
268
+ ]
269
+ }
270
+ );
79
271
  export {
80
- _ as Dropdown,
81
- v as DropdownItem
272
+ we as Header,
273
+ He as Layout,
274
+ ke as Sidebar
82
275
  };