@midas-ds/components 11.0.0 → 11.2.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 (145) hide show
  1. package/{AccordionItem-BtDoammf.js → AccordionItem-BPOQqTkQ.js} +14 -13
  2. package/AccordionItem-CS-QKqrU.cjs +1 -0
  3. package/CHANGELOG.md +36 -0
  4. package/{CheckboxGroup-DhQX10rP.cjs → CheckboxGroup-CT_eqERw.cjs} +1 -1
  5. package/{CheckboxGroup-CC9QGMuE.js → CheckboxGroup-DvrN1oyw.js} +1 -1
  6. package/{ColorSchemeSwitch-Cnyb9EKC.js → ColorSchemeSwitch-PiEHptw1.js} +1 -1
  7. package/{ComboBox-CiCB2e4W.cjs → ComboBox-D_jh7TKo.cjs} +1 -1
  8. package/{ComboBox-Dnk8JMQ6.js → ComboBox-DfJ_aJrf.js} +10 -10
  9. package/{DateField-DleDM0Sy.cjs → DateField-BURrxhil.cjs} +1 -1
  10. package/{DateField-BAS2v9aI.js → DateField-DKCbEonm.js} +2 -2
  11. package/{DateInputDivider-B3oE1_tB.js → DateInputDivider-BmvqW1Hk.js} +2 -2
  12. package/{DateRangePicker-Blej-jD0.js → DateRangePicker-B5vx9onl.js} +183 -196
  13. package/DateRangePicker-DkIAEIIj.cjs +6 -0
  14. package/Dialog-CxHiZorC.cjs +1 -0
  15. package/{Dialog-DKHo0W9B.js → Dialog-D5c_dUnB.js} +3 -3
  16. package/Dialog-DuGcBeNN.js +212 -0
  17. package/{Dropdown-D6WCi_Ll.js → Dropdown-Cpc2EszJ.js} +1 -1
  18. package/{FocusScope-BCsrRPqD.js → FocusScope-DMsfA3bj.js} +1 -1
  19. package/{Label-VO6CAFux.cjs → Label-ChjDdBlv.cjs} +1 -1
  20. package/{Label-JLgFEbP9.js → Label-endv1fkJ.js} +2 -2
  21. package/Layout-D0E1fOgZ.cjs +16 -0
  22. package/Layout-DtyhUz-G.js +498 -0
  23. package/{ListBox-CsxDGpCA.js → ListBox-Djy7244v.js} +5 -5
  24. package/{ListBoxButton-BsuHFd_O.cjs → ListBoxButton-CIqNRR3y.cjs} +1 -1
  25. package/{ListBoxButton-DawRfuny.js → ListBoxButton-sqirI6I4.js} +1 -1
  26. package/{ListBoxSection-C-Rz358T.cjs → ListBoxSection-BYJccE4T.cjs} +1 -1
  27. package/{ListBoxSection-Cc2cx0_S.js → ListBoxSection-Cicbu8pS.js} +375 -375
  28. package/{ListKeyboardDelegate-C-sPNj0f.js → ListKeyboardDelegate-CHki611g.js} +1 -1
  29. package/Popover-BDvKByTT.cjs +1 -0
  30. package/{Popover-DypW9ift.js → Popover-Tniqbaes.js} +13 -13
  31. package/{ProgressBar-CJFNiudl.cjs → ProgressBar-ClysdvqU.cjs} +1 -1
  32. package/{ProgressBar-CFgcqHTR.js → ProgressBar-DTn23Zkr.js} +1 -1
  33. package/{Radio-DUBSD0kQ.js → Radio-CCN3o3s-.js} +2 -2
  34. package/{Radio-CMH6pTWD.cjs → Radio-Cz0vLIBw.cjs} +1 -1
  35. package/{Select-DKME5lZp.js → Select-MwvnbChP.js} +8 -8
  36. package/{Select-C5i-rIDh.cjs → Select-lhIwwJL7.cjs} +1 -1
  37. package/{SelectionManager-BubxiIKu.js → SelectionManager-BKrZ_mMO.js} +1 -1
  38. package/{Separator-CEZ5y7tZ.js → Separator-DvvVAypT.js} +2 -2
  39. package/{TabList-BkSWzbDG.cjs → TabList-CWMlbijV.cjs} +1 -1
  40. package/{TabList-QApx8qRC.js → TabList-VpTv_Xff.js} +4 -4
  41. package/{Table-B5Aine4F.js → Table-DGTwyh7U.js} +4 -4
  42. package/{Tag-Byva_Xuy.js → Tag-rI-NhuT0.js} +7 -7
  43. package/{TextArea-BhmdgD1w.js → TextArea-CrEALC58.js} +1 -1
  44. package/{TextArea-CY_tzBAJ.cjs → TextArea-DJKHFKuI.cjs} +1 -1
  45. package/{ToggleButtonGroup-HjvaTYD4.js → ToggleButtonGroup-98z8Dw8-.js} +1 -1
  46. package/accordion/Accordion.d.ts +1 -2
  47. package/accordion/index.cjs +1 -1
  48. package/accordion/index.d.ts +2 -1
  49. package/accordion/index.js +3 -2
  50. package/assets/Layout.css +1 -1
  51. package/assets/ListBoxSection.css +1 -1
  52. package/assets/Popover.css +1 -1
  53. package/breadcrumbs/index.d.ts +1 -0
  54. package/button/Button.d.ts +1 -2
  55. package/button/index.d.ts +1 -1
  56. package/checkbox/index.cjs +1 -1
  57. package/checkbox/index.js +1 -1
  58. package/color-scheme-switch/index.d.ts +1 -0
  59. package/color-scheme-switch/index.js +1 -1
  60. package/combobox/ComboBox.d.ts +1 -1
  61. package/combobox/index.cjs +1 -1
  62. package/combobox/index.js +1 -1
  63. package/date-field/index.cjs +1 -1
  64. package/date-field/index.d.ts +1 -0
  65. package/date-field/index.js +2 -2
  66. package/date-picker/DatePickerPopover.d.ts +1 -1
  67. package/date-picker/index.cjs +1 -1
  68. package/date-picker/index.js +1 -1
  69. package/dropdown/Dropdown.d.ts +1 -2
  70. package/dropdown/index.d.ts +1 -1
  71. package/dropdown/index.js +1 -1
  72. package/field-error/index.d.ts +1 -0
  73. package/grid/index.d.ts +2 -2
  74. package/heading/index.d.ts +1 -0
  75. package/index.cjs +1 -1
  76. package/index.d.ts +1 -1
  77. package/index.js +110 -109
  78. package/info-banner/index.d.ts +1 -1
  79. package/label/index.cjs +1 -1
  80. package/label/index.js +1 -1
  81. package/layout/index.cjs +1 -1
  82. package/layout/index.d.ts +1 -0
  83. package/layout/index.js +1 -1
  84. package/link/Link.d.ts +2 -2
  85. package/link/index.d.ts +1 -1
  86. package/link-button/LinkButton.d.ts +2 -2
  87. package/link-button/index.d.ts +1 -0
  88. package/list-box/index.cjs +1 -1
  89. package/list-box/index.js +2 -2
  90. package/modal/Dialog.d.ts +1 -1
  91. package/modal/index.cjs +1 -1
  92. package/modal/index.d.ts +1 -1
  93. package/modal/index.js +2 -2
  94. package/package.json +1 -1
  95. package/popover/Popover.d.ts +1 -2
  96. package/popover/index.cjs +1 -1
  97. package/popover/index.d.ts +1 -0
  98. package/popover/index.js +1 -1
  99. package/progress-bar/ProgressBar.d.ts +1 -2
  100. package/progress-bar/index.cjs +1 -1
  101. package/progress-bar/index.d.ts +1 -0
  102. package/progress-bar/index.js +1 -1
  103. package/radio/Radio.d.ts +1 -2
  104. package/radio/index.cjs +1 -1
  105. package/radio/index.d.ts +1 -1
  106. package/radio/index.js +1 -1
  107. package/search-field/index.d.ts +1 -1
  108. package/select/Select.d.ts +1 -1
  109. package/select/index.cjs +1 -1
  110. package/select/index.js +1 -1
  111. package/skeleton/index.d.ts +1 -1
  112. package/spinner/index.d.ts +1 -1
  113. package/table/index.d.ts +1 -0
  114. package/table/index.js +1 -1
  115. package/tabs/index.cjs +1 -1
  116. package/tabs/index.d.ts +1 -0
  117. package/tabs/index.js +1 -1
  118. package/tag/index.d.ts +1 -1
  119. package/tag/index.js +1 -1
  120. package/text/index.d.ts +1 -0
  121. package/textfield/index.cjs +1 -1
  122. package/textfield/index.d.ts +3 -0
  123. package/textfield/index.js +1 -1
  124. package/theme/index.cjs +1 -1
  125. package/theme/index.d.ts +1 -0
  126. package/theme/index.js +2 -2
  127. package/theme/tokens.d.ts +1 -0
  128. package/toast/Toast.d.ts +2 -3
  129. package/toast/index.d.ts +1 -0
  130. package/toggle-button/index.js +1 -1
  131. package/{tokens-BF-dPard.cjs → tokens-5PzK5zK7.cjs} +1 -1
  132. package/{tokens-r1r3wC04.js → tokens-CqvelUoA.js} +13 -12
  133. package/tooltip/Tooltip.d.ts +1 -2
  134. package/tooltip/index.d.ts +1 -0
  135. package/{useFilter-DginflOU.js → useFilter-DsOxD9JB.js} +1 -1
  136. package/{useHasTabbableChild-DP62kzkG.js → useHasTabbableChild-BgEe5J35.js} +1 -1
  137. package/{useListState-DNB7JWoj.js → useListState-B3c3xcNW.js} +1 -1
  138. package/{useSingleSelectListState-B0OMoHd_.js → useSingleSelectListState-DdBsBWKG.js} +1 -1
  139. package/AccordionItem-D2QYNgZS.cjs +0 -1
  140. package/DateRangePicker-CYXWnCTq.cjs +0 -6
  141. package/Dialog-B3R3WtL5.cjs +0 -1
  142. package/Dialog-BkUw6PlA.js +0 -221
  143. package/Layout-BwLxIwtY.cjs +0 -16
  144. package/Layout-CcADAhds.js +0 -498
  145. package/Popover--r4Zr4mO.cjs +0 -1
