@midas-ds/components 17.15.3 → 17.15.4
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 +10 -0
- package/accordion/index.js +2 -5
- package/assets/Button.css +1 -1
- package/assets/TextField.css +1 -1
- package/assets/accordion.css +1 -0
- package/assets/badge.css +1 -0
- package/assets/breadcrumbs.css +1 -0
- package/assets/button2.css +1 -0
- package/assets/calendar.css +1 -0
- package/assets/card.css +1 -0
- package/assets/checkbox.css +1 -0
- package/assets/{ColorSchemeSwitch.css → color-scheme-switch.css} +1 -1
- package/assets/combobox.css +1 -0
- package/assets/date-field.css +1 -0
- package/assets/date-picker.css +1 -0
- package/assets/default.css +1 -1
- package/assets/field-error.css +1 -0
- package/assets/file-list.css +1 -0
- package/assets/{FileUpload.css → file-upload.css} +1 -1
- package/assets/grid.css +1 -0
- package/assets/info-banner.css +1 -0
- package/assets/label.css +1 -0
- package/assets/layout.css +1 -0
- package/assets/link-button.css +1 -0
- package/assets/link.css +1 -0
- package/assets/list-box.css +1 -0
- package/assets/logo.css +1 -0
- package/assets/menu.css +1 -0
- package/assets/modal.css +1 -0
- package/assets/popover.css +1 -0
- package/assets/progress-bar.css +1 -0
- package/assets/radio.css +1 -0
- package/assets/search-field.css +1 -0
- package/assets/select.css +1 -0
- package/assets/skeleton.css +1 -0
- package/assets/spinner.css +1 -0
- package/assets/table.css +1 -0
- package/assets/tabs.css +1 -0
- package/assets/{TagGroup.css → tag.css} +1 -1
- package/assets/{Text.css → text.css} +1 -1
- package/assets/time-field.css +1 -0
- package/assets/toast.css +1 -0
- package/assets/toggle-button.css +1 -0
- package/assets/tooltip.css +1 -0
- package/badge/index.js +2 -5
- package/breadcrumbs/index.js +2 -5
- package/button/index.js +2 -6
- package/calendar/index.js +2 -5
- package/card/index.js +2 -12
- package/character-counter/index.js +2 -4
- package/checkbox/index.js +2 -6
- package/chunks/Button.module-0C2ArlRs.js +13 -0
- package/chunks/FeedbackStatusIcon-A1trvSCf.js +54 -0
- package/chunks/TextField.module-CrR3Krxn.js +12 -0
- package/chunks/accordion-AqEcuKz_.js +87 -0
- package/chunks/arrow-right-7yeXXFNV.js +10 -0
- package/chunks/badge-DrCn-5SX.js +22 -0
- package/chunks/breadcrumbs-XTH3axtt.js +23 -0
- package/chunks/button-CFjf-bDe.js +34 -0
- package/chunks/calendar-C0rlcHfr.js +74 -0
- package/chunks/card-CF8iwdg3.js +103 -0
- package/chunks/character-counter-CSoVSrxZ.js +16 -0
- package/chunks/check-BiPE7lAA.js +7 -0
- package/chunks/checkbox-B_41DFjp.js +174 -0
- package/chunks/chevron-down-Buf0eTzo.js +7 -0
- package/chunks/chevron-right-DJ7qKNKG.js +7 -0
- package/chunks/clear-button-Cb4MTvBR.js +17 -0
- package/chunks/clsx-BtlV5Vo3.js +21 -0
- package/chunks/color-scheme-switch-Ce4vL8Yz.js +122 -0
- package/chunks/combobox-BLGIYxNy.js +90 -0
- package/chunks/createLucideIcon-DhIhuN5D.js +39 -0
- package/chunks/date-field-Cy0HGw6v.js +73 -0
- package/chunks/date-picker-ByfWqOZh.js +191 -0
- package/chunks/field-error-DYp2kgFr.js +19 -0
- package/chunks/file-list-DYOuch5G.js +68 -0
- package/chunks/file-upload-CZRTVw5O.js +11 -0
- package/chunks/grid-CUYMbO7c.js +225 -0
- package/chunks/heading-595zCrRS.js +28 -0
- package/chunks/info-Bm2gRija.js +19 -0
- package/chunks/info-banner-hHq0Atii.js +59 -0
- package/chunks/label-uwnwLD3z.js +49 -0
- package/chunks/layout-BzK7P4Xn.js +426 -0
- package/chunks/link-Q46Ny2Po.js +40 -0
- package/chunks/link-button-Cm2B0s4X.js +39 -0
- package/chunks/list-box-Dm2itiZD.js +75 -0
- package/chunks/logo-D7tz-4hp.js +93 -0
- package/chunks/menu-CB6VDQ-u.js +49 -0
- package/chunks/modal-Dr0ythpF.js +66 -0
- package/chunks/popover-DxnYz_IT.js +27 -0
- package/chunks/progress-bar-Dppkp0cT.js +40 -0
- package/chunks/radio-PBrD5BO4.js +43 -0
- package/chunks/search-field-B5RciSq0.js +90 -0
- package/chunks/select-BZ0greL0.js +171 -0
- package/chunks/skeleton-OqKFBcmO.js +36 -0
- package/chunks/spinner-C3WiZYld.js +32 -0
- package/chunks/square-arrow-out-up-right-Bobm4VNc.js +17 -0
- package/chunks/table-BZ7VvZaq.js +150 -0
- package/chunks/tabs-eshGdQJJ.js +52 -0
- package/chunks/tag-CELJrUEQ.js +78 -0
- package/chunks/text-mAeDlv5N.js +23 -0
- package/chunks/textfield-CZSw2R67.js +112 -0
- package/chunks/time-field-DaQfnJQF.js +60 -0
- package/chunks/toast-AYzfHBcQ.js +91 -0
- package/chunks/toggle-button-DlPo9GJW.js +17 -0
- package/chunks/tooltip-BE_r_CBm.js +33 -0
- package/chunks/useLocalizedStringFormatter-bRLuRzVD.js +19 -0
- package/chunks/x-Bs_QW3q8.js +10 -0
- package/clear-button/index.js +2 -4
- package/color-scheme-switch/index.js +2 -4
- package/combobox/index.js +2 -4
- package/date-field/index.js +2 -9
- package/date-picker/index.js +2 -5
- package/field-error/index.js +2 -4
- package/file-list/index.js +2 -5
- package/file-upload/index.js +2 -5
- package/grid/index.js +2 -6
- package/heading/index.js +2 -4
- package/index.js +91 -165
- package/info-banner/index.js +2 -4
- package/label/index.js +2 -4
- package/layout/index.js +2 -8
- package/link/index.js +2 -6
- package/link-button/index.js +2 -6
- package/list-box/index.js +2 -13
- package/logo/index.js +2 -5
- package/menu/index.js +2 -10
- package/modal/index.js +2 -7
- package/package.json +1 -1
- package/popover/index.js +2 -4
- package/progress-bar/index.js +2 -4
- package/radio/index.js +2 -5
- package/search-field/index.js +2 -4
- package/select/index.js +2 -4
- package/skeleton/index.js +2 -4
- package/spinner/index.js +2 -4
- package/table/index.js +2 -9
- package/tabs/index.js +2 -7
- package/tag/index.js +2 -6
- package/text/index.js +2 -4
- package/textfield/index.js +2 -7
- package/time-field/index.js +2 -4
- package/toast/index.js +2 -10
- package/toggle-button/index.js +2 -5
- package/tooltip/index.js +2 -5
- package/assets/AccordionItem.css +0 -1
- package/assets/BadgeContainer.css +0 -1
- package/assets/Breadcrumb.css +0 -1
- package/assets/ButtonGroup.css +0 -1
- package/assets/CardHeader.css +0 -1
- package/assets/Checkbox.css +0 -1
- package/assets/ComboBox.css +0 -1
- package/assets/DateField.css +0 -1
- package/assets/DateInput.css +0 -1
- package/assets/DateRangePicker.css +0 -1
- package/assets/FieldError.css +0 -1
- package/assets/FileListItem.css +0 -1
- package/assets/GridItem.css +0 -1
- package/assets/InfoBanner.css +0 -1
- package/assets/Label.css +0 -1
- package/assets/Layout.css +0 -1
- package/assets/Link.css +0 -1
- package/assets/LinkButton.css +0 -1
- package/assets/ListBox.css +0 -1
- package/assets/ListBoxEmptyState.css +0 -1
- package/assets/Logo.css +0 -1
- package/assets/Modal.css +0 -1
- package/assets/Popover.css +0 -1
- package/assets/ProgressBar.css +0 -1
- package/assets/Radio.css +0 -1
- package/assets/RangeCalendar.css +0 -1
- package/assets/SearchField.css +0 -1
- package/assets/Select.css +0 -1
- package/assets/Separator.css +0 -1
- package/assets/Skeleton.css +0 -1
- package/assets/Spinner.css +0 -1
- package/assets/TabList.css +0 -1
- package/assets/Table.css +0 -1
- package/assets/TimeField.css +0 -1
- package/assets/Toast.css +0 -1
- package/assets/ToggleButtonGroup.css +0 -1
- package/assets/Tooltip.css +0 -1
- package/chunks/AccordionItem-DHhQDd6o.js +0 -129
- package/chunks/BadgeContainer-DyQDrY6S.js +0 -38
- package/chunks/Breadcrumb-Bs836gOn.js +0 -37
- package/chunks/Button-GCROAMSl.js +0 -56
- package/chunks/Button.module-byTN5rhp.js +0 -14
- package/chunks/ButtonGroup-Dr6HOBo2.js +0 -22
- package/chunks/CardHeader-BnwDMzW9.js +0 -184
- package/chunks/CharacterCounter-Dgnv-orm.js +0 -22
- package/chunks/Checkbox-CyamRrFD.js +0 -146
- package/chunks/CheckboxGroup-CmjQm14M.js +0 -84
- package/chunks/ClearButton-DkC8PIMi.js +0 -22
- package/chunks/ColorSchemeSwitch-CjXb7w5A.js +0 -118
- package/chunks/ComboBox-BCfucCKv.js +0 -102
- package/chunks/DateField-CpvZGNHu.js +0 -89
- package/chunks/DateInput-NzWcnB4y.js +0 -29
- package/chunks/DateInputDivider-BHAwPkIR.js +0 -13
- package/chunks/DateRangePicker-BBLNlQ2y.js +0 -202
- package/chunks/FeedbackStatusIcon-X9Bjgeta.js +0 -56
- package/chunks/FieldError-krpMBtie.js +0 -24
- package/chunks/FileListItem-CKF9HPjw.js +0 -69
- package/chunks/FileUpload-D6oyWcDA.js +0 -17
- package/chunks/Grid-C7aRFvmS.js +0 -24
- package/chunks/GridItem-DenBLGXB.js +0 -237
- package/chunks/Heading-nfcRc2QF.js +0 -38
- package/chunks/InfoBanner-CWLvkP6D.js +0 -76
- package/chunks/Label-Cqo7Xz2v.js +0 -67
- package/chunks/Layout-D-nVSBJY.js +0 -493
- package/chunks/Link-CSIZehbN.js +0 -59
- package/chunks/LinkButton-Dzp8ZAPs.js +0 -68
- package/chunks/ListBox-CJhp9Hsb.js +0 -60
- package/chunks/ListBoxEmptyState-BxWWr2D9.js +0 -30
- package/chunks/ListBoxHeader-Cl56gGEe.js +0 -63
- package/chunks/Logo-DDykn5b2.js +0 -150
- package/chunks/Modal-yigospxi.js +0 -78
- package/chunks/Popover-CjEPHe4A.js +0 -34
- package/chunks/ProgressBar-BrWLkY8H.js +0 -53
- package/chunks/Radio-CFolRKKY.js +0 -44
- package/chunks/RangeCalendar-DxLInTav.js +0 -99
- package/chunks/SearchField-BXIDm898.js +0 -121
- package/chunks/Select-BQ109AJG.js +0 -231
- package/chunks/Separator-CDRwpeHz.js +0 -76
- package/chunks/Skeleton-ClvqZoDy.js +0 -88
- package/chunks/Spinner-CfKMn18u.js +0 -43
- package/chunks/TabList-CJSnr6O0.js +0 -87
- package/chunks/Table-CDdv7GeG.js +0 -140
- package/chunks/TagGroup-C-pkXtVn.js +0 -119
- package/chunks/Text-D0r_W4lH.js +0 -36
- package/chunks/TextArea-CNP1Y3jR.js +0 -135
- package/chunks/TextField.module-BDIbEV87.js +0 -12
- package/chunks/TimeField-B3IdCqTf.js +0 -88
- package/chunks/Toast-BFq_0Ue4.js +0 -158
- package/chunks/ToggleButtonGroup-DRnEEi5-.js +0 -29
- package/chunks/Tooltip-BYEaNkZG.js +0 -44
- package/chunks/arrow-right-BVcFGZmy.js +0 -8
- package/chunks/check-Bt2UikoU.js +0 -5
- package/chunks/chevron-down-BBFYYzZq.js +0 -5
- package/chunks/chevron-right-DvXGOiS_.js +0 -5
- package/chunks/clsx-AexbMWKp.js +0 -24
- package/chunks/createLucideIcon-CP-mMPfa.js +0 -75
- package/chunks/info-N5jWZg2A.js +0 -9
- package/chunks/square-arrow-out-up-right-x_I6wdNi.js +0 -9
- package/chunks/useLocalizedStringFormatter-BHvsRxDk.js +0 -25
- package/chunks/x-B9bYxG31.js +0 -8
- /package/assets/{CharacterCounter.css → character-counter.css} +0 -0
- /package/assets/{Heading.css → heading.css} +0 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-BtlV5Vo3.js";
|
|
3
|
+
import { t } from "./createLucideIcon-DhIhuN5D.js";
|
|
4
|
+
import { t as n } from "./x-Bs_QW3q8.js";
|
|
5
|
+
import { t as r } from "./useLocalizedStringFormatter-bRLuRzVD.js";
|
|
6
|
+
import { n as i } from "./button-CFjf-bDe.js";
|
|
7
|
+
import { n as a, t as o } from "./badge-DrCn-5SX.js";
|
|
8
|
+
import { t as s } from "./grid-CUYMbO7c.js";
|
|
9
|
+
import { n as c, t as l } from "./tooltip-BE_r_CBm.js";
|
|
10
|
+
import { t as u } from "./logo-D7tz-4hp.js";
|
|
11
|
+
import * as d from "react";
|
|
12
|
+
import { useEffect as f, useState as p } from "react";
|
|
13
|
+
import { Link as m, RouterProvider as h } from "react-aria-components";
|
|
14
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
15
|
+
import { variables as y } from "@midas-ds/theme";
|
|
16
|
+
import '../assets/layout.css';var b = t("panel-left-close", [
|
|
17
|
+
["rect", {
|
|
18
|
+
width: "18",
|
|
19
|
+
height: "18",
|
|
20
|
+
x: "3",
|
|
21
|
+
y: "3",
|
|
22
|
+
rx: "2",
|
|
23
|
+
key: "afitv7"
|
|
24
|
+
}],
|
|
25
|
+
["path", {
|
|
26
|
+
d: "M9 3v18",
|
|
27
|
+
key: "fh3hqa"
|
|
28
|
+
}],
|
|
29
|
+
["path", {
|
|
30
|
+
d: "m16 15-3-3 3-3",
|
|
31
|
+
key: "14y99z"
|
|
32
|
+
}]
|
|
33
|
+
]), x = t("panel-left-open", [
|
|
34
|
+
["rect", {
|
|
35
|
+
width: "18",
|
|
36
|
+
height: "18",
|
|
37
|
+
x: "3",
|
|
38
|
+
y: "3",
|
|
39
|
+
rx: "2",
|
|
40
|
+
key: "afitv7"
|
|
41
|
+
}],
|
|
42
|
+
["path", {
|
|
43
|
+
d: "M9 3v18",
|
|
44
|
+
key: "fh3hqa"
|
|
45
|
+
}],
|
|
46
|
+
["path", {
|
|
47
|
+
d: "m14 9 3 3-3 3",
|
|
48
|
+
key: "8010ee"
|
|
49
|
+
}]
|
|
50
|
+
]), S = t("menu", [
|
|
51
|
+
["path", {
|
|
52
|
+
d: "M4 5h16",
|
|
53
|
+
key: "1tepv9"
|
|
54
|
+
}],
|
|
55
|
+
["path", {
|
|
56
|
+
d: "M4 12h16",
|
|
57
|
+
key: "1lakjw"
|
|
58
|
+
}],
|
|
59
|
+
["path", {
|
|
60
|
+
d: "M4 19h16",
|
|
61
|
+
key: "1djgab"
|
|
62
|
+
}]
|
|
63
|
+
]), C = {
|
|
64
|
+
baseLayout: "_baseLayout_1ylxx_1",
|
|
65
|
+
mainContent: "_mainContent_1ylxx_10",
|
|
66
|
+
header: "_header_1ylxx_15",
|
|
67
|
+
headerExternal: "_headerExternal_1ylxx_26",
|
|
68
|
+
headerContent: "_headerContent_1ylxx_41",
|
|
69
|
+
logo: "_logo_1ylxx_60",
|
|
70
|
+
headerItems: "_headerItems_1ylxx_69",
|
|
71
|
+
toggleButton: "_toggleButton_1ylxx_75",
|
|
72
|
+
sidebar: "_sidebar_1ylxx_83",
|
|
73
|
+
main: "_main_1ylxx_10",
|
|
74
|
+
app: "_app_1ylxx_116",
|
|
75
|
+
sidebarOpened: "_sidebarOpened_1ylxx_124",
|
|
76
|
+
sidebarHeader: "_sidebarHeader_1ylxx_128",
|
|
77
|
+
appName: "_appName_1ylxx_140",
|
|
78
|
+
collapseButton: "_collapseButton_1ylxx_147",
|
|
79
|
+
sidebarCollapsed: "_sidebarCollapsed_1ylxx_156",
|
|
80
|
+
userName: "_userName_1ylxx_166",
|
|
81
|
+
abbr: "_abbr_1ylxx_178",
|
|
82
|
+
userTitle: "_userTitle_1ylxx_184",
|
|
83
|
+
title: "_title_1ylxx_196",
|
|
84
|
+
sidebarNav: "_sidebarNav_1ylxx_207",
|
|
85
|
+
list: "_list_1ylxx_213",
|
|
86
|
+
listGroupTitle: "_listGroupTitle_1ylxx_219",
|
|
87
|
+
listItem: "_listItem_1ylxx_226",
|
|
88
|
+
listItemCollapsed: "_listItemCollapsed_1ylxx_231",
|
|
89
|
+
listLink: "_listLink_1ylxx_235",
|
|
90
|
+
listLinkCollapsed: "_listLinkCollapsed_1ylxx_298",
|
|
91
|
+
active: "_active_1ylxx_303",
|
|
92
|
+
linkText: "_linkText_1ylxx_314",
|
|
93
|
+
backdrop: "_backdrop_1ylxx_321",
|
|
94
|
+
backdropOpened: "_backdropOpened_1ylxx_331",
|
|
95
|
+
skipToContent: "_skipToContent_1ylxx_349",
|
|
96
|
+
navbar: "_navbar_1ylxx_363",
|
|
97
|
+
navbarList: "_navbarList_1ylxx_375",
|
|
98
|
+
navbarItem: "_navbarItem_1ylxx_397",
|
|
99
|
+
headerContentExternal: "_headerContentExternal_1ylxx_448",
|
|
100
|
+
logoExternalContainer: "_logoExternalContainer_1ylxx_456",
|
|
101
|
+
logoExternal: "_logoExternal_1ylxx_456",
|
|
102
|
+
logoExternalDesktop: "_logoExternalDesktop_1ylxx_468",
|
|
103
|
+
navbarWrapper: "_navbarWrapper_1ylxx_477"
|
|
104
|
+
}, w = d.createContext(void 0), T = ({ 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__ */ _(w.Provider, {
|
|
105
|
+
value: {
|
|
106
|
+
items: e,
|
|
107
|
+
title: t,
|
|
108
|
+
user: n,
|
|
109
|
+
app: r,
|
|
110
|
+
headerChildren: s,
|
|
111
|
+
isCollapsed: c,
|
|
112
|
+
setIsCollapsed: l,
|
|
113
|
+
isOpened: u,
|
|
114
|
+
setIsOpened: d,
|
|
115
|
+
clientSideRouter: a,
|
|
116
|
+
clientSideHref: o,
|
|
117
|
+
variant: f,
|
|
118
|
+
id: p
|
|
119
|
+
},
|
|
120
|
+
children: i
|
|
121
|
+
}), E = () => {
|
|
122
|
+
let e = d.useContext(w);
|
|
123
|
+
if (!e) throw Error("useLayoutContext must be used within a LayoutProvider");
|
|
124
|
+
return e;
|
|
125
|
+
}, D = ({ title: t, href: n, icon: r, active: i, hasBadge: s, onClick: u, target: d }) => {
|
|
126
|
+
let { isCollapsed: h, setIsOpened: g, clientSideHref: y } = E(), b = y ? y(n) : n, [x, S] = p(!1);
|
|
127
|
+
f(() => {
|
|
128
|
+
if (typeof window < "u") {
|
|
129
|
+
let e = window.location.pathname === b || window.location.pathname.startsWith(b + "/");
|
|
130
|
+
S(i ?? e);
|
|
131
|
+
}
|
|
132
|
+
}, [i, b]);
|
|
133
|
+
let w = () => {
|
|
134
|
+
g?.(!1), u && u({
|
|
135
|
+
title: t,
|
|
136
|
+
href: b
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
return h ? /* @__PURE__ */ v(c, { children: [/* @__PURE__ */ _(m, {
|
|
140
|
+
href: n,
|
|
141
|
+
"aria-label": t,
|
|
142
|
+
className: e(C.listLink, C.listLinkCollapsed, x && C.active),
|
|
143
|
+
onPress: w,
|
|
144
|
+
target: d,
|
|
145
|
+
children: /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(r, {
|
|
146
|
+
size: 20,
|
|
147
|
+
"aria-label": t
|
|
148
|
+
}), s && /* @__PURE__ */ _(a, {})] })
|
|
149
|
+
}), /* @__PURE__ */ _(l, {
|
|
150
|
+
placement: "right",
|
|
151
|
+
children: t
|
|
152
|
+
})] }) : /* @__PURE__ */ v(m, {
|
|
153
|
+
href: n,
|
|
154
|
+
"aria-label": t,
|
|
155
|
+
className: e(C.listLink, x && C.active),
|
|
156
|
+
onPress: w,
|
|
157
|
+
target: d,
|
|
158
|
+
children: [/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(r, { size: 20 }), s && /* @__PURE__ */ _(a, {})] }), t]
|
|
159
|
+
});
|
|
160
|
+
}, O = {
|
|
161
|
+
en: {
|
|
162
|
+
closeMenu: "Close menu",
|
|
163
|
+
openMenu: "Open menu",
|
|
164
|
+
maximizeMenu: "Maximize menu",
|
|
165
|
+
minimizeMenu: "Minimize menu",
|
|
166
|
+
sidebarMenu: "Sidebar menu",
|
|
167
|
+
bottomMenu: "Bottom menu",
|
|
168
|
+
skipToContent: "Skip to main content"
|
|
169
|
+
},
|
|
170
|
+
sv: {
|
|
171
|
+
closeMenu: "Stäng meny",
|
|
172
|
+
openMenu: "Öppna meny",
|
|
173
|
+
maximizeMenu: "Maximera meny",
|
|
174
|
+
minimizeMenu: "Minimera meny",
|
|
175
|
+
sidebarMenu: "Sidomeny",
|
|
176
|
+
bottomMenu: "Bottenmeny",
|
|
177
|
+
skipToContent: "Hoppa till huvudinnehåll"
|
|
178
|
+
}
|
|
179
|
+
}, k = ({ onLinkClick: t }) => {
|
|
180
|
+
let { items: n, app: a, isOpened: o, isCollapsed: s, setIsCollapsed: c, setIsOpened: l, clientSideRouter: u, clientSideHref: f, id: p } = E(), m = r(O), g = ({ group: n }) => /* @__PURE__ */ _("ul", {
|
|
181
|
+
className: C.list,
|
|
182
|
+
children: n.items.map((n, r) => /* @__PURE__ */ _("li", {
|
|
183
|
+
className: e(C.listItem, s && C.listItemCollapsed),
|
|
184
|
+
children: n.target === "_blank" || !u ? /* @__PURE__ */ _(D, {
|
|
185
|
+
onClick: t,
|
|
186
|
+
...n
|
|
187
|
+
}) : /* @__PURE__ */ _(h, {
|
|
188
|
+
navigate: u,
|
|
189
|
+
useHref: f,
|
|
190
|
+
children: /* @__PURE__ */ _(D, {
|
|
191
|
+
onClick: t,
|
|
192
|
+
...n
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
}, "link_" + r))
|
|
196
|
+
});
|
|
197
|
+
return d.useEffect(() => {
|
|
198
|
+
let e = (e) => {
|
|
199
|
+
e.key === "Escape" && l !== void 0 && l(!1);
|
|
200
|
+
};
|
|
201
|
+
return window.addEventListener("keydown", e), () => {
|
|
202
|
+
window.removeEventListener("keydown", e);
|
|
203
|
+
};
|
|
204
|
+
}, [l]), /* @__PURE__ */ v("aside", {
|
|
205
|
+
id: p,
|
|
206
|
+
className: e(C.sidebar, s && C.sidebarCollapsed, o && C.sidebarOpened),
|
|
207
|
+
children: [/* @__PURE__ */ v("div", {
|
|
208
|
+
className: C.sidebarHeader,
|
|
209
|
+
children: [!s && /* @__PURE__ */ _("p", {
|
|
210
|
+
className: C.appName,
|
|
211
|
+
children: a.name
|
|
212
|
+
}), /* @__PURE__ */ _(i, {
|
|
213
|
+
variant: "icon",
|
|
214
|
+
"aria-label": s ? m.format("maximizeMenu") : m.format("minimizeMenu"),
|
|
215
|
+
onPress: () => c(!s),
|
|
216
|
+
className: C.collapseButton,
|
|
217
|
+
children: _(s ? x : b, { size: 20 })
|
|
218
|
+
})]
|
|
219
|
+
}), /* @__PURE__ */ _("nav", {
|
|
220
|
+
className: C.sidebarNav,
|
|
221
|
+
"aria-label": m.format("sidebarMenu"),
|
|
222
|
+
children: /* @__PURE__ */ _("ul", {
|
|
223
|
+
className: C.list,
|
|
224
|
+
children: n.map((e, t) => /* @__PURE__ */ v("li", { children: [e.title && !s && /* @__PURE__ */ _("p", {
|
|
225
|
+
className: C.listGroupTitle,
|
|
226
|
+
children: e.title
|
|
227
|
+
}), /* @__PURE__ */ _(g, { group: e })] }, "list_" + t))
|
|
228
|
+
})
|
|
229
|
+
})]
|
|
230
|
+
});
|
|
231
|
+
}, A = () => {
|
|
232
|
+
let { title: t, user: a, app: o, isOpened: s, setIsOpened: c, setIsCollapsed: l, headerChildren: d, variant: f, id: p } = E(), m = r(O);
|
|
233
|
+
return f === "external" ? /* @__PURE__ */ _("header", {
|
|
234
|
+
className: e(C.header, C.headerExternal),
|
|
235
|
+
children: /* @__PURE__ */ v("div", {
|
|
236
|
+
className: C.headerContentExternal,
|
|
237
|
+
children: [/* @__PURE__ */ v("div", {
|
|
238
|
+
className: C.logoExternalContainer,
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ _(u, {
|
|
241
|
+
size: "x-small",
|
|
242
|
+
padding: !1,
|
|
243
|
+
className: C.logoExternal
|
|
244
|
+
}),
|
|
245
|
+
/* @__PURE__ */ _(u, {
|
|
246
|
+
size: "small",
|
|
247
|
+
padding: !1,
|
|
248
|
+
className: C.logoExternalDesktop
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
251
|
+
className: C.userName,
|
|
252
|
+
children: a.name
|
|
253
|
+
}), /* @__PURE__ */ _("p", {
|
|
254
|
+
className: C.userTitle,
|
|
255
|
+
children: a.title
|
|
256
|
+
})] })
|
|
257
|
+
]
|
|
258
|
+
}), /* @__PURE__ */ _("div", {
|
|
259
|
+
className: C.headerItems,
|
|
260
|
+
children: d
|
|
261
|
+
})]
|
|
262
|
+
})
|
|
263
|
+
}) : /* @__PURE__ */ v("header", {
|
|
264
|
+
className: C.header,
|
|
265
|
+
style: { borderTop: `solid 4px ${o.color ? o.color : y.brandPrimary}` },
|
|
266
|
+
children: [/* @__PURE__ */ v("div", {
|
|
267
|
+
className: C.headerContent,
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ _("div", {
|
|
270
|
+
className: C.logo,
|
|
271
|
+
children: /* @__PURE__ */ _(u, {
|
|
272
|
+
size: "small",
|
|
273
|
+
padding: !1
|
|
274
|
+
})
|
|
275
|
+
}),
|
|
276
|
+
s !== void 0 && /* @__PURE__ */ _(i, {
|
|
277
|
+
variant: "icon",
|
|
278
|
+
className: C.toggleButton,
|
|
279
|
+
"aria-label": s ? m.format("closeMenu") : m.format("openMenu"),
|
|
280
|
+
"aria-controls": p,
|
|
281
|
+
onPressStart: () => {
|
|
282
|
+
l(!1), c?.(!0);
|
|
283
|
+
},
|
|
284
|
+
children: _(s ? n : S, {
|
|
285
|
+
size: 20,
|
|
286
|
+
"aria-hidden": "true"
|
|
287
|
+
})
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ v("div", { children: [
|
|
290
|
+
/* @__PURE__ */ _("p", {
|
|
291
|
+
className: C.userName,
|
|
292
|
+
children: a.name
|
|
293
|
+
}),
|
|
294
|
+
/* @__PURE__ */ _("p", {
|
|
295
|
+
className: C.userTitle,
|
|
296
|
+
children: a.title
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ _("p", {
|
|
299
|
+
className: C.title,
|
|
300
|
+
children: t
|
|
301
|
+
})
|
|
302
|
+
] })
|
|
303
|
+
]
|
|
304
|
+
}), /* @__PURE__ */ _("div", {
|
|
305
|
+
className: C.headerItems,
|
|
306
|
+
children: d
|
|
307
|
+
})]
|
|
308
|
+
});
|
|
309
|
+
}, j = ({ id: e = "main:first-of-type" }) => {
|
|
310
|
+
let t = () => {
|
|
311
|
+
let t = document.querySelector(e);
|
|
312
|
+
t && (t.tabIndex = -1, t.focus(), setTimeout(() => t.removeAttribute("tabindex"), 1e3));
|
|
313
|
+
}, n = r(O);
|
|
314
|
+
return /* @__PURE__ */ _(i, {
|
|
315
|
+
onPress: t,
|
|
316
|
+
className: C.skipToContent,
|
|
317
|
+
children: n.format("skipToContent")
|
|
318
|
+
});
|
|
319
|
+
}, M = () => {
|
|
320
|
+
let { isOpened: t, setIsOpened: n } = E();
|
|
321
|
+
return t ? /* @__PURE__ */ _("div", {
|
|
322
|
+
className: e(C.backdrop, C.backdropOpened),
|
|
323
|
+
onClick: () => {
|
|
324
|
+
n?.(!1);
|
|
325
|
+
},
|
|
326
|
+
"aria-hidden": !0
|
|
327
|
+
}) : null;
|
|
328
|
+
}, N = () => {
|
|
329
|
+
let { items: t, clientSideRouter: n, clientSideHref: i } = E(), a = r(O), o = t?.[0]?.items;
|
|
330
|
+
return /* @__PURE__ */ _("nav", {
|
|
331
|
+
className: C.navbar,
|
|
332
|
+
"aria-label": a.format("bottomMenu"),
|
|
333
|
+
children: o && /* @__PURE__ */ _("ul", {
|
|
334
|
+
className: e(C.navbarList),
|
|
335
|
+
children: n ? /* @__PURE__ */ _(h, {
|
|
336
|
+
navigate: n,
|
|
337
|
+
useHref: i,
|
|
338
|
+
children: /* @__PURE__ */ _(P, { items: o })
|
|
339
|
+
}) : /* @__PURE__ */ _(P, { items: o })
|
|
340
|
+
})
|
|
341
|
+
});
|
|
342
|
+
}, P = ({ items: t }) => /* @__PURE__ */ _(g, { children: t.map(({ href: t, active: n, icon: r, title: i, hasBadge: s }, c) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v(m, {
|
|
343
|
+
href: t,
|
|
344
|
+
className: e(C.navbarItem),
|
|
345
|
+
"data-active": n,
|
|
346
|
+
"aria-current": n && "page",
|
|
347
|
+
children: [/* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _(r, { size: 20 }), s && /* @__PURE__ */ _(a, {})] }), i]
|
|
348
|
+
}) }, c)) }), F = ({ items: t, title: n, user: r, app: i, children: a, headerChildren: o, clientSideRouter: c, clientSideHref: l, variant: u, className: f, onSidebarLinkClick: p }) => {
|
|
349
|
+
let [m, h] = d.useState(!1), [g, y] = d.useState(!1), b = d.useId();
|
|
350
|
+
return u === "external" ? /* @__PURE__ */ _(F.Provider, {
|
|
351
|
+
items: t,
|
|
352
|
+
title: n,
|
|
353
|
+
user: r,
|
|
354
|
+
app: i,
|
|
355
|
+
clientSideRouter: c,
|
|
356
|
+
clientSideHref: l,
|
|
357
|
+
headerChildren: o,
|
|
358
|
+
isCollapsed: m,
|
|
359
|
+
setIsCollapsed: h,
|
|
360
|
+
variant: u,
|
|
361
|
+
id: b,
|
|
362
|
+
children: /* @__PURE__ */ v("div", {
|
|
363
|
+
className: e(C.baseLayout, f),
|
|
364
|
+
children: [
|
|
365
|
+
/* @__PURE__ */ _(j, {}),
|
|
366
|
+
/* @__PURE__ */ _(F.Header, {}),
|
|
367
|
+
/* @__PURE__ */ v("div", {
|
|
368
|
+
className: C.mainContent,
|
|
369
|
+
children: [
|
|
370
|
+
/* @__PURE__ */ _(F.Sidebar, { onLinkClick: p }),
|
|
371
|
+
/* @__PURE__ */ _(s, { children: /* @__PURE__ */ _("main", {
|
|
372
|
+
className: C.main,
|
|
373
|
+
children: /* @__PURE__ */ _("div", {
|
|
374
|
+
className: C.app,
|
|
375
|
+
children: a
|
|
376
|
+
})
|
|
377
|
+
}) }),
|
|
378
|
+
/* @__PURE__ */ _(F.Backdrop, {})
|
|
379
|
+
]
|
|
380
|
+
}),
|
|
381
|
+
/* @__PURE__ */ _("div", {
|
|
382
|
+
className: C.navbarWrapper,
|
|
383
|
+
children: /* @__PURE__ */ _(F.Navbar, {})
|
|
384
|
+
})
|
|
385
|
+
]
|
|
386
|
+
})
|
|
387
|
+
}) : /* @__PURE__ */ _(F.Provider, {
|
|
388
|
+
items: t,
|
|
389
|
+
title: n,
|
|
390
|
+
user: r,
|
|
391
|
+
app: i,
|
|
392
|
+
clientSideRouter: c,
|
|
393
|
+
clientSideHref: l,
|
|
394
|
+
headerChildren: o,
|
|
395
|
+
isCollapsed: m,
|
|
396
|
+
setIsCollapsed: h,
|
|
397
|
+
isOpened: g,
|
|
398
|
+
setIsOpened: y,
|
|
399
|
+
variant: u,
|
|
400
|
+
id: b,
|
|
401
|
+
children: /* @__PURE__ */ v("div", {
|
|
402
|
+
className: e(C.baseLayout, f),
|
|
403
|
+
children: [
|
|
404
|
+
/* @__PURE__ */ _(j, {}),
|
|
405
|
+
/* @__PURE__ */ _(F.Header, {}),
|
|
406
|
+
/* @__PURE__ */ v("div", {
|
|
407
|
+
className: C.mainContent,
|
|
408
|
+
children: [
|
|
409
|
+
/* @__PURE__ */ _(F.Sidebar, { onLinkClick: p }),
|
|
410
|
+
/* @__PURE__ */ _(s, { children: /* @__PURE__ */ _("main", {
|
|
411
|
+
className: C.main,
|
|
412
|
+
children: /* @__PURE__ */ _("div", {
|
|
413
|
+
className: C.app,
|
|
414
|
+
children: a
|
|
415
|
+
})
|
|
416
|
+
}) }),
|
|
417
|
+
/* @__PURE__ */ _(F.Backdrop, {})
|
|
418
|
+
]
|
|
419
|
+
})
|
|
420
|
+
]
|
|
421
|
+
})
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
F.Provider = T, F.Header = A, F.Sidebar = k, F.SidebarLink = D, F.Navbar = N, F.Backdrop = M;
|
|
425
|
+
//#endregion
|
|
426
|
+
export { D as a, k as i, N as n, A as r, F as t };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-BtlV5Vo3.js";
|
|
3
|
+
import { t } from "./createLucideIcon-DhIhuN5D.js";
|
|
4
|
+
import { t as n } from "./square-arrow-out-up-right-Bobm4VNc.js";
|
|
5
|
+
import { t as r } from "./arrow-right-7yeXXFNV.js";
|
|
6
|
+
import { Link as i, RouterProvider as a } from "react-aria-components";
|
|
7
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import '../assets/link.css';var l = t("arrow-down-to-line", [
|
|
9
|
+
["path", {
|
|
10
|
+
d: "M12 17V3",
|
|
11
|
+
key: "1cwfxf"
|
|
12
|
+
}],
|
|
13
|
+
["path", {
|
|
14
|
+
d: "m6 11 6 6 6-6",
|
|
15
|
+
key: "12ii2o"
|
|
16
|
+
}],
|
|
17
|
+
["path", {
|
|
18
|
+
d: "M19 21H5",
|
|
19
|
+
key: "150jfl"
|
|
20
|
+
}]
|
|
21
|
+
]), u = {
|
|
22
|
+
link: "_link_duep2_1",
|
|
23
|
+
icon: "_icon_duep2_53",
|
|
24
|
+
standalone: "_standalone_duep2_57",
|
|
25
|
+
stretched: "_stretched_duep2_76"
|
|
26
|
+
}, d = ({ children: t, standalone: a, target: d, stretched: p, download: m, icon: h, className: g, as: _, ...v }) => {
|
|
27
|
+
let y = _ || i, b = h || (m ? l : d === "_blank" ? n : a ? r : null);
|
|
28
|
+
return /* @__PURE__ */ s(y, {
|
|
29
|
+
className: e(u.link, a && u.standalone, p && u.stretched, g),
|
|
30
|
+
...v,
|
|
31
|
+
target: d,
|
|
32
|
+
children: /* @__PURE__ */ c(o, { children: [t, b ? /* @__PURE__ */ s(f, {
|
|
33
|
+
className: u.icon,
|
|
34
|
+
icon: b,
|
|
35
|
+
size: 16
|
|
36
|
+
}) : null] })
|
|
37
|
+
});
|
|
38
|
+
}, f = ({ icon: e, ...t }) => /* @__PURE__ */ s(e, { ...t });
|
|
39
|
+
//#endregion
|
|
40
|
+
export { a as n, d as t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { t as e } from "./clsx-BtlV5Vo3.js";
|
|
3
|
+
import { t } from "./createLucideIcon-DhIhuN5D.js";
|
|
4
|
+
import { t as n } from "./square-arrow-out-up-right-Bobm4VNc.js";
|
|
5
|
+
import { t as r } from "./arrow-right-7yeXXFNV.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { Link as i, RouterProvider as a } from "react-aria-components";
|
|
8
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
|
+
import '../assets/link-button.css';var c = t("arrow-left", [["path", {
|
|
10
|
+
d: "m12 19-7-7 7-7",
|
|
11
|
+
key: "1l729n"
|
|
12
|
+
}], ["path", {
|
|
13
|
+
d: "M19 12H5",
|
|
14
|
+
key: "x3x0zl"
|
|
15
|
+
}]]), l = {
|
|
16
|
+
linkButton: "_linkButton_1k5w6_1",
|
|
17
|
+
secondary: "_secondary_1k5w6_58",
|
|
18
|
+
icon: "_icon_1k5w6_63",
|
|
19
|
+
tertiary: "_tertiary_1k5w6_102",
|
|
20
|
+
danger: "_danger_1k5w6_130",
|
|
21
|
+
iconBtn: "_iconBtn_1k5w6_149",
|
|
22
|
+
medium: "_medium_1k5w6_173",
|
|
23
|
+
iconLeft: "_iconLeft_1k5w6_178",
|
|
24
|
+
fullwidth: "_fullwidth_1k5w6_182",
|
|
25
|
+
button: "_button_1k5w6_192"
|
|
26
|
+
}, u = ({ children: t, variant: a, fullwidth: u, icon: f, iconPlacement: p, className: m, as: h, size: g = "large", ..._ }) => {
|
|
27
|
+
let v = h || i, y = f || (_.target === "_blank" ? n : p === "left" ? c : r);
|
|
28
|
+
return /* @__PURE__ */ s(v, {
|
|
29
|
+
className: e(l.linkButton, a === "primary" && l.primary, a === "secondary" && l.secondary, a === "tertiary" && l.tertiary, a === "danger" && l.danger, a === "icon" && l.iconBtn, g === "medium" && l.medium, u && l.fullwidth, p === "left" && l.iconLeft, m),
|
|
30
|
+
..._,
|
|
31
|
+
children: [t, /* @__PURE__ */ o(d, {
|
|
32
|
+
className: l.icon,
|
|
33
|
+
icon: y,
|
|
34
|
+
size: 20
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
}, d = ({ icon: e, ...t }) => /* @__PURE__ */ o(e, { ...t });
|
|
38
|
+
//#endregion
|
|
39
|
+
export { a as n, u as t };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { t as e } from "./clsx-BtlV5Vo3.js";
|
|
2
|
+
import { t } from "./spinner-C3WiZYld.js";
|
|
3
|
+
import { t as n } from "./useLocalizedStringFormatter-bRLuRzVD.js";
|
|
4
|
+
import { t as r } from "./text-mAeDlv5N.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { Header as i, ListBox as a, ListBoxItem as o, ListBoxLoadMoreItem as s, ListBoxSection as c, ListLayout as l, Popover as u, Virtualizer as d, composeRenderProps as f } from "react-aria-components";
|
|
7
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
8
|
+
import '../assets/list-box.css';//#region packages/components/src/list-box/SectionedListLayout.ts
|
|
9
|
+
var g = class extends l {
|
|
10
|
+
getContentSize() {
|
|
11
|
+
let e = this?.virtualizer?.collection.getKeys();
|
|
12
|
+
return Array.from(e || []).forEach((e) => {
|
|
13
|
+
this.getLayoutInfo(e);
|
|
14
|
+
}), this.contentSize;
|
|
15
|
+
}
|
|
16
|
+
}, _ = {
|
|
17
|
+
listBox: "_listBox_d58ov_4",
|
|
18
|
+
listBoxPopover: "_listBoxPopover_d58ov_16 _dropdownAnimation_1ljkv_4",
|
|
19
|
+
listBoxSectionHeading: "_listBoxSectionHeading_d58ov_31",
|
|
20
|
+
listBoxButton: "_listBoxButton_d58ov_43",
|
|
21
|
+
listBoxItem: "_listBoxItem_d58ov_55",
|
|
22
|
+
textContent: "_textContent_d58ov_68",
|
|
23
|
+
listBoxLoadMoreItem: "_listBoxLoadMoreItem_d58ov_176",
|
|
24
|
+
item: "_item_d58ov_187",
|
|
25
|
+
option: "_option_d58ov_188",
|
|
26
|
+
inputCheckbox: "_inputCheckbox_d58ov_188"
|
|
27
|
+
}, v = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m(d, {
|
|
28
|
+
layout: g,
|
|
29
|
+
layoutOptions: { headingHeight: 38 },
|
|
30
|
+
children: /* @__PURE__ */ m(a, {
|
|
31
|
+
className: e(_.listBox, t),
|
|
32
|
+
...r,
|
|
33
|
+
children: n
|
|
34
|
+
})
|
|
35
|
+
}), y = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
className: e(_.listBoxItem, _.listBoxButton, t),
|
|
38
|
+
...r,
|
|
39
|
+
children: n
|
|
40
|
+
}), b = ({ children: t, className: n, textValue: r, ...i }) => /* @__PURE__ */ m(o, {
|
|
41
|
+
className: e(_.listBoxItem, n),
|
|
42
|
+
textValue: r || (typeof t == "string" ? t : void 0),
|
|
43
|
+
...i,
|
|
44
|
+
children: f(t, (e) => /* @__PURE__ */ m("div", {
|
|
45
|
+
className: _.textContent,
|
|
46
|
+
children: e
|
|
47
|
+
}))
|
|
48
|
+
}), x = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m(u, {
|
|
49
|
+
className: e(t, _.listBoxPopover),
|
|
50
|
+
offset: 0,
|
|
51
|
+
...r,
|
|
52
|
+
children: n
|
|
53
|
+
}), S = (e) => /* @__PURE__ */ m(c, { ...e }), C = {
|
|
54
|
+
en: { "loading...": "Loading..." },
|
|
55
|
+
sv: { "loading...": "Laddar..." }
|
|
56
|
+
}, w = ({ className: r, children: i, isLoading: a, ...o }) => {
|
|
57
|
+
let c = n(C);
|
|
58
|
+
return /* @__PURE__ */ m(s, {
|
|
59
|
+
className: e(_.listBoxLoadMoreItem, r),
|
|
60
|
+
isLoading: a,
|
|
61
|
+
...o,
|
|
62
|
+
children: i || /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(t, { small: !0 }), /* @__PURE__ */ m("span", {
|
|
63
|
+
"aria-hidden": !0,
|
|
64
|
+
children: c.format("loading...")
|
|
65
|
+
})] })
|
|
66
|
+
});
|
|
67
|
+
}, T = ({ className: t, ...n }) => /* @__PURE__ */ m(i, {
|
|
68
|
+
className: e(_.listBoxSectionHeading, t),
|
|
69
|
+
...n
|
|
70
|
+
}), E = { listBoxEmptyState: "_listBoxEmptyState_1wxhy_1" }, D = ({ className: t, ...n }) => /* @__PURE__ */ m(r, {
|
|
71
|
+
className: e(t, E.listBoxEmptyState),
|
|
72
|
+
...n
|
|
73
|
+
});
|
|
74
|
+
//#endregion
|
|
75
|
+
export { x as a, v as c, S as i, T as n, b as o, w as r, y as s, D as t };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { t as e } from "./clsx-BtlV5Vo3.js";
|
|
2
|
+
import { t } from "./useLocalizedStringFormatter-bRLuRzVD.js";
|
|
3
|
+
import { createContext as n, useContext as r } from "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import '../assets/logo.css';var o = {
|
|
6
|
+
container: "_container_191fy_1",
|
|
7
|
+
noPadding: "_noPadding_191fy_6",
|
|
8
|
+
logo: "_logo_191fy_10",
|
|
9
|
+
primary: "_primary_191fy_15",
|
|
10
|
+
dark: "_dark_191fy_23",
|
|
11
|
+
xSmall: "_xSmall_191fy_31",
|
|
12
|
+
small: "_small_191fy_35",
|
|
13
|
+
large: "_large_191fy_39"
|
|
14
|
+
}, s = {
|
|
15
|
+
en: { logotype: "Logotype of the Swedish Migration Agency" },
|
|
16
|
+
sv: { logotype: "Migrationsverkets logotyp" }
|
|
17
|
+
}, c = n({ size: void 0 }), l = ({ primary: t = !0, size: n, padding: a = !0, className: s, ...l }) => {
|
|
18
|
+
let d = r(c);
|
|
19
|
+
return /* @__PURE__ */ i("div", {
|
|
20
|
+
className: e(o.container, a === !1 && o.noPadding, s),
|
|
21
|
+
...l,
|
|
22
|
+
children: /* @__PURE__ */ i(u, {
|
|
23
|
+
size: n ?? d.size ?? "medium",
|
|
24
|
+
primary: t
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
}, u = ({ size: n, primary: r }) => {
|
|
28
|
+
let c = e(o.logo, r ? o.primary : o.dark, n === "x-small" && o.xSmall, n === "medium" && o.medium, n === "large" && o.large, n === "small" && o.small), l = t(s);
|
|
29
|
+
return n === "x-small" ? /* @__PURE__ */ i("svg", {
|
|
30
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
+
viewBox: "0 0 100 92",
|
|
32
|
+
className: c,
|
|
33
|
+
role: "img",
|
|
34
|
+
"aria-hidden": "false",
|
|
35
|
+
focusable: "false",
|
|
36
|
+
"aria-label": l.format("logotype"),
|
|
37
|
+
children: /* @__PURE__ */ i("path", { d: "M99.99,91.69c-1.84-1.11-4.05-4.55-4.05-9.46V9.15c0-4.79,1.96-7.25,3.81-8.85h-14.75l-33.91,65.47L12.41.3H0c1.6,1.59,3.93,3.07,3.93,8.23v75.55c0,3.56-2.21,6.51-3.81,7.61h16.34c-1.72-1.22-3.93-4.18-3.93-7.98V25.97l36.24,61.42,33.04-63.26v58.96c0,5.53-2.21,7.61-3.81,8.6h21.99Z" })
|
|
38
|
+
}) : /* @__PURE__ */ a("svg", {
|
|
39
|
+
role: "img",
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
viewBox: "0 0 112 40",
|
|
42
|
+
className: c,
|
|
43
|
+
"aria-hidden": "false",
|
|
44
|
+
focusable: "false",
|
|
45
|
+
"aria-label": l.format("logotype"),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ i("path", { d: "M97.78,21.61c-7.48-9.73-20.06-16.03-34.32-16.03-13.07,0-24.86,5.27-32.46,13.65,6.56-5.83,15.64-9.44,25.66-9.44,11.37,0,21.52,4.56,28.18,11.83h12.94Z" }),
|
|
48
|
+
/* @__PURE__ */ i("path", { d: "M90.45,12.58C70.67-1.51,41.26,2.77,27.49,21.61h-12.23C30.56-2.89,68.29-7.47,90.45,12.58h0Z" }),
|
|
49
|
+
/* @__PURE__ */ i("path", { d: "M11.89,37.13c-.22-.13-.48-.53-.48-1.11v-8.58c0-.56.23-.85.45-1.04h-1.73l-3.98,7.69-4.54-7.69H.15c.19.19.46.36.46.97v8.87c0,.42-.26.76-.45.89h1.92c-.2-.14-.46-.49-.46-.94v-6.78l4.25,7.21,3.88-7.43v6.92c0,.65-.26.89-.45,1.01h2.58Z" }),
|
|
50
|
+
/* @__PURE__ */ i("path", {
|
|
51
|
+
d: "M15.81,26.86c0-.45-.36-.81-.81-.81s-.81.36-.81.81.36.81.81.81.81-.36.81-.81h0ZM16.22,37.13c-.3-.23-.45-.5-.45-1.07v-6.4h-1.98c.37.19.49.58.49,1.17v5.23c0,.48-.09.79-.46,1.07h2.39Z",
|
|
52
|
+
fillRule: "evenodd"
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ i("path", {
|
|
55
|
+
d: "M24.52,30.97c-.04-.33-.17-.68-.37-.95h-1.36c-.29-.26-.87-.58-1.96-.58-1.53,0-2.8.92-2.8,2.58,0,1.02.52,1.86,1.31,2.26-.43.37-1.38.98-1.38,1.61,0,.71.79.99,1.38,1.1-.88.26-1.67.82-1.67,1.59,0,1.14,1.73,1.41,2.64,1.41,1.54,0,3.91-.78,3.91-2.64,0-1.21-1.23-1.49-2.22-1.5-2.42-.06-2.51-.2-2.51-.56,0-.2.42-.68.55-.81.23.03.48.06.71.06,1.76,0,2.93-.94,2.93-2.7,0-.48-.14-.91-.29-1.11.12-.04.25-.04.37-.04.27,0,.55.12.76.27h0ZM22.27,32.21c0,.79-.37,1.61-1.36,1.61-1.07,0-1.47-1.21-1.47-2.09,0-.95.5-1.57,1.31-1.57,1.2,0,1.51,1.25,1.51,2.05h0ZM22.89,37.92c0,.76-.82,1.31-1.93,1.31-.59,0-1.7-.3-1.69-1.15,0-.45.26-.74.59-.99l1.96.04c.5.01,1.07.1,1.07.79h0Z",
|
|
56
|
+
fillRule: "evenodd"
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ i("path", { d: "M30.11,31.22l-.23-1.63c-.2-.1-.43-.14-.65-.14-.85,0-1.46.68-1.79,1.37v-1.15h-1.96c.45.27.48.76.48,1.14v5.19c0,.58-.1.89-.45,1.14h2.35c-.36-.29-.42-.63-.42-1.12v-4.27c.22-.58.78-1.04,1.43-1.04.46,0,.97.26,1.24.52h0Z" }),
|
|
59
|
+
/* @__PURE__ */ i("path", {
|
|
60
|
+
d: "M36.87,37.13c-.37-.33-.43-.59-.43-1.25v-3.89c0-2.21-1.43-2.55-2.8-2.55-.61,0-1.67.22-2.03.42-.2.4-.3,1.24-.4,1.67.46-.56,1.27-1.37,2.39-1.37,1.18,0,1.36.82,1.36,1.7v.39l-2.21.76c-1.04.36-1.87,1.08-1.87,2.26,0,1.31.88,2.08,2.15,2.08.87,0,1.46-.43,1.93-.94v.72h1.92ZM34.95,35.62c-.26.32-.74.85-1.37.85-.75,0-1.18-.79-1.18-1.54,0-.71.35-1.15.89-1.37l1.66-.63v2.7h0Z",
|
|
61
|
+
fillRule: "evenodd"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ i("path", { d: "M42.58,36.15c-.29.27-.71.46-1.11.46-.87,0-1.07-.98-1.07-1.66v-4.51h.85c.43,0,.94.13,1.33.35l-.17-1.12h-2v-1.76c-.68.95-1.54,1.96-2.58,2.54h1.1v4.43c0,1.43.32,2.47,1.95,2.47.48,0,.98-.1,1.38-.36.14-.25.25-.55.33-.82h0Z" }),
|
|
64
|
+
/* @__PURE__ */ i("path", {
|
|
65
|
+
d: "M45.63,26.86c0-.45-.36-.81-.81-.81s-.81.36-.81.81.36.81.81.81.81-.36.81-.81h0ZM46.04,37.13c-.3-.23-.45-.5-.45-1.07v-6.4h-1.98c.37.19.49.58.49,1.17v5.23c0,.48-.09.79-.46,1.07h2.39Z",
|
|
66
|
+
fillRule: "evenodd"
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ i("path", {
|
|
69
|
+
d: "M54.96,33.37c0-2.06-1.3-3.95-3.5-3.95s-3.84,1.76-3.84,4.01c0,2.06,1.28,3.95,3.49,3.95s3.85-1.76,3.85-4.01h0ZM53.43,34.04c0,1.27-.52,2.57-1.86,2.57-1.79,0-2.42-2.44-2.42-3.86,0-1.21.48-2.57,1.87-2.57,1.79,0,2.41,2.44,2.41,3.86h0Z",
|
|
70
|
+
fillRule: "evenodd"
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ i("path", { d: "M63.37,37.13c-.27-.22-.45-.42-.45-1.11v-3.94c0-1.63-.39-2.64-2.18-2.64-1.01,0-1.79.56-2.38,1.12v-.91h-1.98c.3.17.49.46.49,1.05v5.33c0,.59-.14.88-.48,1.08h2.39c-.23-.23-.43-.37-.43-1.17v-4.4c.32-.45,1.07-1.24,1.85-1.24,1.01,0,1.23,1.01,1.23,1.8v3.95c0,.74-.26.87-.46,1.05h2.39Z" }),
|
|
73
|
+
/* @__PURE__ */ i("path", {
|
|
74
|
+
d: "M69.79,35.2c0-2.21-3.42-2.71-3.42-4.07,0-.75.71-.98,1.34-.98s1.33.29,1.74.81l-.07-1.18c-.46-.17-1.11-.35-1.69-.35-1.44,0-2.68.63-2.68,1.89,0,2.36,3.46,2.68,3.46,4.25,0,.79-.62,1.05-1.31,1.05-1.01,0-1.86-.46-2.52-1.21v.1c0,.4-.03.99.3,1.27.53.43,1.53.56,2.18.56,1.36,0,2.67-.62,2.67-2.15h0Z",
|
|
75
|
+
fillRule: "evenodd"
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ i("path", { d: "M77.98,29.66h-1.43c.13.1.11.56-.19,1.33l-1.86,4.72-1.87-4.7c-.26-.65-.32-1.15-.16-1.34h-2.06c.19.1.49.85.82,1.67l2.31,5.8h1.31l2.35-5.97c.32-.81.56-1.36.78-1.5h0Z" }),
|
|
78
|
+
/* @__PURE__ */ i("path", {
|
|
79
|
+
d: "M84.91,33.54v-.23c0-1.92-.62-3.88-2.88-3.88s-3.56,2.02-3.56,4.11,1.41,3.81,3.58,3.81c.78,0,1.62-.17,2.13-.45.32-.35.49-.79.59-1.27-.69.5-1.41.84-2.31.84-1.49,0-2.35-1.57-2.38-2.88l4.83-.04h0ZM83.34,32.88c-1.1.09-2.16.1-3.27.1.01-.78.29-2.83,1.7-2.83,1.33,0,1.57,1.72,1.57,2.73h0Z",
|
|
80
|
+
fillRule: "evenodd"
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ i("path", { d: "M90.95,31.22l-.23-1.63c-.2-.1-.43-.14-.65-.14-.85,0-1.46.68-1.79,1.37v-1.15h-1.96c.45.27.48.76.48,1.14v5.19c0,.58-.1.89-.45,1.14h2.35c-.36-.29-.42-.63-.42-1.12v-4.27c.22-.58.78-1.04,1.43-1.04.46,0,.97.26,1.24.52h0Z" }),
|
|
83
|
+
/* @__PURE__ */ i("path", { d: "M99.79,37.16c-2.26-.37-2.49-4.04-4.7-4.04l2.62-2.8c.22-.23.5-.48.75-.66h-1.77c.14.14.13.39-.13.66l-2.65,2.83v-7.07h-1.98c.33.2.49.56.49,1.01v9.01c0,.58-.22.81-.46,1.02h2.35c-.26-.25-.4-.49-.4-1.02v-2.57c.27,0,.62.13.82.26,1.28.82,1.95,3.11,2.67,3.45.14.07.94.1,1.14.1.45,0,.84-.03,1.25-.19h0Z" }),
|
|
84
|
+
/* @__PURE__ */ i("path", {
|
|
85
|
+
d: "M106.3,33.54v-.23c0-1.92-.62-3.88-2.88-3.88s-3.56,2.02-3.56,4.11,1.41,3.81,3.58,3.81c.78,0,1.62-.17,2.13-.45.32-.35.49-.79.59-1.27-.69.5-1.41.84-2.31.84-1.49,0-2.35-1.57-2.38-2.88l4.83-.04h0ZM104.73,32.88c-1.1.09-2.16.1-3.27.1.01-.78.29-2.83,1.7-2.83,1.33,0,1.57,1.72,1.57,2.73h0Z",
|
|
86
|
+
fillRule: "evenodd"
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ i("path", { d: "M111.85,36.15c-.29.27-.71.46-1.11.46-.86,0-1.07-.98-1.07-1.66v-4.51h.85c.43,0,.94.13,1.33.35l-.17-1.12h-2v-1.76c-.68.95-1.54,1.96-2.58,2.54h1.1v4.43c0,1.43.32,2.47,1.95,2.47.48,0,.98-.1,1.38-.36.14-.25.25-.55.33-.82h0Z" })
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { c as n, l as t };
|