@midas-ds/components 10.1.1 → 10.3.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 (383) hide show
  1. package/AccordionItem-BGWiWjxA.cjs +1 -0
  2. package/AccordionItem-ChHpW8EW.js +320 -0
  3. package/BadgeContainer-DM8TdyMT.js +37 -0
  4. package/BadgeContainer-I1XA3OCl.cjs +1 -0
  5. package/Breadcrumbs-CwDUNIqF.js +250 -0
  6. package/Breadcrumbs-DtjJ1UmU.cjs +1 -0
  7. package/Button-BoJl6JGM.cjs +1 -0
  8. package/Button-Csih3v23.js +38 -0
  9. package/Button-DjBChs7s.js +340 -0
  10. package/Button-htW9qIsS.cjs +1 -0
  11. package/Button.module-DEQtBYe5.cjs +1 -0
  12. package/Button.module-tti8HGxs.js +14 -0
  13. package/ButtonGroup-DUqW5dzM.cjs +1 -0
  14. package/ButtonGroup-DvVvear6.js +22 -0
  15. package/CHANGELOG.md +68 -0
  16. package/Card-0G0mj9q5.cjs +1 -0
  17. package/Card-yrtGzt70.js +131 -0
  18. package/CharacterCounter-BL_nZHya.js +22 -0
  19. package/CharacterCounter-CHcTDHO-.cjs +1 -0
  20. package/Checkbox-5HINZdGu.js +263 -0
  21. package/Checkbox-DqcPg5hz.cjs +1 -0
  22. package/CheckboxGroup-BBrSMuDY.cjs +1 -0
  23. package/CheckboxGroup-CLgixk2p.js +243 -0
  24. package/Collection-BIDsXNhi.cjs +1 -0
  25. package/Collection-Brgjpkne.js +576 -0
  26. package/ColorSchemeSwitch-BpzQ7g0b.js +106 -0
  27. package/ColorSchemeSwitch-C-qWuqkU.cjs +16 -0
  28. package/ComboBox-CVDyp2a-.js +1379 -0
  29. package/ComboBox-CWJUg9Xx.cjs +1 -0
  30. package/DateField-DeDhiYnW.cjs +1 -0
  31. package/DateField-DhU3q-rG.js +47 -0
  32. package/DateInputDivider-ADvOavHw.cjs +1 -0
  33. package/DateInputDivider-CF4xWsMT.js +2904 -0
  34. package/DateRangePicker-BsAHhy99.cjs +6 -0
  35. package/DateRangePicker-ziD1_k1W.js +881 -0
  36. package/Dialog-B8GTYbvu.cjs +1 -0
  37. package/Dialog-BOrYdX50.cjs +1 -0
  38. package/Dialog-CXNu48AC.js +208 -0
  39. package/Dialog-D14MbJ7o.js +1633 -0
  40. package/DragAndDrop-DNth776R.cjs +1 -0
  41. package/DragAndDrop-o3ruz_SR.js +60 -0
  42. package/Dropdown-CJ6My6EI.cjs +6 -0
  43. package/Dropdown-Df58j43I.js +84 -0
  44. package/FieldError-CAcjosk_.js +46 -0
  45. package/FieldError-CKBb2-mp.cjs +1 -0
  46. package/FileUpload-CxCOtyB9.cjs +2 -0
  47. package/FileUpload-D6qoEAjn.js +2373 -0
  48. package/FocusScope-5c9SVBcR.cjs +1 -0
  49. package/FocusScope-CxkURfoc.js +625 -0
  50. package/Form-BuOomA4T.cjs +1 -0
  51. package/Form-CXcEMuBf.js +5 -0
  52. package/Grid--OhtgCo6.js +27 -0
  53. package/Grid-DVQtOcu9.cjs +1 -0
  54. package/GridItem-DlbSdRmB.js +246 -0
  55. package/GridItem-XgHmZWXY.cjs +1 -0
  56. package/Group-B6EslsHZ.js +44 -0
  57. package/Group-CgiqQHH1.cjs +1 -0
  58. package/Heading-BFtiin0g.js +46 -0
  59. package/Heading-mHhCbGjY.cjs +1 -0
  60. package/Hidden-BxRZGdEW.cjs +1 -0
  61. package/Hidden-C9KWUR7b.js +34 -0
  62. package/InfoBanner-BLM-TJJ6.js +83 -0
  63. package/InfoBanner-C2kTIsrB.cjs +1 -0
  64. package/Input-BTzwcf72.js +41 -0
  65. package/Input-DKSAYvsw.cjs +1 -0
  66. package/Label-7Ybb99CE.cjs +1 -0
  67. package/Label-BwJrdqEE.js +70 -0
  68. package/Layout-1g6bMH62.cjs +16 -0
  69. package/Layout-Ey8flY7E.js +468 -0
  70. package/Link-B88l_oaE.cjs +6 -0
  71. package/Link-BQhauBuw.cjs +1 -0
  72. package/Link-DX5BbBnn.js +59 -0
  73. package/Link-yNO2-sqx.js +71 -0
  74. package/LinkButton-CBpGLETx.cjs +6 -0
  75. package/LinkButton-o6uS1XsR.js +69 -0
  76. package/ListBox-DP9M4H6R.cjs +1 -0
  77. package/ListBox-GnVK_Pdq.js +529 -0
  78. package/ListBoxButton-DPBrtXyv.cjs +1 -0
  79. package/ListBoxButton-D_J3jlP0.js +15 -0
  80. package/ListBoxSection-BGaigBnG.cjs +1 -0
  81. package/ListBoxSection-C0BGnpB4.js +1058 -0
  82. package/ListKeyboardDelegate-DNI8GQtX.js +167 -0
  83. package/ListKeyboardDelegate-DTg9h4v6.cjs +1 -0
  84. package/Logo-BIrOEINM.js +133 -0
  85. package/Logo-DT2_2O43.cjs +1 -0
  86. package/OverlayArrow-CDLXPTew.js +506 -0
  87. package/OverlayArrow-D75k-EMl.cjs +1 -0
  88. package/Popover-BGGXeD54.js +38 -0
  89. package/Popover-CqNWzPf-.cjs +1 -0
  90. package/ProgressBar-DMSg-Prr.js +53 -0
  91. package/ProgressBar-Jbg28j2a.cjs +1 -0
  92. package/RSPContexts-BW2SEIqe.js +11 -0
  93. package/RSPContexts-D8hmBfGm.cjs +1 -0
  94. package/Radio-BwqrdhQE.cjs +1 -0
  95. package/Radio-Cz29wPXd.js +311 -0
  96. package/RangeCalendar-BehUaydF.cjs +11 -0
  97. package/RangeCalendar-RAlAHlNL.js +1683 -0
  98. package/SearchField-CxMwDeUM.cjs +6 -0
  99. package/SearchField-IlvZ3Kh6.js +362 -0
  100. package/Select-2q1iSzAX.cjs +1 -0
  101. package/Select-BVQZtoi9.js +646 -0
  102. package/SelectionManager-B4ORduja.js +1032 -0
  103. package/SelectionManager-CwYux2h3.cjs +1 -0
  104. package/Separator-Cu9fYKUM.js +59 -0
  105. package/Separator-DECIYLtZ.cjs +1 -0
  106. package/Skeleton-BAwbfKBW.cjs +1 -0
  107. package/Skeleton-BePDRmrO.js +40 -0
  108. package/Spinner-D31SXm-U.js +41 -0
  109. package/Spinner-P35rvvsl.cjs +6 -0
  110. package/Table-B40CGLT-.cjs +16 -0
  111. package/Table-F4oYBtUM.js +2447 -0
  112. package/Tabs-B4oZJkZG.js +404 -0
  113. package/Tabs-DA2qXhzb.cjs +1 -0
  114. package/Tag-DPAGmcMK.cjs +1 -0
  115. package/Tag-Du7GvSv2.js +745 -0
  116. package/Text-3MNwRMpI.cjs +1 -0
  117. package/Text-B2K-BJKQ.cjs +1 -0
  118. package/Text-BoXuUVVH.js +15 -0
  119. package/Text-jWWg0B20.js +32 -0
  120. package/TextArea-C7JZ_pQd.cjs +1 -0
  121. package/TextArea-XeBCSyzl.js +191 -0
  122. package/TextField-BgNdhZi_.cjs +1 -0
  123. package/TextField-C-hTPukq.js +119 -0
  124. package/TextField.module-BcpPBWnD.js +13 -0
  125. package/TextField.module-Dw5Rtn9y.cjs +1 -0
  126. package/Toast-AbDA1BOs.cjs +1 -0
  127. package/Toast-Btg21Xge.js +989 -0
  128. package/ToggleButtonGroup-B5yz1tm2.js +210 -0
  129. package/ToggleButtonGroup-BFDoj0P6.cjs +1 -0
  130. package/Tooltip-CMLs7WMw.js +283 -0
  131. package/Tooltip-DeBuBKhS.cjs +1 -0
  132. package/VisuallyHidden-CLWHbz2n.cjs +1 -0
  133. package/VisuallyHidden-ZCYf65q4.js +40 -0
  134. package/accordion/index.cjs +1 -0
  135. package/accordion/index.js +5 -0
  136. package/arrow-right-Dg8sttFO.js +14 -0
  137. package/arrow-right-QJ2gXPKQ.cjs +6 -0
  138. package/assets/AccordionItem.css +1 -0
  139. package/assets/BadgeContainer.css +1 -0
  140. package/assets/Breadcrumbs.css +1 -0
  141. package/assets/Button.css +1 -0
  142. package/assets/ButtonGroup.css +1 -0
  143. package/assets/Card.css +1 -0
  144. package/assets/CharacterCounter.css +1 -0
  145. package/assets/Checkbox.css +1 -0
  146. package/assets/ColorSchemeSwitch.css +1 -0
  147. package/assets/ComboBox.css +1 -0
  148. package/assets/DateField.css +1 -0
  149. package/assets/DateInputDivider.css +1 -0
  150. package/assets/DateRangePicker.css +1 -0
  151. package/assets/Dialog.css +1 -0
  152. package/assets/Dropdown.css +1 -0
  153. package/assets/FieldError.css +1 -0
  154. package/assets/FileUpload.css +1 -0
  155. package/assets/GridItem.css +1 -0
  156. package/assets/Heading.css +1 -0
  157. package/assets/InfoBanner.css +1 -0
  158. package/assets/Label.css +1 -0
  159. package/assets/Layout.css +1 -0
  160. package/assets/Link.css +1 -0
  161. package/assets/LinkButton.css +1 -0
  162. package/assets/ListBoxSection.css +1 -0
  163. package/assets/Logo.css +1 -0
  164. package/assets/Popover.css +1 -0
  165. package/assets/ProgressBar.css +1 -0
  166. package/assets/Radio.css +1 -0
  167. package/assets/RangeCalendar.css +1 -0
  168. package/assets/SearchField.css +1 -0
  169. package/assets/Select.css +1 -0
  170. package/assets/Skeleton.css +1 -0
  171. package/assets/Spinner.css +1 -0
  172. package/assets/Table.css +1 -0
  173. package/assets/Tabs.css +1 -0
  174. package/assets/Tag.css +1 -0
  175. package/assets/Text.css +1 -0
  176. package/assets/TextField.css +1 -0
  177. package/assets/Toast.css +1 -0
  178. package/assets/ToggleButtonGroup.css +1 -0
  179. package/assets/Tooltip.css +1 -0
  180. package/badge/index.cjs +1 -0
  181. package/badge/index.js +5 -0
  182. package/breadcrumbs/index.cjs +1 -0
  183. package/breadcrumbs/index.js +4 -0
  184. package/button/index.cjs +1 -0
  185. package/button/index.js +6 -0
  186. package/calendar/CalendarHeader.d.ts +2 -1
  187. package/calendar/index.cjs +1 -0
  188. package/calendar/index.js +5 -0
  189. package/card/index.cjs +1 -0
  190. package/card/index.js +10 -0
  191. package/character-counter/index.cjs +1 -0
  192. package/character-counter/index.js +4 -0
  193. package/check-CLF6Yxza.js +11 -0
  194. package/check-D_KoootC.cjs +6 -0
  195. package/checkbox/Checkbox.d.ts +2 -2
  196. package/checkbox/CheckboxGroup.d.ts +8 -8
  197. package/checkbox/CheckboxGroupFieldError.d.ts +8 -0
  198. package/checkbox/CheckboxGroupItem.d.ts +3 -0
  199. package/checkbox/CheckboxInner.d.ts +2 -0
  200. package/checkbox/SingleCheckbox.d.ts +3 -0
  201. package/checkbox/context.d.ts +3 -0
  202. package/checkbox/index.cjs +1 -0
  203. package/checkbox/index.d.ts +2 -1
  204. package/checkbox/index.js +6 -0
  205. package/checkbox/intl/translations.json.d.ts +35 -0
  206. package/checkbox/types.d.ts +14 -0
  207. package/checkbox/useSelectAll.d.ts +7 -0
  208. package/chevron-down-Cd1bkzXT.js +13 -0
  209. package/chevron-down-jl83cllc.cjs +6 -0
  210. package/circle-check-B9HYcH7Z.js +26 -0
  211. package/circle-check-BGo8gML8.cjs +11 -0
  212. package/clsx-C11secjj.cjs +1 -0
  213. package/clsx-OuTLNxxd.js +16 -0
  214. package/color-scheme-switch/index.cjs +1 -0
  215. package/color-scheme-switch/index.js +4 -0
  216. package/combobox/ComboBox.d.ts +3 -1
  217. package/combobox/index.cjs +1 -0
  218. package/combobox/index.js +7 -0
  219. package/common/types.d.ts +2 -0
  220. package/context-C81gPYvC.js +80 -0
  221. package/context-DjwhtgxQ.cjs +1 -0
  222. package/createLucideIcon-Cg_wkoIA.cjs +21 -0
  223. package/createLucideIcon-DeWljiyi.js +79 -0
  224. package/date-field/DateField.d.ts +3 -0
  225. package/date-field/index.cjs +1 -0
  226. package/date-field/index.js +8 -0
  227. package/date-picker/DatePicker.d.ts +3 -0
  228. package/date-picker/DateRangePicker.d.ts +3 -0
  229. package/date-picker/index.cjs +1 -0
  230. package/date-picker/index.js +5 -0
  231. package/dropdown/index.cjs +1 -0
  232. package/dropdown/index.js +5 -0
  233. package/field-error/FieldError.d.ts +4 -1
  234. package/field-error/index.cjs +1 -0
  235. package/field-error/index.js +4 -0
  236. package/file-upload/FileUpload.d.ts +3 -0
  237. package/file-upload/index.cjs +1 -0
  238. package/file-upload/index.js +4 -0
  239. package/filterDOMProps-BS2lrgFA.cjs +1 -0
  240. package/filterDOMProps-D6KHYVBX.js +24 -0
  241. package/getScrollParent-BhFcYrwL.js +9 -0
  242. package/getScrollParent-DDJu9WHU.cjs +1 -0
  243. package/grid/Grid.d.ts +15 -4
  244. package/grid/GridItem.d.ts +31 -2
  245. package/grid/index.cjs +1 -0
  246. package/grid/index.d.ts +2 -2
  247. package/grid/index.js +8 -0
  248. package/heading/index.cjs +1 -0
  249. package/heading/index.js +4 -0
  250. package/index-CGRFP4CC.js +120 -0
  251. package/index-Dsz3aiWt.cjs +17 -0
  252. package/index.cjs +1 -169
  253. package/index.d.ts +1 -1
  254. package/index.js +129 -29979
  255. package/inertValue-B3AFhVG4.cjs +1 -0
  256. package/inertValue-B7loUihk.js +8 -0
  257. package/info-BZwphdye.js +15 -0
  258. package/info-CIEIENo6.cjs +6 -0
  259. package/info-banner/index.cjs +1 -0
  260. package/info-banner/index.js +4 -0
  261. package/label/InfoPopover.d.ts +9 -0
  262. package/label/LabelWrapper.d.ts +11 -0
  263. package/label/index.cjs +1 -0
  264. package/label/index.d.ts +1 -0
  265. package/label/index.js +4 -0
  266. package/layout/index.cjs +1 -0
  267. package/layout/index.js +8 -0
  268. package/link/index.cjs +1 -0
  269. package/link/index.js +6 -0
  270. package/link-button/index.cjs +1 -0
  271. package/link-button/index.js +6 -0
  272. package/list-box/index.cjs +1 -0
  273. package/list-box/index.js +9 -0
  274. package/logo/index.cjs +1 -0
  275. package/logo/index.js +4 -0
  276. package/modal/index.cjs +1 -0
  277. package/modal/index.js +6 -0
  278. package/number-BE8InLgI.js +6 -0
  279. package/number-E0x3H9cL.cjs +1 -0
  280. package/package.json +4 -4
  281. package/popover/Popover.d.ts +7 -0
  282. package/popover/index.cjs +1 -0
  283. package/popover/index.d.ts +1 -0
  284. package/popover/index.js +4 -0
  285. package/progress-bar/index.cjs +1 -0
  286. package/progress-bar/index.js +4 -0
  287. package/radio/Radio.d.ts +3 -0
  288. package/radio/index.cjs +1 -0
  289. package/radio/index.js +5 -0
  290. package/scrollIntoView-C8doLzDd.cjs +1 -0
  291. package/scrollIntoView-Hwb_aaNf.js +87 -0
  292. package/search-field/index.cjs +1 -0
  293. package/search-field/index.js +4 -0
  294. package/select/index.cjs +1 -0
  295. package/select/index.js +4 -0
  296. package/skeleton/Skeleton.d.ts +5 -0
  297. package/skeleton/index.cjs +1 -0
  298. package/skeleton/index.js +4 -0
  299. package/spinner/index.cjs +1 -0
  300. package/spinner/index.js +4 -0
  301. package/square-arrow-out-up-right-BkyqV2PN.js +15 -0
  302. package/square-arrow-out-up-right-V4Gd08uI.cjs +6 -0
  303. package/table/Table.d.ts +7 -1
  304. package/table/index.cjs +1 -0
  305. package/table/index.js +9 -0
  306. package/tabs/index.cjs +1 -0
  307. package/tabs/index.js +4 -0
  308. package/tag/index.cjs +1 -0
  309. package/tag/index.js +5 -0
  310. package/text/index.cjs +1 -0
  311. package/text/index.js +4 -0
  312. package/textfield/TextFieldBase.d.ts +2 -0
  313. package/textfield/index.cjs +1 -0
  314. package/textfield/index.js +7 -0
  315. package/theme/index.cjs +1 -0
  316. package/theme/index.d.ts +4 -0
  317. package/{theme.js → theme/index.js} +2 -2
  318. package/theme/tokens.d.ts +10 -0
  319. package/toast/index.cjs +1 -0
  320. package/toast/index.js +9 -0
  321. package/toggle-button/index.cjs +1 -0
  322. package/toggle-button/index.js +5 -0
  323. package/tokens-p6pg1Cea.cjs +1 -0
  324. package/{tokens-C0U7hdoO.js → tokens-xp-7KMK7.js} +18 -8
  325. package/tooltip/index.cjs +1 -0
  326. package/tooltip/index.js +5 -0
  327. package/triangle-alert-DJW8U7jL.cjs +6 -0
  328. package/triangle-alert-wxyxspAl.js +21 -0
  329. package/useButton-B8dB9sot.js +47 -0
  330. package/useButton-cpNi-fY4.cjs +1 -0
  331. package/useControlledState-D0L6S_5r.cjs +1 -0
  332. package/useControlledState-u436Wbp1.js +30 -0
  333. package/useDateFormatter-CnxoJ4jF.cjs +1 -0
  334. package/useDateFormatter-EHm4auIg.js +1571 -0
  335. package/useEvent-DxBxMX2V.cjs +1 -0
  336. package/useEvent-IsD2Awnh.js +21 -0
  337. package/useField-CXKYU74k.cjs +1 -0
  338. package/useField-DvpGZkw_.js +35 -0
  339. package/useFilter-BTgDWHVx.cjs +1 -0
  340. package/useFilter-CUq74PQ2.js +35 -0
  341. package/useFocusRing-CbImDrwF.cjs +1 -0
  342. package/useFocusRing-XnR3cZjO.js +82 -0
  343. package/useFocusable-C8uh8K4g.js +125 -0
  344. package/useFocusable-NUVSFcRC.cjs +1 -0
  345. package/useFormValidation-BIGzfO9h.js +215 -0
  346. package/useFormValidation-ClximP89.cjs +1 -0
  347. package/useHasTabbableChild-C-1mZUQe.js +34 -0
  348. package/useHasTabbableChild-DCBTulUQ.cjs +1 -0
  349. package/useHighlightSelectionDescription-CnBDT86u.js +567 -0
  350. package/useHighlightSelectionDescription-CzYucm61.cjs +1 -0
  351. package/useHover-DjIHtjGN.js +490 -0
  352. package/useHover-_mv5J4_q.cjs +1 -0
  353. package/useLabels-BDwkBYbE.js +17 -0
  354. package/useLabels-BLOfc6Y-.cjs +1 -0
  355. package/useListState-Bx8u4IFG.cjs +1 -0
  356. package/useListState-CrZFZffI.js +132 -0
  357. package/useLocalizedStringFormatter-BKoxGZf1.js +96 -0
  358. package/useLocalizedStringFormatter-BsxLt89S.cjs +1 -0
  359. package/useLocalizedStringFormatter-D3JQyjb4.js +21 -0
  360. package/useLocalizedStringFormatter-ioacM-Yt.cjs +1 -0
  361. package/useObserveElement-BdI4zgd7.js +27 -0
  362. package/useObserveElement-MhzEsCkX.cjs +1 -0
  363. package/usePress-0AjDbW9R.cjs +7 -0
  364. package/usePress-CNjmDzap.js +542 -0
  365. package/useSingleSelectListState-0AGHxvy3.js +34 -0
  366. package/useSingleSelectListState-Cl3KV5E1.cjs +1 -0
  367. package/useTextField--czJtyNd.cjs +1 -0
  368. package/useTextField-Cw-33OP_.js +86 -0
  369. package/useToggleState-Bz5rAf4C.js +18 -0
  370. package/useToggleState-DoIkSQdj.cjs +1 -0
  371. package/useUpdateEffect-C5YQs_1w.cjs +1 -0
  372. package/useUpdateEffect-CCDx8D4X.js +13 -0
  373. package/utils-BNtZbAib.cjs +1 -0
  374. package/utils-DIMfEPAt.js +308 -0
  375. package/x-H8Zrx8-x.cjs +6 -0
  376. package/x-JK7i-TQC.js +14 -0
  377. package/flex/Flex.d.ts +0 -17
  378. package/flex/FlexItem.d.ts +0 -15
  379. package/flex/index.d.ts +0 -2
  380. package/index.css +0 -1
  381. package/theme.cjs +0 -1
  382. package/tokens-COoF1t17.cjs +0 -1
  383. /package/{global.css → assets/global.css} +0 -0