@@ -1,498 +0,0 @@
1
- import { jsx as e, jsxs as l, Fragment as O } from "react/jsx-runtime";
2
- import { G as S } from "./GridItem-DlbSdRmB.js";
3
- import * as b from "react";
4
- import { c as u } from "./clsx-OuTLNxxd.js";
5
- import { B as E } from "./Button-BjMaGya2.js";
6
- import { $ as y } from "./Link-CibH8uRY.js";
7
- import { a as $, T as G } from "./Tooltip-DjNc93tV.js";
8
- import { a as L, B as M } from "./BadgeContainer-CKBIZWsc.js";
9
- import { c as T } from "./createLucideIcon-XRdN60yz.js";
10
- import { $ as w } from "./usePress-BW47IcyU.js";
11
- import { u as k } from "./useLocalizedStringFormatter-N0AyjzbM.js";
12
- import { f as j } from "./tokens-r1r3wC04.js";
13
- import { L as g } from "./Logo-ME4ffCue.js";
14
- import { X as D } from "./x-C2xUHAEl.js";
15
- import './assets/Layout.css';/**
16
- * @license lucide-react v0.525.0 - ISC
17
- *
18
- * This source code is licensed under the ISC license.
19
- * See the LICENSE file in the root directory of this source tree.
20
- */
21
- const W = [
22
- ["path", { d: "M4 12h16", key: "1lakjw" }],
23
- ["path", { d: "M4 18h16", key: "19g7jn" }],
24
- ["path", { d: "M4 6h16", key: "1o0s65" }]
25
- ], q = T("menu", W);
26
- /**
27
- * @license lucide-react v0.525.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */
32
- const A = [
33
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
34
- ["path", { d: "M9 3v18", key: "fh3hqa" }],
35
- ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
36
- ], F = T("panel-left-close", A);
37
- /**
38
- * @license lucide-react v0.525.0 - ISC
39
- *
40
- * This source code is licensed under the ISC license.
41
- * See the LICENSE file in the root directory of this source tree.
42
- */
43
- const R = [
44
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
45
- ["path", { d: "M9 3v18", key: "fh3hqa" }],
46
- ["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
47
- ], X = T("panel-left-open", R), J = "_baseLayout_12xoh_4", K = "_mainContent_12xoh_13", Q = "_header_12xoh_18", U = "_headerExternal_12xoh_29", V = "_headerContent_12xoh_44", Y = "_logo_12xoh_63", Z = "_headerItems_12xoh_72", ee = "_toggleButton_12xoh_78", ae = "_sidebar_12xoh_86", te = "_main_12xoh_13", ne = "_app_12xoh_123", se = "_sidebarOpened_12xoh_132", oe = "_sidebarHeader_12xoh_136", ie = "_appName_12xoh_148", re = "_collapseButton_12xoh_155", le = "_sidebarCollapsed_12xoh_164", de = "_userName_12xoh_174", ce = "_userTitle_12xoh_193", me = "_title_12xoh_205", pe = "_sidebarNav_12xoh_216", he = "_list_12xoh_222", _e = "_listGroupTitle_12xoh_229", ue = "_listItem_12xoh_236", xe = "_listItemCollapsed_12xoh_241", be = "_listLink_12xoh_245", ve = "_listLinkCollapsed_12xoh_290", fe = "_active_12xoh_295", Ne = "_backdrop_12xoh_309", ke = "_backdropOpened_12xoh_319", Ce = "_skipToContent_12xoh_337", ge = "_navbar_12xoh_351", ye = "_navbarList_12xoh_363", Le = "_navbarItem_12xoh_385", Me = "_headerContentExternal_12xoh_425", Ee = "_logoExternalContainer_12xoh_433", Te = "_logoExternal_12xoh_433", Ie = "_logoExternalDesktop_12xoh_445", Se = "_navbarWrapper_12xoh_454", a = {
48
- baseLayout: J,
49
- mainContent: K,
50
- header: Q,
51
- headerExternal: U,
52
- headerContent: V,
53
- logo: Y,
54
- headerItems: Z,
55
- toggleButton: ee,
56
- sidebar: ae,
57
- main: te,
58
- app: ne,
59
- sidebarOpened: se,
60
- sidebarHeader: oe,
61
- appName: ie,
62
- collapseButton: re,
63
- sidebarCollapsed: le,
64
- userName: de,
65
- userTitle: ce,
66
- title: me,
67
- sidebarNav: pe,
68
- list: he,
69
- listGroupTitle: _e,
70
- listItem: ue,
71
- listItemCollapsed: xe,
72
- listLink: be,
73
- listLinkCollapsed: ve,
74
- active: fe,
75
- backdrop: Ne,
76
- backdropOpened: ke,
77
- skipToContent: Ce,
78
- navbar: ge,
79
- navbarList: ye,
80
- navbarItem: Le,
81
- headerContentExternal: Me,
82
- logoExternalContainer: Ee,
83
- logoExternal: Te,
84
- logoExternalDesktop: Ie,
85
- navbarWrapper: Se
86
- }, P = b.createContext(
87
- void 0
88
- ), ze = ({
89
- items: s,
90
- title: n,
91
- user: o,
92
- app: t,
93
- children: i,
94
- clientSideRouter: d,
95
- clientSideHref: r,
96
- headerChildren: p,
97
- isCollapsed: h,
98
- setIsCollapsed: _,
99
- isOpened: v,
100
- setIsOpened: m,
101
- variant: x,
102
- id: f
103
- }) => /* @__PURE__ */ e(
104
- P.Provider,
105
- {
106
- value: {
107
- items: s,
108
- title: n,
109
- user: o,
110
- app: t,
111
- headerChildren: p,
112
- isCollapsed: h,
113
- setIsCollapsed: _,
114
- isOpened: v,
115
- setIsOpened: m,
116
- clientSideRouter: d,
117
- clientSideHref: r,
118
- variant: x,
119
- id: f
120
- },
121
- children: i
122
- }
123
- ), N = () => {
124
- const s = b.useContext(P);
125
- if (!s)
126
- throw new Error("useLayoutContext must be used within a LayoutProvider");
127
- return s;
128
- }, H = ({
129
- title: s,
130
- href: n,
131
- icon: o,
132
- active: t,
133
- hasBadge: i
134
- }) => {
135
- const { isCollapsed: d, setIsOpened: r } = N(), [p, h] = b.useState(!1);
136
- return b.useEffect(() => {
137
- typeof window < "u" && h(t ?? window.location.pathname === n);
138
- }, [t, n]), d ? /* @__PURE__ */ l($, { children: [
139
- /* @__PURE__ */ e(
140
- y,
141
- {
142
- href: n,
143
- "aria-label": s,
144
- className: u(
145
- a.listLink,
146
- a.listLinkCollapsed,
147
- p && a.active
148
- ),
149
- onPress: () => r == null ? void 0 : r(!1),
150
- children: /* @__PURE__ */ l(L, { children: [
151
- /* @__PURE__ */ e(
152
- o,
153
- {
154
- size: 20,
155
- "aria-label": s
156
- }
157
- ),
158
- i && /* @__PURE__ */ e(M, {})
159
- ] })
160
- }
161
- ),
162
- /* @__PURE__ */ e(G, { placement: "right", children: s })
163
- ] }) : /* @__PURE__ */ l(
164
- y,
165
- {
166
- href: n,
167
- "aria-label": s,
168
- className: u(a.listLink, p && a.active),
169
- onPress: () => r == null ? void 0 : r(!1),
170
- children: [
171
- /* @__PURE__ */ l(L, { children: [
172
- /* @__PURE__ */ e(o, { size: 20 }),
173
- i && /* @__PURE__ */ e(M, {})
174
- ] }),
175
- s
176
- ]
177
- }
178
- );
179
- }, Be = {
180
- closeMenu: "Close menu",
181
- openMenu: "Open menu",
182
- maximizeMenu: "Maximize menu",
183
- minimizeMenu: "Minimize menu",
184
- sidebarMenu: "Sidebar menu",
185
- bottomMenu: "Bottom menu",
186
- skipToContent: "Skip to main content"
187
- }, we = {
188
- closeMenu: "Stäng meny",
189
- openMenu: "Öppna meny",
190
- maximizeMenu: "Maximera meny",
191
- minimizeMenu: "Minimera meny",
192
- sidebarMenu: "Sidomeny",
193
- bottomMenu: "Bottenmeny",
194
- skipToContent: "Hoppa till huvudinnehåll"
195
- }, C = {
196
- en: Be,
197
- sv: we
198
- }, Pe = () => {
199
- const {
200
- items: s,
201
- app: n,
202
- isOpened: o,
203
- isCollapsed: t,
204
- setIsCollapsed: i,
205
- setIsOpened: d,
206
- clientSideRouter: r,
207
- clientSideHref: p,
208
- id: h
209
- } = N(), _ = k(C), v = ({ group: m }) => /* @__PURE__ */ e("ul", { className: a.list, children: m.items.map((x, f) => /* @__PURE__ */ e(
210
- "li",
211
- {
212
- className: u(
213
- a.listItem,
214
- t && a.listItemCollapsed
215
- ),
216
- children: /* @__PURE__ */ e(H, { ...x })
217
- },
218
- "link_" + f
219
- )) });
220
- return b.useEffect(() => {
221
- const m = (x) => {
222
- x.key === "Escape" && d !== void 0 && d(!1);
223
- };
224
- return window.addEventListener("keydown", m), () => {
225
- window.removeEventListener("keydown", m);
226
- };
227
- }, [d]), /* @__PURE__ */ l(
228
- "aside",
229
- {
230
- id: h,
231
- className: u(
232
- a.sidebar,
233
- t && a.sidebarCollapsed,
234
- o && a.sidebarOpened
235
- ),
236
- children: [
237
- /* @__PURE__ */ l("div", { className: a.sidebarHeader, children: [
238
- !t && /* @__PURE__ */ e("p", { className: a.appName, children: n.name }),
239
- /* @__PURE__ */ e(
240
- E,
241
- {
242
- variant: "icon",
243
- "aria-label": t ? _.format("maximizeMenu") : _.format("minimizeMenu"),
244
- onPress: () => i(!t),
245
- className: a.collapseButton,
246
- children: t ? /* @__PURE__ */ e(X, { size: 20 }) : /* @__PURE__ */ e(F, { size: 20 })
247
- }
248
- )
249
- ] }),
250
- /* @__PURE__ */ e(
251
- "nav",
252
- {
253
- className: a.sidebarNav,
254
- "aria-label": _.format("sidebarMenu"),
255
- children: /* @__PURE__ */ e("ul", { className: a.list, children: s.map((m, x) => /* @__PURE__ */ l("li", { children: [
256
- m.title && !t && /* @__PURE__ */ e("p", { className: a.listGroupTitle, children: m.title }),
257
- r ? /* @__PURE__ */ e(
258
- w,
259
- {
260
- navigate: r,
261
- useHref: p,
262
- children: /* @__PURE__ */ e(v, { group: m })
263
- }
264
- ) : /* @__PURE__ */ e(v, { group: m })
265
- ] }, "list_" + x)) })
266
- }
267
- )
268
- ]
269
- }
270
- );
271
- }, He = () => {
272
- const {
273
- title: s,
274
- user: n,
275
- app: o,
276
- isOpened: t,
277
- setIsOpened: i,
278
- setIsCollapsed: d,
279
- headerChildren: r,
280
- variant: p,
281
- id: h
282
- } = N(), _ = k(C);
283
- return p === "external" ? /* @__PURE__ */ e("header", { className: u(a.header, a.headerExternal), children: /* @__PURE__ */ l("div", { className: a.headerContentExternal, children: [
284
- /* @__PURE__ */ l("div", { className: a.logoExternalContainer, children: [
285
- /* @__PURE__ */ e(
286
- g,
287
- {
288
- size: "x-small",
289
- padding: !1,
290
- className: a.logoExternal
291
- }
292
- ),
293
- /* @__PURE__ */ e(
294
- g,
295
- {
296
- size: "small",
297
- padding: !1,
298
- className: a.logoExternalDesktop
299
- }
300
- ),
301
- /* @__PURE__ */ l("div", { children: [
302
- /* @__PURE__ */ e("p", { className: a.userName, children: n.name }),
303
- /* @__PURE__ */ e("p", { className: a.userTitle, children: n.title })
304
- ] })
305
- ] }),
306
- /* @__PURE__ */ e("div", { className: a.headerItems, children: r })
307
- ] }) }) : /* @__PURE__ */ l(
308
- "header",
309
- {
310
- className: a.header,
311
- style: {
312
- borderTop: `solid 4px ${o.color ? o.color : j.brandPrimary}`
313
- },
314
- children: [
315
- /* @__PURE__ */ l("div", { className: a.headerContent, children: [
316
- /* @__PURE__ */ e("div", { className: a.logo, children: /* @__PURE__ */ e(
317
- g,
318
- {
319
- size: "small",
320
- padding: !1
321
- }
322
- ) }),
323
- t !== void 0 && /* @__PURE__ */ e(
324
- E,
325
- {
326
- variant: "icon",
327
- className: a.toggleButton,
328
- "aria-label": t ? _.format("closeMenu") : _.format("openMenu"),
329
- "aria-controls": h,
330
- onPressStart: () => {
331
- d(!1), i == null || i(!0);
332
- },
333
- children: t ? /* @__PURE__ */ e(
334
- D,
335
- {
336
- size: 20,
337
- "aria-hidden": "true"
338
- }
339
- ) : /* @__PURE__ */ e(
340
- q,
341
- {
342
- size: 20,
343
- "aria-hidden": "true"
344
- }
345
- )
346
- }
347
- ),
348
- /* @__PURE__ */ l("div", { children: [
349
- /* @__PURE__ */ e("p", { className: a.userName, children: n.name }),
350
- /* @__PURE__ */ e("p", { className: a.userTitle, children: n.title }),
351
- /* @__PURE__ */ e("p", { className: a.title, children: s })
352
- ] })
353
- ] }),
354
- /* @__PURE__ */ e("div", { className: a.headerItems, children: r })
355
- ]
356
- }
357
- );
358
- }, z = ({
359
- id: s = "#main:first-of-type"
360
- }) => {
361
- const n = () => {
362
- const t = document.querySelector(s);
363
- t && (t.tabIndex = -1, t.focus(), setTimeout(() => t.removeAttribute("tabindex"), 1e3));
364
- }, o = k(C);
365
- return /* @__PURE__ */ e(
366
- E,
367
- {
368
- onPress: n,
369
- className: a.skipToContent,
370
- children: o.format("skipToContent")
371
- }
372
- );
373
- }, Oe = () => {
374
- const { isOpened: s, setIsOpened: n } = N();
375
- return s ? /* @__PURE__ */ e(
376
- "div",
377
- {
378
- className: u(a.backdrop, a.backdropOpened),
379
- onClick: () => {
380
- n == null || n(!1);
381
- },
382
- "aria-hidden": !0
383
- }
384
- ) : null;
385
- }, $e = () => {
386
- var d;
387
- const { items: s, clientSideRouter: n, clientSideHref: o } = N(), t = k(C), i = (d = s.at(0)) == null ? void 0 : d.items;
388
- return /* @__PURE__ */ e(
389
- "nav",
390
- {
391
- className: a.navbar,
392
- "aria-label": t.format("bottomMenu"),
393
- children: i && /* @__PURE__ */ e("ul", { className: u(a.navbarList), children: n ? /* @__PURE__ */ e(
394
- w,
395
- {
396
- navigate: n,
397
- useHref: o,
398
- children: /* @__PURE__ */ e(B, { items: i })
399
- }
400
- ) : /* @__PURE__ */ e(B, { items: i }) })
401
- }
402
- );
403
- }, B = ({
404
- items: s
405
- }) => /* @__PURE__ */ e(O, { children: s.map(({ href: n, active: o, icon: t, title: i, hasBadge: d }, r) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ l(
406
- y,
407
- {
408
- href: n,
409
- className: u(a.navbarItem),
410
- "data-active": o,
411
- "aria-current": o && "page",
412
- children: [
413
- /* @__PURE__ */ l(L, { children: [
414
- /* @__PURE__ */ e(t, { size: 20 }),
415
- d && /* @__PURE__ */ e(M, {})
416
- ] }),
417
- i
418
- ]
419
- }
420
- ) }, r)) }), c = ({
421
- items: s,
422
- title: n,
423
- user: o,
424
- app: t,
425
- children: i,
426
- headerChildren: d,
427
- clientSideRouter: r,
428
- clientSideHref: p,
429
- variant: h,
430
- className: _
431
- }) => {
432
- const [v, m] = b.useState(!1), [x, f] = b.useState(!1), I = b.useId();
433
- return h === "external" ? /* @__PURE__ */ e(
434
- c.Provider,
435
- {
436
- items: s,
437
- title: n,
438
- user: o,
439
- app: t,
440
- clientSideRouter: r,
441
- clientSideHref: p,
442
- headerChildren: d,
443
- isCollapsed: v,
444
- setIsCollapsed: m,
445
- variant: h,
446
- id: I,
447
- children: /* @__PURE__ */ l("div", { className: u(a.baseLayout, _), children: [
448
- /* @__PURE__ */ e(z, {}),
449
- /* @__PURE__ */ e(c.Header, {}),
450
- /* @__PURE__ */ l("div", { className: a.mainContent, children: [
451
- /* @__PURE__ */ e(c.Sidebar, {}),
452
- /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: i }) }) }),
453
- /* @__PURE__ */ e(c.Backdrop, {})
454
- ] }),
455
- /* @__PURE__ */ e("div", { className: a.navbarWrapper, children: /* @__PURE__ */ e(c.Navbar, {}) })
456
- ] })
457
- }
458
- ) : /* @__PURE__ */ e(
459
- c.Provider,
460
- {
461
- items: s,
462
- title: n,
463
- user: o,
464
- app: t,
465
- clientSideRouter: r,
466
- clientSideHref: p,
467
- headerChildren: d,
468
- isCollapsed: v,
469
- setIsCollapsed: m,
470
- isOpened: x,
471
- setIsOpened: f,
472
- variant: h,
473
- id: I,
474
- children: /* @__PURE__ */ l("div", { className: u(a.baseLayout, _), children: [
475
- /* @__PURE__ */ e(z, {}),
476
- /* @__PURE__ */ e(c.Header, {}),
477
- /* @__PURE__ */ l("div", { className: a.mainContent, children: [
478
- /* @__PURE__ */ e(c.Sidebar, {}),
479
- /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: i }) }) }),
480
- /* @__PURE__ */ e(c.Backdrop, {})
481
- ] })
482
- ] })
483
- }
484
- );
485
- };
486
- c.Provider = ze;
487
- c.Header = He;
488
- c.Sidebar = Pe;
489
- c.SidebarLink = H;
490
- c.Navbar = $e;
491
- c.Backdrop = Oe;
492
- export {
493
- He as H,
494
- c as L,
495
- $e as N,
496
- Pe as S,
497
- H as a
498
- };
@@ -1 +0,0 @@
1
- "use strict";require('./assets/Popover.css');const r=require("react/jsx-runtime"),a=require("./clsx-C11secjj.cjs"),p=require("./OverlayArrow-DpZ1FqOd.cjs"),i=require("./Dialog-DtHk3eXI.cjs"),n="_popover_ycjap_4",l="_arrow_ycjap_19",e={popover:n,arrow:l};function x({children:o,className:s,offset:c=4,...t}){return r.jsxs(i.$07b14b47974efb58$export$5b6b19405a83ff9d,{...t,offset:c,className:a.clsx(e.popover,s),children:[r.jsx(p.$44f671af83e7d9e0$export$746d02f47f4d381,{className:e.arrow,children:r.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:r.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),o]})}exports.Popover=x;