@midas-ds/components 17.29.0 → 17.30.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 (90) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/accordion/index.js +1 -1
  3. package/button/Button.stories.d.ts +1 -1
  4. package/button/index.js +1 -1
  5. package/calendar/index.js +1 -1
  6. package/card/index.js +1 -1
  7. package/checkbox/index.js +1 -1
  8. package/chunks/FeedbackStatusIcon-DvMDGBGL.js +36 -0
  9. package/chunks/{accordion-DIVTJU3O.js → accordion-BzmYSOS3.js} +23 -23
  10. package/chunks/{button-CenXTGXL.js → button-C-WkFek9.js} +1 -1
  11. package/chunks/calendar-Bt1FLxqr.js +107 -0
  12. package/chunks/card-CdH2UMUW.js +103 -0
  13. package/chunks/checkbox-DiFQy3MS.js +106 -0
  14. package/chunks/clear-button-Bv0YGBNG.js +17 -0
  15. package/chunks/color-scheme-switch-0axiBsna.js +160 -0
  16. package/chunks/{combobox-DIou4Z-d.js → combobox-DkZbA3o4.js} +24 -24
  17. package/chunks/{date-field-BF2f9bSf.js → date-field-CPpWZqws.js} +2 -2
  18. package/chunks/date-picker-DQ7vCG5-.js +142 -0
  19. package/chunks/file-list-D8Zc1aYS.js +139 -0
  20. package/chunks/{info-banner-osR4e6nB.js → info-banner-BVKtmVKN.js} +14 -14
  21. package/chunks/label-Dw5p84T2.js +50 -0
  22. package/chunks/layout-CUAjEEuH.js +378 -0
  23. package/chunks/link-DHu1cTmz.js +44 -0
  24. package/chunks/link-button-DYg_0p4Y.js +44 -0
  25. package/chunks/{list-box-BN_MSiOD.js → list-box-DmEoMvX1.js} +1 -1
  26. package/chunks/menu-CP0Xvmx0.js +48 -0
  27. package/chunks/modal-B_uSoXZM.js +66 -0
  28. package/chunks/{progress-bar-CknF4qAm.js → progress-bar-BfFxpqUv.js} +1 -1
  29. package/chunks/{radio-BD1EuxSa.js → radio-_z6ObjYx.js} +1 -1
  30. package/chunks/search-field-Cp_HHDl4.js +91 -0
  31. package/chunks/select-Wy6NakdH.js +176 -0
  32. package/chunks/spinner-COGZlDJB.js +29 -0
  33. package/chunks/table-O_Y45Sb7.js +84 -0
  34. package/chunks/tag-RjuYlFZI.js +78 -0
  35. package/chunks/{textfield-BSvCsAyC.js → textfield-Bu0Hg2pJ.js} +2 -2
  36. package/chunks/{time-field-CmjGBQph.js → time-field-Cnp-dYhm.js} +3 -3
  37. package/chunks/{toast-gJgjitZF.js → toast-Dg3fVjSS.js} +20 -20
  38. package/clear-button/index.js +1 -1
  39. package/color-scheme-switch/index.js +1 -1
  40. package/combobox/index.js +1 -1
  41. package/date-field/index.js +1 -1
  42. package/date-picker/index.js +1 -1
  43. package/file-list/index.js +1 -1
  44. package/index.js +49 -48
  45. package/info-banner/index.js +1 -1
  46. package/label/index.js +1 -1
  47. package/layout/index.js +1 -1
  48. package/link/index.js +1 -1
  49. package/link-button/index.js +1 -1
  50. package/list-box/index.js +1 -1
  51. package/menu/index.js +1 -1
  52. package/modal/index.js +1 -1
  53. package/package.json +3 -2
  54. package/progress-bar/index.js +1 -1
  55. package/radio/index.js +1 -1
  56. package/search-field/index.js +1 -1
  57. package/select/index.js +1 -1
  58. package/spinner/index.js +1 -1
  59. package/table/index.js +1 -1
  60. package/tag/index.js +1 -1
  61. package/textfield/index.js +1 -1
  62. package/time-field/index.js +1 -1
  63. package/toast/index.js +1 -1
  64. package/chunks/FeedbackStatusIcon-DRI7WrSU.js +0 -54
  65. package/chunks/arrow-right-Db_H9KjE.js +0 -10
  66. package/chunks/calendar-Bl_obez5.js +0 -111
  67. package/chunks/card-zIYA-SQh.js +0 -103
  68. package/chunks/check-DV00NPU0.js +0 -7
  69. package/chunks/checkbox-Bqd8B58G.js +0 -110
  70. package/chunks/chevron-down-CP7nEDei.js +0 -7
  71. package/chunks/chevron-right-DwqboCdU.js +0 -7
  72. package/chunks/clear-button-D3I1X3yG.js +0 -17
  73. package/chunks/color-scheme-switch-DVZjdwc9.js +0 -203
  74. package/chunks/createLucideIcon-BgluSHFG.js +0 -39
  75. package/chunks/date-picker-DZivTUB_.js +0 -187
  76. package/chunks/file-list-B4vG_egr.js +0 -161
  77. package/chunks/info-jCyacVsy.js +0 -19
  78. package/chunks/label-LWlgvAwz.js +0 -50
  79. package/chunks/layout-Db5um0f7.js +0 -426
  80. package/chunks/link-BAgs4RwY.js +0 -59
  81. package/chunks/link-button-BuPMEGUj.js +0 -52
  82. package/chunks/menu-aT2IR0tO.js +0 -49
  83. package/chunks/modal-C-UsxdO0.js +0 -66
  84. package/chunks/search-field-GNTRFpzf.js +0 -100
  85. package/chunks/select-oLCNpryY.js +0 -177
  86. package/chunks/spinner-LdHPVms_.js +0 -32
  87. package/chunks/square-arrow-out-up-right-DkgXD7hj.js +0 -17
  88. package/chunks/table-CmNWoAYO.js +0 -150
  89. package/chunks/tag-BIcqtf7b.js +0 -78
  90. package/chunks/x-BJAOO5a5.js +0 -10