@@ -0,0 +1,16 @@
1
+ "use strict";require('./assets/Layout.css');const e=require("react/jsx-runtime"),y=require("./GridItem-XgHmZWXY.cjs"),q=require("react"),m=require("./clsx-C11secjj.cjs"),k=require("./Button-BoJl6JGM.cjs"),f=require("./Link-BQhauBuw.cjs"),L=require("./Tooltip-DeBuBKhS.cjs"),u=require("./BadgeContainer-I1XA3OCl.cjs"),C=require("./createLucideIcon-Cg_wkoIA.cjs"),B=require("./usePress-0AjDbW9R.cjs"),O=require("./tokens-p6pg1Cea.cjs"),N=require("./Logo-DT2_2O43.cjs"),$=require("./x-H8Zrx8-x.cjs");function z(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>a[r]})}}return t.default=a,Object.freeze(t)}const _=z(q);/**
2
+ * @license lucide-react v0.453.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const H=C.createLucideIcon("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
7
+ * @license lucide-react v0.453.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const M=C.createLucideIcon("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
12
+ * @license lucide-react v0.453.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const G=C.createLucideIcon("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),D="_baseLayout_12xoh_4",R="_mainContent_12xoh_13",W="_header_12xoh_18",A="_headerExternal_12xoh_29",F="_headerContent_12xoh_44",X="_logo_12xoh_63",J="_headerItems_12xoh_72",K="_toggleButton_12xoh_78",Q="_sidebar_12xoh_86",U="_main_12xoh_13",V="_app_12xoh_123",Y="_sidebarOpened_12xoh_132",Z="_sidebarHeader_12xoh_136",ee="_appName_12xoh_148",se="_collapseButton_12xoh_155",ae="_sidebarCollapsed_12xoh_164",te="_userName_12xoh_174",ne="_userTitle_12xoh_193",re="_title_12xoh_205",oe="_sidebarNav_12xoh_216",ie="_list_12xoh_222",le="_listGroupTitle_12xoh_229",ce="_listItem_12xoh_236",de="_listItemCollapsed_12xoh_241",xe="_listLink_12xoh_245",he="_listLinkCollapsed_12xoh_290",pe="_active_12xoh_295",me="_backdrop_12xoh_309",_e="_backdropOpened_12xoh_319",ue="_skipToContent_12xoh_337",be="_navbar_12xoh_351",je="_navbarList_12xoh_363",ve="_navbarItem_12xoh_385",Ne="_headerContentExternal_12xoh_425",fe="_logoExternalContainer_12xoh_433",ke="_logoExternal_12xoh_433",Ce="_logoExternalDesktop_12xoh_445",ge="_navbarWrapper_12xoh_454",s={baseLayout:D,mainContent:R,header:W,headerExternal:A,headerContent:F,logo:X,headerItems:J,toggleButton:K,sidebar:Q,main:U,app:V,sidebarOpened:Y,sidebarHeader:Z,appName:ee,collapseButton:se,sidebarCollapsed:ae,userName:te,userTitle:ne,title:re,sidebarNav:oe,list:ie,listGroupTitle:le,listItem:ce,listItemCollapsed:de,listLink:xe,listLinkCollapsed:he,active:pe,backdrop:me,backdropOpened:_e,skipToContent:ue,navbar:be,navbarList:je,navbarItem:ve,headerContentExternal:Ne,logoExternalContainer:fe,logoExternal:ke,logoExternalDesktop:Ce,navbarWrapper:ge},T=_.createContext(void 0),ye=({items:a,title:t,user:r,app:n,children:i,clientSideRouter:c,clientSideHref:o,headerChildren:x,isCollapsed:h,setIsCollapsed:d,isOpened:p,setIsOpened:b,variant:v})=>e.jsx(T.Provider,{value:{items:a,title:t,user:r,app:n,headerChildren:x,isCollapsed:h,setIsCollapsed:d,isOpened:p,setIsOpened:b,clientSideRouter:c,clientSideHref:o,variant:v},children:i}),j=()=>{const a=_.useContext(T);if(!a)throw new Error("useLayoutContext must be used within a LayoutProvider");return a},g=({title:a,href:t,icon:r,active:n,hasBadge:i})=>{const{isCollapsed:c,setIsOpened:o}=j(),[x,h]=_.useState(!1);return _.useEffect(()=>{typeof window<"u"&&h(n??window.location.pathname===t)},[n,t]),c?e.jsxs(L.TooltipTrigger,{children:[e.jsx(f.$4f118338184dc1d9$export$a6c7ac8248d6e38a,{href:t,"aria-label":a,className:m.clsx(s.listLink,s.listLinkCollapsed,x&&s.active),onPress:()=>o==null?void 0:o(!1),children:e.jsxs(u.BadgeContainer,{children:[e.jsx(r,{size:20,"aria-label":a}),i&&e.jsx(u.Badge,{})]})}),e.jsx(L.Tooltip,{placement:"right",children:a})]}):e.jsxs(f.$4f118338184dc1d9$export$a6c7ac8248d6e38a,{href:t,"aria-label":a,className:m.clsx(s.listLink,x&&s.active),onPress:()=>o==null?void 0:o(!1),children:[e.jsxs(u.BadgeContainer,{children:[e.jsx(r,{size:20}),i&&e.jsx(u.Badge,{})]}),a]})},S=()=>{const{items:a,app:t,isOpened:r,isCollapsed:n,setIsCollapsed:i,setIsOpened:c,clientSideRouter:o,clientSideHref:x}=j(),h=({group:d})=>e.jsx("ul",{className:s.list,children:d.items.map((p,b)=>e.jsx("li",{className:m.clsx(s.listItem,n&&s.listItemCollapsed),children:e.jsx(g,{...p})},"link_"+b))});return _.useEffect(()=>{const d=p=>{p.key==="Escape"&&c!==void 0&&c(!1)};return window.addEventListener("keydown",d),()=>{window.removeEventListener("keydown",d)}},[c]),e.jsxs("aside",{id:"midasMainMenu",className:m.clsx(s.sidebar,n&&s.sidebarCollapsed,r&&s.sidebarOpened),children:[e.jsxs("div",{className:s.sidebarHeader,children:[!n&&e.jsx("p",{className:s.appName,children:t.name}),e.jsx(k.Button,{variant:"icon","aria-label":n?"Maximera sidomenyn":"Minimera sidomenyn",onPress:()=>i(!n),className:s.collapseButton,children:n?e.jsx(G,{size:20}):e.jsx(M,{size:20})})]}),e.jsx("nav",{className:s.sidebarNav,"aria-label":"Sidomeny",children:e.jsx("ul",{className:s.list,children:a.map((d,p)=>e.jsxs("li",{children:[d.title&&!n&&e.jsx("p",{className:s.listGroupTitle,children:d.title}),o?e.jsx(B.$ea8dcbcb9ea1b556$export$323e4fc2fa4753fb,{navigate:o,useHref:x,children:e.jsx(h,{group:d})}):e.jsx(h,{group:d})]},"list_"+p))})})]})},P=()=>{const{title:a,user:t,app:r,isOpened:n,setIsOpened:i,setIsCollapsed:c,headerChildren:o,variant:x}=j();return x==="external"?e.jsx("header",{className:m.clsx(s.header,s.headerExternal),children:e.jsxs("div",{className:s.headerContentExternal,children:[e.jsxs("div",{className:s.logoExternalContainer,children:[e.jsx(N.Logo,{size:"x-small",padding:!1,className:s.logoExternal}),e.jsx(N.Logo,{size:"small",padding:!1,className:s.logoExternalDesktop}),e.jsxs("div",{children:[e.jsx("p",{className:s.userName,children:t.name}),e.jsx("p",{className:s.userTitle,children:t.title})]})]}),e.jsx("div",{className:s.headerItems,children:o})]})}):e.jsxs("header",{className:s.header,style:{borderTop:`solid 4px ${r.color?r.color:O.semantic.brandPrimary}`},children:[e.jsxs("div",{className:s.headerContent,children:[e.jsx("div",{className:s.logo,children:e.jsx(N.Logo,{size:"small",padding:!1})}),n!==void 0&&e.jsx(k.Button,{variant:"icon",className:s.toggleButton,"aria-label":n?"Stäng meny":"Öppna meny","aria-controls":"midasMainMenu",onPressStart:()=>{c(!1),i==null||i(!0)},children:n?e.jsx($.X,{size:20,"aria-hidden":"true"}):e.jsx(H,{size:20,"aria-hidden":"true"})}),e.jsxs("div",{children:[e.jsx("p",{className:s.userName,children:t.name}),e.jsx("p",{className:s.userTitle,children:t.title}),e.jsx("p",{className:s.title,children:a})]})]}),e.jsx("div",{className:s.headerItems,children:o})]})},E=({id:a="#main:first-of-type"})=>{const t=()=>{const r=document.querySelector(a);r&&(r.tabIndex=-1,r.focus(),setTimeout(()=>r.removeAttribute("tabindex"),1e3))};return e.jsx(k.Button,{onPress:t,className:s.skipToContent,children:"Hoppa till huvudinnehåll"})},Le=()=>{const{isOpened:a,setIsOpened:t}=j();return a?e.jsx("div",{className:m.clsx(s.backdrop,s.backdropOpened),onClick:()=>{t==null||t(!1)},"aria-hidden":!0}):null},w=()=>{var i;const{items:a,clientSideRouter:t,clientSideHref:r}=j(),n=(i=a.at(0))==null?void 0:i.items;return e.jsx("nav",{className:s.navbar,"aria-label":"Bottenmeny",children:n&&e.jsx("ul",{className:m.clsx(s.navbarList),children:t?e.jsx(B.$ea8dcbcb9ea1b556$export$323e4fc2fa4753fb,{navigate:t,useHref:r,children:e.jsx(I,{items:n})}):e.jsx(I,{items:n})})})},I=({items:a})=>e.jsx(e.Fragment,{children:a.map(({href:t,active:r,icon:n,title:i,hasBadge:c},o)=>e.jsx("li",{children:e.jsxs(f.$4f118338184dc1d9$export$a6c7ac8248d6e38a,{href:t,className:m.clsx(s.navbarItem),"data-active":r,"aria-current":r&&"page",children:[e.jsxs(u.BadgeContainer,{children:[e.jsx(n,{size:20}),c&&e.jsx(u.Badge,{})]}),i]})},o))}),l=({items:a,title:t,user:r,app:n,children:i,headerChildren:c,clientSideRouter:o,clientSideHref:x,variant:h})=>{const[d,p]=_.useState(!1),[b,v]=_.useState(!1);return h==="external"?e.jsx(l.Provider,{items:a,title:t,user:r,app:n,clientSideRouter:o,clientSideHref:x,headerChildren:c,isCollapsed:d,setIsCollapsed:p,variant:h,children:e.jsxs("div",{className:s.baseLayout,children:[e.jsx(E,{}),e.jsx(l.Header,{}),e.jsxs("div",{className:s.mainContent,children:[e.jsx(l.Sidebar,{}),e.jsx(y.GridItem,{children:e.jsx("main",{className:s.main,children:e.jsx("div",{className:s.app,children:i})})}),e.jsx(l.Backdrop,{})]}),e.jsx("div",{className:s.navbarWrapper,children:e.jsx(l.Navbar,{})})]})}):e.jsx(l.Provider,{items:a,title:t,user:r,app:n,clientSideRouter:o,clientSideHref:x,headerChildren:c,isCollapsed:d,setIsCollapsed:p,isOpened:b,setIsOpened:v,variant:h,children:e.jsxs("div",{className:s.baseLayout,children:[e.jsx(E,{}),e.jsx(l.Header,{}),e.jsxs("div",{className:s.mainContent,children:[e.jsx(l.Sidebar,{}),e.jsx(y.GridItem,{children:e.jsx("main",{className:s.main,children:e.jsx("div",{className:s.app,children:i})})}),e.jsx(l.Backdrop,{})]})]})})};l.Provider=ye;l.Header=P;l.Sidebar=S;l.SidebarLink=g;l.Navbar=w;l.Backdrop=Le;exports.Header=P;exports.Layout=l;exports.Navbar=w;exports.Sidebar=S;exports.SidebarLink=g;
@@ -0,0 +1,468 @@
1
+ import { jsx as e, jsxs as i, Fragment as P } from "react/jsx-runtime";
2
+ import { G as E } from "./GridItem-DlbSdRmB.js";
3
+ import * as u from "react";
4
+ import { c as x } from "./clsx-OuTLNxxd.js";
5
+ import { B as L } from "./Button-Csih3v23.js";
6
+ import { $ as k } from "./Link-yNO2-sqx.js";
7
+ import { a as H, T as z } from "./Tooltip-CMLs7WMw.js";
8
+ import { a as C, B as y } from "./BadgeContainer-DM8TdyMT.js";
9
+ import { c as g } from "./createLucideIcon-DeWljiyi.js";
10
+ import { $ as S } from "./usePress-CNjmDzap.js";
11
+ import { f as O } from "./tokens-xp-7KMK7.js";
12
+ import { L as f } from "./Logo-BIrOEINM.js";
13
+ import { X as M } from "./x-JK7i-TQC.js";
14
+ import './assets/Layout.css';/**
15
+ * @license lucide-react v0.453.0 - ISC
16
+ *
17
+ * This source code is licensed under the ISC license.
18
+ * See the LICENSE file in the root directory of this source tree.
19
+ */
20
+ const $ = g("Menu", [
21
+ ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
22
+ ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
23
+ ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
24
+ ]);
25
+ /**
26
+ * @license lucide-react v0.453.0 - ISC
27
+ *
28
+ * This source code is licensed under the ISC license.
29
+ * See the LICENSE file in the root directory of this source tree.
30
+ */
31
+ const G = g("PanelLeftClose", [
32
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
33
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
34
+ ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
35
+ ]);
36
+ /**
37
+ * @license lucide-react v0.453.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */
42
+ const D = g("PanelLeftOpen", [
43
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
44
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
45
+ ["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
46
+ ]), W = "_baseLayout_12xoh_4", j = "_mainContent_12xoh_13", q = "_header_12xoh_18", A = "_headerExternal_12xoh_29", R = "_headerContent_12xoh_44", F = "_logo_12xoh_63", X = "_headerItems_12xoh_72", J = "_toggleButton_12xoh_78", K = "_sidebar_12xoh_86", Q = "_main_12xoh_13", U = "_app_12xoh_123", V = "_sidebarOpened_12xoh_132", Y = "_sidebarHeader_12xoh_136", Z = "_appName_12xoh_148", ee = "_collapseButton_12xoh_155", ae = "_sidebarCollapsed_12xoh_164", te = "_userName_12xoh_174", ne = "_userTitle_12xoh_193", se = "_title_12xoh_205", oe = "_sidebarNav_12xoh_216", re = "_list_12xoh_222", ie = "_listGroupTitle_12xoh_229", le = "_listItem_12xoh_236", de = "_listItemCollapsed_12xoh_241", ce = "_listLink_12xoh_245", me = "_listLinkCollapsed_12xoh_290", he = "_active_12xoh_295", pe = "_backdrop_12xoh_309", _e = "_backdropOpened_12xoh_319", xe = "_skipToContent_12xoh_337", ue = "_navbar_12xoh_351", be = "_navbarList_12xoh_363", ve = "_navbarItem_12xoh_385", Ne = "_headerContentExternal_12xoh_425", fe = "_logoExternalContainer_12xoh_433", ke = "_logoExternal_12xoh_433", Ce = "_logoExternalDesktop_12xoh_445", ye = "_navbarWrapper_12xoh_454", a = {
47
+ baseLayout: W,
48
+ mainContent: j,
49
+ header: q,
50
+ headerExternal: A,
51
+ headerContent: R,
52
+ logo: F,
53
+ headerItems: X,
54
+ toggleButton: J,
55
+ sidebar: K,
56
+ main: Q,
57
+ app: U,
58
+ sidebarOpened: V,
59
+ sidebarHeader: Y,
60
+ appName: Z,
61
+ collapseButton: ee,
62
+ sidebarCollapsed: ae,
63
+ userName: te,
64
+ userTitle: ne,
65
+ title: se,
66
+ sidebarNav: oe,
67
+ list: re,
68
+ listGroupTitle: ie,
69
+ listItem: le,
70
+ listItemCollapsed: de,
71
+ listLink: ce,
72
+ listLinkCollapsed: me,
73
+ active: he,
74
+ backdrop: pe,
75
+ backdropOpened: _e,
76
+ skipToContent: xe,
77
+ navbar: ue,
78
+ navbarList: be,
79
+ navbarItem: ve,
80
+ headerContentExternal: Ne,
81
+ logoExternalContainer: fe,
82
+ logoExternal: ke,
83
+ logoExternalDesktop: Ce,
84
+ navbarWrapper: ye
85
+ }, B = u.createContext(
86
+ void 0
87
+ ), Le = ({
88
+ items: n,
89
+ title: t,
90
+ user: o,
91
+ app: s,
92
+ children: l,
93
+ clientSideRouter: c,
94
+ clientSideHref: r,
95
+ headerChildren: h,
96
+ isCollapsed: p,
97
+ setIsCollapsed: m,
98
+ isOpened: _,
99
+ setIsOpened: b,
100
+ variant: N
101
+ }) => /* @__PURE__ */ e(
102
+ B.Provider,
103
+ {
104
+ value: {
105
+ items: n,
106
+ title: t,
107
+ user: o,
108
+ app: s,
109
+ headerChildren: h,
110
+ isCollapsed: p,
111
+ setIsCollapsed: m,
112
+ isOpened: _,
113
+ setIsOpened: b,
114
+ clientSideRouter: c,
115
+ clientSideHref: r,
116
+ variant: N
117
+ },
118
+ children: l
119
+ }
120
+ ), v = () => {
121
+ const n = u.useContext(B);
122
+ if (!n)
123
+ throw new Error("useLayoutContext must be used within a LayoutProvider");
124
+ return n;
125
+ }, w = ({
126
+ title: n,
127
+ href: t,
128
+ icon: o,
129
+ active: s,
130
+ hasBadge: l
131
+ }) => {
132
+ const { isCollapsed: c, setIsOpened: r } = v(), [h, p] = u.useState(!1);
133
+ return u.useEffect(() => {
134
+ typeof window < "u" && p(s ?? window.location.pathname === t);
135
+ }, [s, t]), c ? /* @__PURE__ */ i(H, { children: [
136
+ /* @__PURE__ */ e(
137
+ k,
138
+ {
139
+ href: t,
140
+ "aria-label": n,
141
+ className: x(
142
+ a.listLink,
143
+ a.listLinkCollapsed,
144
+ h && a.active
145
+ ),
146
+ onPress: () => r == null ? void 0 : r(!1),
147
+ children: /* @__PURE__ */ i(C, { children: [
148
+ /* @__PURE__ */ e(
149
+ o,
150
+ {
151
+ size: 20,
152
+ "aria-label": n
153
+ }
154
+ ),
155
+ l && /* @__PURE__ */ e(y, {})
156
+ ] })
157
+ }
158
+ ),
159
+ /* @__PURE__ */ e(z, { placement: "right", children: n })
160
+ ] }) : /* @__PURE__ */ i(
161
+ k,
162
+ {
163
+ href: t,
164
+ "aria-label": n,
165
+ className: x(a.listLink, h && a.active),
166
+ onPress: () => r == null ? void 0 : r(!1),
167
+ children: [
168
+ /* @__PURE__ */ i(C, { children: [
169
+ /* @__PURE__ */ e(o, { size: 20 }),
170
+ l && /* @__PURE__ */ e(y, {})
171
+ ] }),
172
+ n
173
+ ]
174
+ }
175
+ );
176
+ }, ge = () => {
177
+ const {
178
+ items: n,
179
+ app: t,
180
+ isOpened: o,
181
+ isCollapsed: s,
182
+ setIsCollapsed: l,
183
+ setIsOpened: c,
184
+ clientSideRouter: r,
185
+ clientSideHref: h
186
+ } = v(), p = ({ group: m }) => /* @__PURE__ */ e("ul", { className: a.list, children: m.items.map((_, b) => /* @__PURE__ */ e(
187
+ "li",
188
+ {
189
+ className: x(
190
+ a.listItem,
191
+ s && a.listItemCollapsed
192
+ ),
193
+ children: /* @__PURE__ */ e(w, { ..._ })
194
+ },
195
+ "link_" + b
196
+ )) });
197
+ return u.useEffect(() => {
198
+ const m = (_) => {
199
+ _.key === "Escape" && c !== void 0 && c(!1);
200
+ };
201
+ return window.addEventListener("keydown", m), () => {
202
+ window.removeEventListener("keydown", m);
203
+ };
204
+ }, [c]), /* @__PURE__ */ i(
205
+ "aside",
206
+ {
207
+ id: "midasMainMenu",
208
+ className: x(
209
+ a.sidebar,
210
+ s && a.sidebarCollapsed,
211
+ o && a.sidebarOpened
212
+ ),
213
+ children: [
214
+ /* @__PURE__ */ i("div", { className: a.sidebarHeader, children: [
215
+ !s && /* @__PURE__ */ e("p", { className: a.appName, children: t.name }),
216
+ /* @__PURE__ */ e(
217
+ L,
218
+ {
219
+ variant: "icon",
220
+ "aria-label": s ? "Maximera sidomenyn" : "Minimera sidomenyn",
221
+ onPress: () => l(!s),
222
+ className: a.collapseButton,
223
+ children: s ? /* @__PURE__ */ e(D, { size: 20 }) : /* @__PURE__ */ e(G, { size: 20 })
224
+ }
225
+ )
226
+ ] }),
227
+ /* @__PURE__ */ e(
228
+ "nav",
229
+ {
230
+ className: a.sidebarNav,
231
+ "aria-label": "Sidomeny",
232
+ children: /* @__PURE__ */ e("ul", { className: a.list, children: n.map((m, _) => /* @__PURE__ */ i("li", { children: [
233
+ m.title && !s && /* @__PURE__ */ e("p", { className: a.listGroupTitle, children: m.title }),
234
+ r ? /* @__PURE__ */ e(
235
+ S,
236
+ {
237
+ navigate: r,
238
+ useHref: h,
239
+ children: /* @__PURE__ */ e(p, { group: m })
240
+ }
241
+ ) : /* @__PURE__ */ e(p, { group: m })
242
+ ] }, "list_" + _)) })
243
+ }
244
+ )
245
+ ]
246
+ }
247
+ );
248
+ }, Ee = () => {
249
+ const {
250
+ title: n,
251
+ user: t,
252
+ app: o,
253
+ isOpened: s,
254
+ setIsOpened: l,
255
+ setIsCollapsed: c,
256
+ headerChildren: r,
257
+ variant: h
258
+ } = v();
259
+ return h === "external" ? /* @__PURE__ */ e("header", { className: x(a.header, a.headerExternal), children: /* @__PURE__ */ i("div", { className: a.headerContentExternal, children: [
260
+ /* @__PURE__ */ i("div", { className: a.logoExternalContainer, children: [
261
+ /* @__PURE__ */ e(
262
+ f,
263
+ {
264
+ size: "x-small",
265
+ padding: !1,
266
+ className: a.logoExternal
267
+ }
268
+ ),
269
+ /* @__PURE__ */ e(
270
+ f,
271
+ {
272
+ size: "small",
273
+ padding: !1,
274
+ className: a.logoExternalDesktop
275
+ }
276
+ ),
277
+ /* @__PURE__ */ i("div", { children: [
278
+ /* @__PURE__ */ e("p", { className: a.userName, children: t.name }),
279
+ /* @__PURE__ */ e("p", { className: a.userTitle, children: t.title })
280
+ ] })
281
+ ] }),
282
+ /* @__PURE__ */ e("div", { className: a.headerItems, children: r })
283
+ ] }) }) : /* @__PURE__ */ i(
284
+ "header",
285
+ {
286
+ className: a.header,
287
+ style: {
288
+ borderTop: `solid 4px ${o.color ? o.color : O.brandPrimary}`
289
+ },
290
+ children: [
291
+ /* @__PURE__ */ i("div", { className: a.headerContent, children: [
292
+ /* @__PURE__ */ e("div", { className: a.logo, children: /* @__PURE__ */ e(
293
+ f,
294
+ {
295
+ size: "small",
296
+ padding: !1
297
+ }
298
+ ) }),
299
+ s !== void 0 && /* @__PURE__ */ e(
300
+ L,
301
+ {
302
+ variant: "icon",
303
+ className: a.toggleButton,
304
+ "aria-label": s ? "Stäng meny" : "Öppna meny",
305
+ "aria-controls": "midasMainMenu",
306
+ onPressStart: () => {
307
+ c(!1), l == null || l(!0);
308
+ },
309
+ children: s ? /* @__PURE__ */ e(
310
+ M,
311
+ {
312
+ size: 20,
313
+ "aria-hidden": "true"
314
+ }
315
+ ) : /* @__PURE__ */ e(
316
+ $,
317
+ {
318
+ size: 20,
319
+ "aria-hidden": "true"
320
+ }
321
+ )
322
+ }
323
+ ),
324
+ /* @__PURE__ */ i("div", { children: [
325
+ /* @__PURE__ */ e("p", { className: a.userName, children: t.name }),
326
+ /* @__PURE__ */ e("p", { className: a.userTitle, children: t.title }),
327
+ /* @__PURE__ */ e("p", { className: a.title, children: n })
328
+ ] })
329
+ ] }),
330
+ /* @__PURE__ */ e("div", { className: a.headerItems, children: r })
331
+ ]
332
+ }
333
+ );
334
+ }, T = ({
335
+ id: n = "#main:first-of-type"
336
+ }) => /* @__PURE__ */ e(
337
+ L,
338
+ {
339
+ onPress: () => {
340
+ const o = document.querySelector(n);
341
+ o && (o.tabIndex = -1, o.focus(), setTimeout(() => o.removeAttribute("tabindex"), 1e3));
342
+ },
343
+ className: a.skipToContent,
344
+ children: "Hoppa till huvudinnehåll"
345
+ }
346
+ ), Te = () => {
347
+ const { isOpened: n, setIsOpened: t } = v();
348
+ return n ? /* @__PURE__ */ e(
349
+ "div",
350
+ {
351
+ className: x(a.backdrop, a.backdropOpened),
352
+ onClick: () => {
353
+ t == null || t(!1);
354
+ },
355
+ "aria-hidden": !0
356
+ }
357
+ ) : null;
358
+ }, Ie = () => {
359
+ var l;
360
+ const { items: n, clientSideRouter: t, clientSideHref: o } = v(), s = (l = n.at(0)) == null ? void 0 : l.items;
361
+ return /* @__PURE__ */ e(
362
+ "nav",
363
+ {
364
+ className: a.navbar,
365
+ "aria-label": "Bottenmeny",
366
+ children: s && /* @__PURE__ */ e("ul", { className: x(a.navbarList), children: t ? /* @__PURE__ */ e(
367
+ S,
368
+ {
369
+ navigate: t,
370
+ useHref: o,
371
+ children: /* @__PURE__ */ e(I, { items: s })
372
+ }
373
+ ) : /* @__PURE__ */ e(I, { items: s }) })
374
+ }
375
+ );
376
+ }, I = ({
377
+ items: n
378
+ }) => /* @__PURE__ */ e(P, { children: n.map(({ href: t, active: o, icon: s, title: l, hasBadge: c }, r) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
379
+ k,
380
+ {
381
+ href: t,
382
+ className: x(a.navbarItem),
383
+ "data-active": o,
384
+ "aria-current": o && "page",
385
+ children: [
386
+ /* @__PURE__ */ i(C, { children: [
387
+ /* @__PURE__ */ e(s, { size: 20 }),
388
+ c && /* @__PURE__ */ e(y, {})
389
+ ] }),
390
+ l
391
+ ]
392
+ }
393
+ ) }, r)) }), d = ({
394
+ items: n,
395
+ title: t,
396
+ user: o,
397
+ app: s,
398
+ children: l,
399
+ headerChildren: c,
400
+ clientSideRouter: r,
401
+ clientSideHref: h,
402
+ variant: p
403
+ }) => {
404
+ const [m, _] = u.useState(!1), [b, N] = u.useState(!1);
405
+ return p === "external" ? /* @__PURE__ */ e(
406
+ d.Provider,
407
+ {
408
+ items: n,
409
+ title: t,
410
+ user: o,
411
+ app: s,
412
+ clientSideRouter: r,
413
+ clientSideHref: h,
414
+ headerChildren: c,
415
+ isCollapsed: m,
416
+ setIsCollapsed: _,
417
+ variant: p,
418
+ children: /* @__PURE__ */ i("div", { className: a.baseLayout, children: [
419
+ /* @__PURE__ */ e(T, {}),
420
+ /* @__PURE__ */ e(d.Header, {}),
421
+ /* @__PURE__ */ i("div", { className: a.mainContent, children: [
422
+ /* @__PURE__ */ e(d.Sidebar, {}),
423
+ /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: l }) }) }),
424
+ /* @__PURE__ */ e(d.Backdrop, {})
425
+ ] }),
426
+ /* @__PURE__ */ e("div", { className: a.navbarWrapper, children: /* @__PURE__ */ e(d.Navbar, {}) })
427
+ ] })
428
+ }
429
+ ) : /* @__PURE__ */ e(
430
+ d.Provider,
431
+ {
432
+ items: n,
433
+ title: t,
434
+ user: o,
435
+ app: s,
436
+ clientSideRouter: r,
437
+ clientSideHref: h,
438
+ headerChildren: c,
439
+ isCollapsed: m,
440
+ setIsCollapsed: _,
441
+ isOpened: b,
442
+ setIsOpened: N,
443
+ variant: p,
444
+ children: /* @__PURE__ */ i("div", { className: a.baseLayout, children: [
445
+ /* @__PURE__ */ e(T, {}),
446
+ /* @__PURE__ */ e(d.Header, {}),
447
+ /* @__PURE__ */ i("div", { className: a.mainContent, children: [
448
+ /* @__PURE__ */ e(d.Sidebar, {}),
449
+ /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: l }) }) }),
450
+ /* @__PURE__ */ e(d.Backdrop, {})
451
+ ] })
452
+ ] })
453
+ }
454
+ );
455
+ };
456
+ d.Provider = Le;
457
+ d.Header = Ee;
458
+ d.Sidebar = ge;
459
+ d.SidebarLink = w;
460
+ d.Navbar = Ie;
461
+ d.Backdrop = Te;
462
+ export {
463
+ Ee as H,
464
+ d as L,
465
+ Ie as N,
466
+ ge as S,
467
+ w as a
468
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";require('./assets/Link.css');const n=require("react/jsx-runtime"),j=require("./Link-BQhauBuw.cjs"),_=require("./clsx-C11secjj.cjs"),q=require("./createLucideIcon-Cg_wkoIA.cjs"),k=require("./square-arrow-out-up-right-V4Gd08uI.cjs"),w=require("./arrow-right-QJ2gXPKQ.cjs");/**
2
+ * @license lucide-react v0.453.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const f=q.createLucideIcon("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),L="_link_txq8j_4",p="_icon_txq8j_50",g="_standalone_txq8j_54",m="_stretched_txq8j_71",t={link:L,icon:p,standalone:g,stretched:m},A=({children:s,standalone:r,target:i,stretched:o,download:a,icon:c,className:u,as:l,...d})=>{const x=l||j.$4f118338184dc1d9$export$a6c7ac8248d6e38a,h=({...e})=>c?n.jsx(c,{...e}):a?n.jsx(f,{...e}):i==="_blank"?n.jsx(k.SquareArrowOutUpRight,{...e}):r?n.jsx(w.ArrowRight,{...e}):null;return n.jsx(x,{className:_.clsx(t.link,r&&t.standalone,o&&t.stretched,u),...d,children:n.jsxs(n.Fragment,{children:[s,n.jsx(h,{size:16,className:t.icon})]})})};exports.Link=A;
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./utils-BNtZbAib.cjs"),x=require("react"),T=require("./filterDOMProps-BS2lrgFA.cjs"),f=require("./usePress-0AjDbW9R.cjs"),m=require("./useFocusable-NUVSFcRC.cjs"),F=require("./useHover-_mv5J4_q.cjs"),q=require("./useFocusRing-CbImDrwF.cjs");function E(s,e){let{elementType:d="a",onPress:c,onPressStart:u,onPressEnd:o,onClick:$,isDisabled:t,...b}=s,i={};d!=="a"&&(i={role:"link",tabIndex:t?void 0:0});let{focusableProps:l}=m.$f645667febf57a63$export$4c014de7c8940b4c(s,e),{pressProps:a,isPressed:p}=f.$f6c31cce2adf654f$export$45712eceda6fad21({onPress:c,onPressStart:u,onPressEnd:o,onClick:$,isDisabled:t,ref:e}),h=T.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(b,{labelable:!0}),D=n.$3ef42575df84b30b$export$9d1611c77c2fe928(l,a),v=f.$ea8dcbcb9ea1b556$export$9a302a45f65d0572(),C=f.$ea8dcbcb9ea1b556$export$7e924b3091a3bd18(s);return{isPressed:p,linkProps:n.$3ef42575df84b30b$export$9d1611c77c2fe928(h,C,{...D,...i,"aria-disabled":t||void 0,"aria-current":s["aria-current"],onClick:r=>{var P;(P=a.onClick)===null||P===void 0||P.call(a,r),!v.isNative&&r.currentTarget instanceof HTMLAnchorElement&&r.currentTarget.href&&!r.isDefaultPrevented()&&f.$ea8dcbcb9ea1b556$export$efa8c9099e530235(r.currentTarget,r)&&s.href&&(r.preventDefault(),v.open(r.currentTarget,r,s.href,s.routerOptions))}})}}const k=x.createContext(null),H=x.forwardRef(function(e,d){[e,d]=n.$64fa3d84918910a7$export$29f1550f4b0d4415(e,d,k);let c=e.href&&!e.isDisabled?"a":"span",{linkProps:u,isPressed:o}=E({...e,elementType:c},d),{hoverProps:$,isHovered:t}=F.$6179b936705e76d3$export$ae780daf29e6d456(e),{focusProps:b,isFocused:i,isFocusVisible:l}=q.$f7dceffc5ad7768b$export$4e328f61c538687f(),a=n.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:o,isHovered:t,isFocused:i,isFocusVisible:l}});return x.createElement(c,{ref:d,slot:e.slot||void 0,...n.$3ef42575df84b30b$export$9d1611c77c2fe928(a,u,$,b),"data-focused":i||void 0,"data-hovered":t||void 0,"data-pressed":o||void 0,"data-focus-visible":l||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},a.children)});exports.$4f118338184dc1d9$export$a6c7ac8248d6e38a=H;exports.$4f118338184dc1d9$export$e2509388b49734e7=k;
@@ -0,0 +1,59 @@
1
+ import { jsx as t, jsxs as p, Fragment as h } from "react/jsx-runtime";
2
+ import { $ as u } from "./Link-yNO2-sqx.js";
3
+ import { c as x } from "./clsx-OuTLNxxd.js";
4
+ import { c as k } from "./createLucideIcon-DeWljiyi.js";
5
+ import { S as j } from "./square-arrow-out-up-right-BkyqV2PN.js";
6
+ import { A as w } from "./arrow-right-Dg8sttFO.js";
7
+ import './assets/Link.css';/**
8
+ * @license lucide-react v0.453.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */
13
+ const q = k("ArrowDownToLine", [
14
+ ["path", { d: "M12 17V3", key: "1cwfxf" }],
15
+ ["path", { d: "m6 11 6 6 6-6", key: "12ii2o" }],
16
+ ["path", { d: "M19 21H5", key: "150jfl" }]
17
+ ]), A = "_link_txq8j_4", L = "_icon_txq8j_50", y = "_standalone_txq8j_54", $ = "_stretched_txq8j_71", o = {
18
+ link: A,
19
+ icon: L,
20
+ standalone: y,
21
+ stretched: $
22
+ }, T = ({
23
+ children: c,
24
+ standalone: r,
25
+ target: i,
26
+ stretched: s,
27
+ download: a,
28
+ icon: e,
29
+ className: l,
30
+ as: d,
31
+ ...m
32
+ }) => {
33
+ const f = d || u, _ = ({ ...n }) => e ? /* @__PURE__ */ t(e, { ...n }) : a ? /* @__PURE__ */ t(q, { ...n }) : i === "_blank" ? /* @__PURE__ */ t(j, { ...n }) : r ? /* @__PURE__ */ t(w, { ...n }) : null;
34
+ return /* @__PURE__ */ t(
35
+ f,
36
+ {
37
+ className: x(
38
+ o.link,
39
+ r && o.standalone,
40
+ s && o.stretched,
41
+ l
42
+ ),
43
+ ...m,
44
+ children: /* @__PURE__ */ p(h, { children: [
45
+ c,
46
+ /* @__PURE__ */ t(
47
+ _,
48
+ {
49
+ size: 16,
50
+ className: o.icon
51
+ }
52
+ )
53
+ ] })
54
+ }
55
+ );
56
+ };
57
+ export {
58
+ T as L
59
+ };
@@ -0,0 +1,71 @@
1
+ import { c as b, a as v, b as h } from "./utils-DIMfEPAt.js";
2
+ import C, { forwardRef as D, createContext as T } from "react";
3
+ import { $ as E } from "./filterDOMProps-D6KHYVBX.js";
4
+ import { a as F, b as H, c as g, d as y } from "./usePress-CNjmDzap.js";
5
+ import { $ as L } from "./useFocusable-C8uh8K4g.js";
6
+ import { $ as _ } from "./useHover-DjIHtjGN.js";
7
+ import { $ as S } from "./useFocusRing-XnR3cZjO.js";
8
+ function V(s, e) {
9
+ let { elementType: a = "a", onPress: n, onPressStart: l, onPressEnd: o, onClick: f, isDisabled: t, ...$ } = s, i = {};
10
+ a !== "a" && (i = {
11
+ role: "link",
12
+ tabIndex: t ? void 0 : 0
13
+ });
14
+ let { focusableProps: c } = L(s, e), { pressProps: d, isPressed: m } = F({
15
+ onPress: n,
16
+ onPressStart: l,
17
+ onPressEnd: o,
18
+ onClick: f,
19
+ isDisabled: t,
20
+ ref: e
21
+ }), p = E($, {
22
+ labelable: !0
23
+ }), x = b(c, d), P = H(), k = g(s);
24
+ return {
25
+ isPressed: m,
26
+ linkProps: b(p, k, {
27
+ ...x,
28
+ ...i,
29
+ "aria-disabled": t || void 0,
30
+ "aria-current": s["aria-current"],
31
+ onClick: (r) => {
32
+ var u;
33
+ (u = d.onClick) === null || u === void 0 || u.call(d, r), !P.isNative && r.currentTarget instanceof HTMLAnchorElement && r.currentTarget.href && // If props are applied to a router Link component, it may have already prevented default.
34
+ !r.isDefaultPrevented() && y(r.currentTarget, r) && s.href && (r.preventDefault(), P.open(r.currentTarget, r, s.href, s.routerOptions));
35
+ }
36
+ })
37
+ };
38
+ }
39
+ const N = /* @__PURE__ */ T(null), q = /* @__PURE__ */ D(function(e, a) {
40
+ [e, a] = v(e, a, N);
41
+ let n = e.href && !e.isDisabled ? "a" : "span", { linkProps: l, isPressed: o } = V({
42
+ ...e,
43
+ elementType: n
44
+ }, a), { hoverProps: f, isHovered: t } = _(e), { focusProps: $, isFocused: i, isFocusVisible: c } = S(), d = h({
45
+ ...e,
46
+ defaultClassName: "react-aria-Link",
47
+ values: {
48
+ isCurrent: !!e["aria-current"],
49
+ isDisabled: e.isDisabled || !1,
50
+ isPressed: o,
51
+ isHovered: t,
52
+ isFocused: i,
53
+ isFocusVisible: c
54
+ }
55
+ });
56
+ return /* @__PURE__ */ C.createElement(n, {
57
+ ref: a,
58
+ slot: e.slot || void 0,
59
+ ...b(d, l, f, $),
60
+ "data-focused": i || void 0,
61
+ "data-hovered": t || void 0,
62
+ "data-pressed": o || void 0,
63
+ "data-focus-visible": c || void 0,
64
+ "data-current": !!e["aria-current"] || void 0,
65
+ "data-disabled": e.isDisabled || void 0
66
+ }, d.children);
67
+ });
68
+ export {
69
+ q as $,
70
+ N as a
71
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";require('./assets/LinkButton.css');const t=require("react/jsx-runtime"),f=require("./Link-BQhauBuw.cjs"),m=require("./clsx-C11secjj.cjs"),y=require("./square-arrow-out-up-right-V4Gd08uI.cjs"),x=require("./createLucideIcon-Cg_wkoIA.cjs"),g=require("./arrow-right-QJ2gXPKQ.cjs");/**
2
+ * @license lucide-react v0.453.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const h=x.createLucideIcon("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),z="_linkButton_qz9cn_4",L="_secondary_qz9cn_55",k="_icon_qz9cn_60",w="_tertiary_qz9cn_85",B="_danger_qz9cn_102",j="_iconBtn_qz9cn_119",p="_medium_qz9cn_141",A="_iconLeft_qz9cn_146",R="_fullwidth_qz9cn_150",n={linkButton:z,secondary:L,icon:k,tertiary:w,danger:B,iconBtn:j,medium:p,iconLeft:A,fullwidth:R},$=({children:i,variant:c,fullwidth:s,icon:r,iconPlacement:o,className:u,as:_,size:d="large",...a})=>{const l=_||f.$4f118338184dc1d9$export$a6c7ac8248d6e38a,q=({...e})=>r?t.jsx(r,{...e}):e.target==="_blank"?t.jsx(y.SquareArrowOutUpRight,{...e}):o==="left"?t.jsx(h,{...e}):t.jsx(g.ArrowRight,{...e});return t.jsxs(l,{className:m.clsx(n.linkButton,c==="primary"&&n.primary,c==="secondary"&&n.secondary,c==="tertiary"&&n.tertiary,c==="danger"&&n.danger,c==="icon"&&n.iconBtn,d==="medium"&&n.medium,s&&n.fullwidth,o==="left"&&n.iconLeft,u),...a,children:[i,t.jsx(q,{size:20,className:n.icon})]})};exports.LinkButton=$;