@@ -0,0 +1,378 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-Di52oYUU.js";
3
+ import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
4
+ import { n } from "./button-C-WkFek9.js";
5
+ import { n as r, t as i } from "./badge-BfK6XrlL.js";
6
+ import { t as a } from "./grid-Cn_8RSvj.js";
7
+ import { n as o, t as s } from "./tooltip-BkesIUIF.js";
8
+ import { t as c } from "./logo-DyZ2pXt7.js";
9
+ import * as l from "react";
10
+ import { useEffect as u, useState as d } from "react";
11
+ import { Link as f, RouterProvider as p } from "react-aria-components";
12
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
13
+ import { Menu as _, PanelLeftClose as v, PanelLeftOpen as y, X as b } from "lucide-react";
14
+ import { variables as x } from "@midas-ds/theme";
15
+ import '../assets/layout.css';var S = {
16
+ baseLayout: "_baseLayout_1ylxx_1",
17
+ mainContent: "_mainContent_1ylxx_10",
18
+ header: "_header_1ylxx_15",
19
+ headerExternal: "_headerExternal_1ylxx_26",
20
+ headerContent: "_headerContent_1ylxx_41",
21
+ logo: "_logo_1ylxx_60",
22
+ headerItems: "_headerItems_1ylxx_69",
23
+ toggleButton: "_toggleButton_1ylxx_75",
24
+ sidebar: "_sidebar_1ylxx_83",
25
+ main: "_main_1ylxx_10",
26
+ app: "_app_1ylxx_116",
27
+ sidebarOpened: "_sidebarOpened_1ylxx_124",
28
+ sidebarHeader: "_sidebarHeader_1ylxx_128",
29
+ appName: "_appName_1ylxx_140",
30
+ collapseButton: "_collapseButton_1ylxx_147",
31
+ sidebarCollapsed: "_sidebarCollapsed_1ylxx_156",
32
+ userName: "_userName_1ylxx_166",
33
+ abbr: "_abbr_1ylxx_178",
34
+ userTitle: "_userTitle_1ylxx_184",
35
+ title: "_title_1ylxx_196",
36
+ sidebarNav: "_sidebarNav_1ylxx_207",
37
+ list: "_list_1ylxx_213",
38
+ listGroupTitle: "_listGroupTitle_1ylxx_219",
39
+ listItem: "_listItem_1ylxx_226",
40
+ listItemCollapsed: "_listItemCollapsed_1ylxx_231",
41
+ listLink: "_listLink_1ylxx_235",
42
+ listLinkCollapsed: "_listLinkCollapsed_1ylxx_298",
43
+ active: "_active_1ylxx_303",
44
+ linkText: "_linkText_1ylxx_314",
45
+ backdrop: "_backdrop_1ylxx_321",
46
+ backdropOpened: "_backdropOpened_1ylxx_331",
47
+ skipToContent: "_skipToContent_1ylxx_349",
48
+ navbar: "_navbar_1ylxx_363",
49
+ navbarList: "_navbarList_1ylxx_375",
50
+ navbarItem: "_navbarItem_1ylxx_397",
51
+ headerContentExternal: "_headerContentExternal_1ylxx_448",
52
+ logoExternalContainer: "_logoExternalContainer_1ylxx_456",
53
+ logoExternal: "_logoExternal_1ylxx_456",
54
+ logoExternalDesktop: "_logoExternalDesktop_1ylxx_468",
55
+ navbarWrapper: "_navbarWrapper_1ylxx_477"
56
+ }, C = l.createContext(void 0), w = ({ items: e, title: t, user: n, app: r, children: i, clientSideRouter: a, clientSideHref: o, headerChildren: s, isCollapsed: c, setIsCollapsed: l, isOpened: u, setIsOpened: d, variant: f, id: p }) => /* @__PURE__ */ h(C.Provider, {
57
+ value: {
58
+ items: e,
59
+ title: t,
60
+ user: n,
61
+ app: r,
62
+ headerChildren: s,
63
+ isCollapsed: c,
64
+ setIsCollapsed: l,
65
+ isOpened: u,
66
+ setIsOpened: d,
67
+ clientSideRouter: a,
68
+ clientSideHref: o,
69
+ variant: f,
70
+ id: p
71
+ },
72
+ children: i
73
+ }), T = () => {
74
+ let e = l.useContext(C);
75
+ if (!e) throw Error("useLayoutContext must be used within a LayoutProvider");
76
+ return e;
77
+ }, E = ({ title: t, href: n, icon: a, active: c, hasBadge: l, onClick: p, target: m }) => {
78
+ let { isCollapsed: _, setIsOpened: v, clientSideHref: y } = T(), b = y ? y(n) : n, [x, C] = d(!1);
79
+ u(() => {
80
+ if (typeof window < "u") {
81
+ let e = window.location.pathname === b || window.location.pathname.startsWith(b + "/");
82
+ C(c ?? e);
83
+ }
84
+ }, [c, b]);
85
+ let w = () => {
86
+ v?.(!1), p && p({
87
+ title: t,
88
+ href: b
89
+ });
90
+ };
91
+ return _ ? /* @__PURE__ */ g(o, { children: [/* @__PURE__ */ h(f, {
92
+ href: n,
93
+ "aria-label": t,
94
+ className: e(S.listLink, S.listLinkCollapsed, x && S.active),
95
+ onPress: w,
96
+ target: m,
97
+ children: /* @__PURE__ */ g(i, { children: [/* @__PURE__ */ h(a, {
98
+ size: 20,
99
+ "aria-label": t
100
+ }), l && /* @__PURE__ */ h(r, {})] })
101
+ }), /* @__PURE__ */ h(s, {
102
+ placement: "right",
103
+ children: t
104
+ })] }) : /* @__PURE__ */ g(f, {
105
+ href: n,
106
+ "aria-label": t,
107
+ className: e(S.listLink, x && S.active),
108
+ onPress: w,
109
+ target: m,
110
+ children: [/* @__PURE__ */ g(i, { children: [/* @__PURE__ */ h(a, { size: 20 }), l && /* @__PURE__ */ h(r, {})] }), t]
111
+ });
112
+ }, D = {
113
+ en: {
114
+ closeMenu: "Close menu",
115
+ openMenu: "Open menu",
116
+ maximizeMenu: "Maximize menu",
117
+ minimizeMenu: "Minimize menu",
118
+ sidebarMenu: "Sidebar menu",
119
+ bottomMenu: "Bottom menu",
120
+ skipToContent: "Skip to main content"
121
+ },
122
+ sv: {
123
+ closeMenu: "Stäng meny",
124
+ openMenu: "Öppna meny",
125
+ maximizeMenu: "Maximera meny",
126
+ minimizeMenu: "Minimera meny",
127
+ sidebarMenu: "Sidomeny",
128
+ bottomMenu: "Bottenmeny",
129
+ skipToContent: "Hoppa till huvudinnehåll"
130
+ }
131
+ }, O = ({ onLinkClick: r }) => {
132
+ let { items: i, app: a, isOpened: o, isCollapsed: s, setIsCollapsed: c, setIsOpened: u, clientSideRouter: d, clientSideHref: f, id: m } = T(), _ = t(D), b = ({ group: t }) => /* @__PURE__ */ h("ul", {
133
+ className: S.list,
134
+ children: t.items.map((t, n) => /* @__PURE__ */ h("li", {
135
+ className: e(S.listItem, s && S.listItemCollapsed),
136
+ children: t.target === "_blank" || !d ? /* @__PURE__ */ h(E, {
137
+ onClick: r,
138
+ ...t
139
+ }) : /* @__PURE__ */ h(p, {
140
+ navigate: d,
141
+ useHref: f,
142
+ children: /* @__PURE__ */ h(E, {
143
+ onClick: r,
144
+ ...t
145
+ })
146
+ })
147
+ }, "link_" + n))
148
+ });
149
+ return l.useEffect(() => {
150
+ let e = (e) => {
151
+ e.key === "Escape" && u !== void 0 && u(!1);
152
+ };
153
+ return window.addEventListener("keydown", e), () => {
154
+ window.removeEventListener("keydown", e);
155
+ };
156
+ }, [u]), /* @__PURE__ */ g("aside", {
157
+ id: m,
158
+ className: e(S.sidebar, s && S.sidebarCollapsed, o && S.sidebarOpened),
159
+ children: [/* @__PURE__ */ g("div", {
160
+ className: S.sidebarHeader,
161
+ children: [!s && /* @__PURE__ */ h("p", {
162
+ className: S.appName,
163
+ children: a.name
164
+ }), /* @__PURE__ */ h(n, {
165
+ variant: "icon",
166
+ "aria-label": s ? _.format("maximizeMenu") : _.format("minimizeMenu"),
167
+ onPress: () => c(!s),
168
+ className: S.collapseButton,
169
+ children: h(s ? y : v, { size: 20 })
170
+ })]
171
+ }), /* @__PURE__ */ h("nav", {
172
+ className: S.sidebarNav,
173
+ "aria-label": _.format("sidebarMenu"),
174
+ children: /* @__PURE__ */ h("ul", {
175
+ className: S.list,
176
+ children: i.map((e, t) => /* @__PURE__ */ g("li", { children: [e.title && !s && /* @__PURE__ */ h("p", {
177
+ className: S.listGroupTitle,
178
+ children: e.title
179
+ }), /* @__PURE__ */ h(b, { group: e })] }, "list_" + t))
180
+ })
181
+ })]
182
+ });
183
+ }, k = () => {
184
+ let { title: r, user: i, app: a, isOpened: o, setIsOpened: s, setIsCollapsed: l, headerChildren: u, variant: d, id: f } = T(), p = t(D);
185
+ return d === "external" ? /* @__PURE__ */ h("header", {
186
+ className: e(S.header, S.headerExternal),
187
+ children: /* @__PURE__ */ g("div", {
188
+ className: S.headerContentExternal,
189
+ children: [/* @__PURE__ */ g("div", {
190
+ className: S.logoExternalContainer,
191
+ children: [
192
+ /* @__PURE__ */ h(c, {
193
+ size: "x-small",
194
+ padding: !1,
195
+ className: S.logoExternal
196
+ }),
197
+ /* @__PURE__ */ h(c, {
198
+ size: "small",
199
+ padding: !1,
200
+ className: S.logoExternalDesktop
201
+ }),
202
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
203
+ className: S.userName,
204
+ children: i.name
205
+ }), /* @__PURE__ */ h("p", {
206
+ className: S.userTitle,
207
+ children: i.title
208
+ })] })
209
+ ]
210
+ }), /* @__PURE__ */ h("div", {
211
+ className: S.headerItems,
212
+ children: u
213
+ })]
214
+ })
215
+ }) : /* @__PURE__ */ g("header", {
216
+ className: S.header,
217
+ style: { borderTop: `solid 4px ${a.color ? a.color : x.brandPrimary}` },
218
+ children: [/* @__PURE__ */ g("div", {
219
+ className: S.headerContent,
220
+ children: [
221
+ /* @__PURE__ */ h("div", {
222
+ className: S.logo,
223
+ children: /* @__PURE__ */ h(c, {
224
+ size: "small",
225
+ padding: !1
226
+ })
227
+ }),
228
+ o !== void 0 && /* @__PURE__ */ h(n, {
229
+ variant: "icon",
230
+ className: S.toggleButton,
231
+ "aria-label": o ? p.format("closeMenu") : p.format("openMenu"),
232
+ "aria-controls": f,
233
+ onPressStart: () => {
234
+ l(!1), s?.(!0);
235
+ },
236
+ children: h(o ? b : _, {
237
+ size: 20,
238
+ "aria-hidden": "true"
239
+ })
240
+ }),
241
+ /* @__PURE__ */ g("div", { children: [
242
+ /* @__PURE__ */ h("p", {
243
+ className: S.userName,
244
+ children: i.name
245
+ }),
246
+ /* @__PURE__ */ h("p", {
247
+ className: S.userTitle,
248
+ children: i.title
249
+ }),
250
+ /* @__PURE__ */ h("p", {
251
+ className: S.title,
252
+ children: r
253
+ })
254
+ ] })
255
+ ]
256
+ }), /* @__PURE__ */ h("div", {
257
+ className: S.headerItems,
258
+ children: u
259
+ })]
260
+ });
261
+ }, A = ({ id: e = "main:first-of-type" }) => {
262
+ let r = () => {
263
+ let t = document.querySelector(e);
264
+ t && (t.tabIndex = -1, t.focus(), setTimeout(() => t.removeAttribute("tabindex"), 1e3));
265
+ }, i = t(D);
266
+ return /* @__PURE__ */ h(n, {
267
+ onPress: r,
268
+ className: S.skipToContent,
269
+ children: i.format("skipToContent")
270
+ });
271
+ }, j = () => {
272
+ let { isOpened: t, setIsOpened: n } = T();
273
+ return t ? /* @__PURE__ */ h("div", {
274
+ className: e(S.backdrop, S.backdropOpened),
275
+ onClick: () => {
276
+ n?.(!1);
277
+ },
278
+ "aria-hidden": !0
279
+ }) : null;
280
+ }, M = () => {
281
+ let { items: n, clientSideRouter: r, clientSideHref: i } = T(), a = t(D), o = n?.[0]?.items;
282
+ return /* @__PURE__ */ h("nav", {
283
+ className: S.navbar,
284
+ "aria-label": a.format("bottomMenu"),
285
+ children: o && /* @__PURE__ */ h("ul", {
286
+ className: e(S.navbarList),
287
+ children: r ? /* @__PURE__ */ h(p, {
288
+ navigate: r,
289
+ useHref: i,
290
+ children: /* @__PURE__ */ h(N, { items: o })
291
+ }) : /* @__PURE__ */ h(N, { items: o })
292
+ })
293
+ });
294
+ }, N = ({ items: t }) => /* @__PURE__ */ h(m, { children: t.map(({ href: t, active: n, icon: a, title: o, hasBadge: s }, c) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ g(f, {
295
+ href: t,
296
+ className: e(S.navbarItem),
297
+ "data-active": n,
298
+ "aria-current": n && "page",
299
+ children: [/* @__PURE__ */ g(i, { children: [/* @__PURE__ */ h(a, { size: 20 }), s && /* @__PURE__ */ h(r, {})] }), o]
300
+ }) }, c)) }), P = ({ items: t, title: n, user: r, app: i, children: o, headerChildren: s, clientSideRouter: c, clientSideHref: u, variant: d, className: f, onSidebarLinkClick: p }) => {
301
+ let [m, _] = l.useState(!1), [v, y] = l.useState(!1), b = l.useId();
302
+ return d === "external" ? /* @__PURE__ */ h(P.Provider, {
303
+ items: t,
304
+ title: n,
305
+ user: r,
306
+ app: i,
307
+ clientSideRouter: c,
308
+ clientSideHref: u,
309
+ headerChildren: s,
310
+ isCollapsed: m,
311
+ setIsCollapsed: _,
312
+ variant: d,
313
+ id: b,
314
+ children: /* @__PURE__ */ g("div", {
315
+ className: e(S.baseLayout, f),
316
+ children: [
317
+ /* @__PURE__ */ h(A, {}),
318
+ /* @__PURE__ */ h(P.Header, {}),
319
+ /* @__PURE__ */ g("div", {
320
+ className: S.mainContent,
321
+ children: [
322
+ /* @__PURE__ */ h(P.Sidebar, { onLinkClick: p }),
323
+ /* @__PURE__ */ h(a, { children: /* @__PURE__ */ h("main", {
324
+ className: S.main,
325
+ children: /* @__PURE__ */ h("div", {
326
+ className: S.app,
327
+ children: o
328
+ })
329
+ }) }),
330
+ /* @__PURE__ */ h(P.Backdrop, {})
331
+ ]
332
+ }),
333
+ /* @__PURE__ */ h("div", {
334
+ className: S.navbarWrapper,
335
+ children: /* @__PURE__ */ h(P.Navbar, {})
336
+ })
337
+ ]
338
+ })
339
+ }) : /* @__PURE__ */ h(P.Provider, {
340
+ items: t,
341
+ title: n,
342
+ user: r,
343
+ app: i,
344
+ clientSideRouter: c,
345
+ clientSideHref: u,
346
+ headerChildren: s,
347
+ isCollapsed: m,
348
+ setIsCollapsed: _,
349
+ isOpened: v,
350
+ setIsOpened: y,
351
+ variant: d,
352
+ id: b,
353
+ children: /* @__PURE__ */ g("div", {
354
+ className: e(S.baseLayout, f),
355
+ children: [
356
+ /* @__PURE__ */ h(A, {}),
357
+ /* @__PURE__ */ h(P.Header, {}),
358
+ /* @__PURE__ */ g("div", {
359
+ className: S.mainContent,
360
+ children: [
361
+ /* @__PURE__ */ h(P.Sidebar, { onLinkClick: p }),
362
+ /* @__PURE__ */ h(a, { children: /* @__PURE__ */ h("main", {
363
+ className: S.main,
364
+ children: /* @__PURE__ */ h("div", {
365
+ className: S.app,
366
+ children: o
367
+ })
368
+ }) }),
369
+ /* @__PURE__ */ h(P.Backdrop, {})
370
+ ]
371
+ })
372
+ ]
373
+ })
374
+ });
375
+ };
376
+ P.Provider = w, P.Header = k, P.Sidebar = O, P.SidebarLink = E, P.Navbar = M, P.Backdrop = j;
377
+ //#endregion
378
+ export { E as a, O as i, M as n, k as r, P as t };
@@ -0,0 +1,44 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-Di52oYUU.js";
3
+ import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
4
+ import { Link as n, RouterProvider as r } from "react-aria-components";
5
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { ArrowDownToLine as s, ArrowRight as c, SquareArrowOutUpRight as l } from "lucide-react";
7
+ import { VisuallyHidden as u } from "react-aria";
8
+ import '../assets/link.css';var d = {
9
+ link: "_link_duep2_1",
10
+ icon: "_icon_duep2_53",
11
+ standalone: "_standalone_duep2_57",
12
+ stretched: "_stretched_duep2_76"
13
+ }, f = {
14
+ en: {
15
+ opensInNewTab: "Opens in new tab",
16
+ downloadsFile: "Downloads file"
17
+ },
18
+ sv: {
19
+ opensInNewTab: "Öppnas i ny flik",
20
+ downloadsFile: "Hämtar fil"
21
+ }
22
+ }, p = ({ children: r, standalone: p, target: h, stretched: g, download: _, icon: v, className: y, as: b, ...x }) => {
23
+ let S = b || n, C = t(f), w = v ? { icon: v } : _ ? {
24
+ icon: s,
25
+ label: C.format("downloadsFile")
26
+ } : h === "_blank" ? {
27
+ icon: l,
28
+ label: C.format("opensInNewTab")
29
+ } : p ? { icon: c } : null;
30
+ return /* @__PURE__ */ o(S, {
31
+ className: e(d.link, p && d.standalone, g && d.stretched, y),
32
+ ...x,
33
+ target: h,
34
+ download: _,
35
+ children: [r, w ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(m, {
36
+ className: d.icon,
37
+ icon: w.icon,
38
+ size: 16,
39
+ "aria-hidden": !0
40
+ }), w.label && /* @__PURE__ */ a(u, { children: w.label })] }) : null]
41
+ });
42
+ }, m = ({ icon: e, ...t }) => /* @__PURE__ */ a(e, { ...t });
43
+ //#endregion
44
+ export { r as n, p as t };
@@ -0,0 +1,44 @@
1
+ 'use client';
2
+ import { t as e } from "./clsx-Di52oYUU.js";
3
+ import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
4
+ import "react";
5
+ import { Link as n, RouterProvider as r } from "react-aria-components";
6
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
+ import { ArrowLeft as o, ArrowRight as s, SquareArrowOutUpRight as c } from "lucide-react";
8
+ import { VisuallyHidden as l } from "react-aria";
9
+ import '../assets/link-button.css';var u = {
10
+ linkButton: "_linkButton_1k5w6_1",
11
+ secondary: "_secondary_1k5w6_58",
12
+ icon: "_icon_1k5w6_63",
13
+ tertiary: "_tertiary_1k5w6_102",
14
+ danger: "_danger_1k5w6_130",
15
+ iconBtn: "_iconBtn_1k5w6_149",
16
+ medium: "_medium_1k5w6_173",
17
+ iconLeft: "_iconLeft_1k5w6_178",
18
+ fullwidth: "_fullwidth_1k5w6_182",
19
+ button: "_button_1k5w6_192"
20
+ }, d = {
21
+ en: { opensInNewTab: "Opens in new tab" },
22
+ sv: { opensInNewTab: "Öppnas i ny flik" }
23
+ }, f = ({ children: r, variant: f, fullwidth: m, icon: h, iconPlacement: g, className: _, as: v, size: y = "large", ...b }) => {
24
+ let x = v || n, S = t(d), C = h ? { icon: h } : b.target === "_blank" ? {
25
+ icon: c,
26
+ label: S.format("opensInNewTab")
27
+ } : g === "left" ? { icon: o } : { icon: s };
28
+ return /* @__PURE__ */ a(x, {
29
+ className: e(u.linkButton, f === "primary" && u.primary, f === "secondary" && u.secondary, f === "tertiary" && u.tertiary, f === "danger" && u.danger, f === "icon" && u.iconBtn, y === "medium" && u.medium, m && u.fullwidth, g === "left" && u.iconLeft, _),
30
+ ...b,
31
+ children: [
32
+ r,
33
+ /* @__PURE__ */ i(p, {
34
+ className: u.icon,
35
+ icon: C.icon,
36
+ size: 20,
37
+ "aria-hidden": !0
38
+ }),
39
+ C.label && /* @__PURE__ */ i(l, { children: C.label })
40
+ ]
41
+ });
42
+ }, p = ({ icon: e, ...t }) => /* @__PURE__ */ i(e, { ...t });
43
+ //#endregion
44
+ export { r as n, f as t };
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clsx-Di52oYUU.js";
2
- import { t } from "./spinner-LdHPVms_.js";
2
+ import { t } from "./spinner-COGZlDJB.js";
3
3
  import { t as n } from "./useLocalizedStringFormatter-CeyBc0x0.js";
4
4
  import { t as r } from "./text-DwmZ-ew8.js";
5
5
  import "react";
@@ -0,0 +1,48 @@
1
+ import { t as e } from "./clsx-Di52oYUU.js";
2
+ import { Menu as t, MenuItem as n, MenuSection as r, MenuTrigger as i, Popover as a, Separator as o } from "react-aria-components";
3
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { Check as u, ChevronRight as d } from "lucide-react";
5
+ import '../assets/menu.css';var f = {
6
+ menu: "_menu_1wm5z_1",
7
+ menuSection: "_menuSection_1wm5z_17",
8
+ medium: "_medium_1wm5z_29",
9
+ menuItem: "_menuItem_1wm5z_36",
10
+ mainContent: "_mainContent_1wm5z_105",
11
+ checkMark: "_checkMark_1wm5z_116",
12
+ separator: "_separator_1wm5z_126",
13
+ menuPopover: "_menuPopover_1wm5z_149 _dropdownAnimation_1ljkv_4"
14
+ }, p = ({ className: n, size: r = "large", ...i }) => /* @__PURE__ */ c(t, {
15
+ className: e(n, f.menu, r === "medium" && f.medium),
16
+ ...i
17
+ }), m = (t) => /* @__PURE__ */ c(n, {
18
+ ...t,
19
+ textValue: t.textValue || (typeof t.children == "string" ? t.children : void 0),
20
+ className: e(f.menuItem, t.className),
21
+ children: (e) => {
22
+ let { children: n } = t, { selectionMode: r, isSelected: i, hasSubmenu: a } = e;
23
+ return /* @__PURE__ */ l(s, { children: [
24
+ r !== "none" && /* @__PURE__ */ c(u, {
25
+ size: 16,
26
+ className: f.checkMark,
27
+ "data-selected": i || void 0
28
+ }),
29
+ /* @__PURE__ */ c("div", {
30
+ className: f.mainContent,
31
+ children: typeof n == "function" ? n(e) : n
32
+ }),
33
+ a && /* @__PURE__ */ c(d, { size: 20 })
34
+ ] });
35
+ }
36
+ }), h = ({ className: t, ...n }) => /* @__PURE__ */ c(a, {
37
+ className: e(t, f.menuPopover),
38
+ offset: 4,
39
+ ...n
40
+ }), g = ({ className: t, ...n }) => /* @__PURE__ */ c(r, {
41
+ className: e(t, f.menuSection),
42
+ ...n
43
+ }), _ = ({ className: t, ...n }) => /* @__PURE__ */ c(o, {
44
+ className: e(t, f.separator),
45
+ ...n
46
+ });
47
+ //#endregion
48
+ export { p as a, m as i, g as n, i as o, h as r, _ as t };
@@ -0,0 +1,66 @@
1
+ import { t as e } from "./clsx-Di52oYUU.js";
2
+ import { t } from "./useLocalizedStringFormatter-CeyBc0x0.js";
3
+ import { n } from "./button-C-WkFek9.js";
4
+ import { t as r } from "./heading-BEl_z-5T.js";
5
+ import { forwardRef as i } from "react";
6
+ import { Dialog as a, DialogTrigger as o, Modal as s, ModalOverlay as c, composeRenderProps as l } from "react-aria-components";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { X as f } from "lucide-react";
9
+ import '../assets/modal.css';var p = {
10
+ modal: "_modal_x15md_1",
11
+ dialog: "_dialog_x15md_10",
12
+ modalHeader: "_modalHeader_x15md_39",
13
+ modalTitle: "_modalTitle_x15md_50",
14
+ modalBody: "_modalBody_x15md_56"
15
+ }, m = {
16
+ en: { close: "Close" },
17
+ sv: { close: "Stäng" }
18
+ }, h = {
19
+ modalOverlay: "_modalOverlay_gwg3f_1",
20
+ "modal-fade": "_modal-fade_gwg3f_1"
21
+ }, g = i(({ className: t, ...n }, r) => /* @__PURE__ */ u(c, {
22
+ className: e(t, h.modalOverlay),
23
+ ref: r,
24
+ ...n
25
+ }));
26
+ g.displayName = "ModalOverlay";
27
+ //#endregion
28
+ //#region src/modal/Modal.tsx
29
+ var _ = i(({ children: e, title: i, hideCloseButton: o = !1, ...c }, h) => {
30
+ let _ = t(m);
31
+ return /* @__PURE__ */ u(g, {
32
+ ...c,
33
+ children: l(e, (e) => /* @__PURE__ */ u(s, {
34
+ className: p.modal,
35
+ ref: h,
36
+ children: /* @__PURE__ */ d(a, {
37
+ className: p.dialog,
38
+ children: [/* @__PURE__ */ d("div", {
39
+ className: p.modalHeader,
40
+ children: [/* @__PURE__ */ u("div", {
41
+ className: p.modalTitle,
42
+ children: i && /* @__PURE__ */ u(r, {
43
+ level: 3,
44
+ elementType: "h2",
45
+ slot: "title",
46
+ children: i
47
+ })
48
+ }), !o && /* @__PURE__ */ u(n, {
49
+ slot: "close",
50
+ variant: "tertiary",
51
+ icon: f,
52
+ iconPlacement: "right",
53
+ children: _.format("close")
54
+ })]
55
+ }), /* @__PURE__ */ u("div", {
56
+ className: p.modalBody,
57
+ tabIndex: -1,
58
+ children: e
59
+ })]
60
+ })
61
+ }))
62
+ });
63
+ });
64
+ _.displayName = "Modal";
65
+ //#endregion
66
+ export { _ as n, g as r, o as t };
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clsx-Di52oYUU.js";
2
- import { t } from "./label-LWlgvAwz.js";
2
+ import { t } from "./label-Dw5p84T2.js";
3
3
  import "react";
4
4
  import { ProgressBar as n } from "react-aria-components";
5
5
  import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clsx-Di52oYUU.js";
2
- import { n as t, t as n } from "./label-LWlgvAwz.js";
2
+ import { n as t, t as n } from "./label-Dw5p84T2.js";
3
3
  import { t as r } from "./text-DwmZ-ew8.js";
4
4
  import { t as i } from "./field-error-LtNtEKDp.js";
5
5
  import { t as a } from "./splitDataAttributes-_JTFOOIb.js";