@midas-ds/components 10.4.0 → 10.4.1

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 (171) hide show
  1. package/{AccordionItem-BcsoC78F.cjs → AccordionItem-D2QYNgZS.cjs} +1 -1
  2. package/{AccordionItem-BqsgiVWV.js → AccordionItem-oeN1Cc09.js} +4 -4
  3. package/{Breadcrumbs-D7eoibWk.js → Breadcrumbs-D8ad6xvL.js} +1 -1
  4. package/{Breadcrumbs-CfW5IuyE.cjs → Breadcrumbs-DkJIkGG5.cjs} +1 -1
  5. package/{Button-BXY5ZhqI.cjs → Button-Dq6ugqxT.cjs} +1 -1
  6. package/{Button-BZUo7vsZ.js → Button-DtSrCAf6.js} +1 -1
  7. package/Button.module-D-mPLRxe.js +14 -0
  8. package/Button.module-goCEz5qs.cjs +1 -0
  9. package/CHANGELOG.md +13 -0
  10. package/{Card-BaWSgtSF.js → Card-BzJ_OEe6.js} +1 -1
  11. package/{Card-Cc1TNPcQ.cjs → Card-cdL5669N.cjs} +1 -1
  12. package/{CheckboxGroup-CUA8_xSx.js → CheckboxGroup-CcTfzurp.js} +1 -1
  13. package/{CheckboxGroup-DmUOM0xl.cjs → CheckboxGroup-DWxQTABg.cjs} +1 -1
  14. package/ColorSchemeSwitch-owUryjYz.cjs +16 -0
  15. package/{ColorSchemeSwitch-Cwono7Ap.js → ColorSchemeSwitch-y8qKczjQ.js} +42 -41
  16. package/{ComboBox-HLIAbb2q.js → ComboBox-CZyP8Dfh.js} +2 -2
  17. package/{ComboBox-BBC7jhnm.cjs → ComboBox-Dg2xhkLC.cjs} +1 -1
  18. package/{DateField-B3VjOSde.cjs → DateField-1w5J_iyF.cjs} +1 -1
  19. package/{DateField-CnLEi7uX.js → DateField-BTROlenJ.js} +1 -1
  20. package/{DateRangePicker-BPlZ12r8.cjs → DateRangePicker-CX3830ZF.cjs} +3 -3
  21. package/{DateRangePicker-CFOoGvut.js → DateRangePicker-DmZP9laM.js} +52 -52
  22. package/{Dialog-SqciohRY.js → Dialog-0ZBhhPyd.js} +2 -2
  23. package/{Dialog-pSSy1zwf.cjs → Dialog-DnMwnqiC.cjs} +1 -1
  24. package/{Dropdown-CkBp70BH.js → Dropdown-BEAMfAxj.js} +18 -18
  25. package/Dropdown-By91MEV2.cjs +6 -0
  26. package/{FileUpload-B4rv-wke.js → FileUpload-DvQdIZ6k.js} +3 -3
  27. package/{FileUpload-BwMhyLjG.cjs → FileUpload-vf0oJd0K.cjs} +1 -1
  28. package/{InfoBanner-CVry6Y8i.cjs → InfoBanner-CzwbOdRG.cjs} +1 -1
  29. package/{InfoBanner-CBUoad7A.js → InfoBanner-yj90XVEP.js} +5 -5
  30. package/{Label-TVxwGZ-O.js → Label-D2GmP8_2.js} +2 -2
  31. package/{Label-CNmTN1YY.cjs → Label-E3LhQfNv.cjs} +1 -1
  32. package/{Layout-amz9BESl.js → Layout-BMNgqjXv.js} +96 -96
  33. package/Layout-Ri7XQHFp.cjs +16 -0
  34. package/Link-BCVI5W_i.js +59 -0
  35. package/Link-CVvnCOGP.cjs +6 -0
  36. package/LinkButton-B6AWNiRn.cjs +6 -0
  37. package/LinkButton-Cui-gvAk.js +69 -0
  38. package/{ProgressBar-BNCjpcv8.js → ProgressBar-Bpq-hyZa.js} +1 -1
  39. package/{ProgressBar-CcbxcWdT.cjs → ProgressBar-D4lOEhAh.cjs} +1 -1
  40. package/{Radio-CZYibh9r.js → Radio-BPcq9kW5.js} +1 -1
  41. package/{Radio-B2zfEFdq.cjs → Radio-CwNbUGah.cjs} +1 -1
  42. package/{RangeCalendar-B16b6tJD.js → RangeCalendar-6miAJVoO.js} +96 -100
  43. package/{RangeCalendar-C1LFeOVk.cjs → RangeCalendar-CAI1PRDo.cjs} +5 -5
  44. package/{SearchField-giwECmXS.js → SearchField-CDyD5iWr.js} +45 -45
  45. package/SearchField-DEoGi9xv.cjs +6 -0
  46. package/{Select-mwaAv20X.js → Select-B2wYDnAU.js} +5 -5
  47. package/{Select-DKey6CeS.cjs → Select-nRN944QZ.cjs} +1 -1
  48. package/Spinner-VSyPhiJ9.js +51 -0
  49. package/Spinner-vof0Y9Hh.cjs +6 -0
  50. package/{TabList-7VtCiXxX.cjs → TabList-CheXtBJm.cjs} +1 -1
  51. package/{TabList-CthsM5h6.js → TabList-D0qzIjSx.js} +84 -84
  52. package/{Table-DkvNp6xm.cjs → Table-DAhnYYIA.cjs} +7 -7
  53. package/{Table-BcQPvJT3.js → Table-zKvjzd9t.js} +28 -28
  54. package/{Tag-Bs8T2Ei7.js → Tag-BoqT5nbh.js} +30 -30
  55. package/{Tag-CFWZ2LQW.cjs → Tag-t-aJVo3W.cjs} +1 -1
  56. package/{TextArea-XJDfeXRs.cjs → TextArea-B5und61h.cjs} +1 -1
  57. package/{TextArea-DBNAVWqL.js → TextArea-Pxr-eLXe.js} +2 -2
  58. package/{Toast-l1bKo2oA.cjs → Toast-DdmSvNaO.cjs} +1 -1
  59. package/{Toast-DPPvPhrF.js → Toast-DfKiA5hp.js} +5 -5
  60. package/{ToggleButtonGroup-DH8IgR4G.cjs → ToggleButtonGroup-DZ_wo0qx.cjs} +1 -1
  61. package/{ToggleButtonGroup-HOWNWtQZ.js → ToggleButtonGroup-DhlfvYGg.js} +1 -1
  62. package/accordion/index.cjs +1 -1
  63. package/accordion/index.js +1 -1
  64. package/arrow-right-BGd86zzR.cjs +6 -0
  65. package/{arrow-right-Dg8sttFO.js → arrow-right-uemUGIg8.js} +5 -5
  66. package/assets/Button.css +1 -1
  67. package/assets/LinkButton.css +1 -1
  68. package/assets/TabList.css +1 -1
  69. package/assets/Tag.css +1 -1
  70. package/breadcrumbs/index.cjs +1 -1
  71. package/breadcrumbs/index.js +1 -1
  72. package/button/index.cjs +1 -1
  73. package/button/index.js +1 -1
  74. package/calendar/index.cjs +1 -1
  75. package/calendar/index.js +1 -1
  76. package/card/Card.d.ts +1 -1
  77. package/card/index.cjs +1 -1
  78. package/card/index.js +1 -1
  79. package/check-B0aKTFe5.cjs +6 -0
  80. package/check-B5h1DvDs.js +11 -0
  81. package/checkbox/index.cjs +1 -1
  82. package/checkbox/index.js +1 -1
  83. package/chevron-down-5hFlg_lR.cjs +6 -0
  84. package/chevron-down-DmZMdOiC.js +11 -0
  85. package/{circle-check-B9HYcH7Z.js → circle-check-BErh6TKu.js} +9 -9
  86. package/circle-check-OVUGxwp9.cjs +11 -0
  87. package/color-scheme-switch/index.cjs +1 -1
  88. package/color-scheme-switch/index.js +1 -1
  89. package/combobox/index.cjs +1 -1
  90. package/combobox/index.js +1 -1
  91. package/createLucideIcon-CTVXwe6i.cjs +21 -0
  92. package/createLucideIcon-XRdN60yz.js +94 -0
  93. package/date-field/index.cjs +1 -1
  94. package/date-field/index.js +1 -1
  95. package/date-picker/index.cjs +1 -1
  96. package/date-picker/index.js +1 -1
  97. package/dropdown/index.cjs +1 -1
  98. package/dropdown/index.js +1 -1
  99. package/file-upload/index.cjs +1 -1
  100. package/file-upload/index.js +1 -1
  101. package/index.cjs +1 -1
  102. package/index.js +29 -29
  103. package/{info-BZwphdye.js → info-CPK1vbOJ.js} +5 -5
  104. package/info-Dj6SyPex.cjs +6 -0
  105. package/info-banner/index.cjs +1 -1
  106. package/info-banner/index.js +1 -1
  107. package/label/index.cjs +1 -1
  108. package/label/index.js +1 -1
  109. package/layout/index.cjs +1 -1
  110. package/layout/index.js +1 -1
  111. package/link/Link.d.ts +1 -1
  112. package/link/index.cjs +1 -1
  113. package/link/index.js +1 -1
  114. package/link-button/LinkButton.d.ts +1 -1
  115. package/link-button/index.cjs +1 -1
  116. package/link-button/index.js +1 -1
  117. package/modal/index.cjs +1 -1
  118. package/modal/index.js +1 -1
  119. package/package.json +1 -1
  120. package/progress-bar/index.cjs +1 -1
  121. package/progress-bar/index.js +1 -1
  122. package/radio/index.cjs +1 -1
  123. package/radio/index.js +1 -1
  124. package/search-field/index.cjs +1 -1
  125. package/search-field/index.js +1 -1
  126. package/select/index.cjs +1 -1
  127. package/select/index.js +1 -1
  128. package/spinner/index.cjs +1 -1
  129. package/spinner/index.js +1 -1
  130. package/{square-arrow-out-up-right-BkyqV2PN.js → square-arrow-out-up-right-ok0A3Ovo.js} +4 -4
  131. package/square-arrow-out-up-right-xCFdJTzY.cjs +6 -0
  132. package/table/index.cjs +1 -1
  133. package/table/index.js +1 -1
  134. package/tabs/index.cjs +1 -1
  135. package/tabs/index.js +1 -1
  136. package/tag/index.cjs +1 -1
  137. package/tag/index.js +1 -1
  138. package/textfield/index.cjs +1 -1
  139. package/textfield/index.js +1 -1
  140. package/toast/index.cjs +1 -1
  141. package/toast/index.js +1 -1
  142. package/toggle-button/index.cjs +1 -1
  143. package/toggle-button/index.js +1 -1
  144. package/{triangle-alert-wxyxspAl.js → triangle-alert-B_qAPmWC.js} +5 -5
  145. package/triangle-alert-BviJNFjf.cjs +6 -0
  146. package/{x-JK7i-TQC.js → x-C2xUHAEl.js} +5 -5
  147. package/x-rV-nu490.cjs +6 -0
  148. package/Button.module-DEQtBYe5.cjs +0 -1
  149. package/Button.module-tti8HGxs.js +0 -14
  150. package/ColorSchemeSwitch-DDXdSzqg.cjs +0 -16
  151. package/Dropdown-DAsVShlt.cjs +0 -6
  152. package/Layout-Dw-oCqxd.cjs +0 -16
  153. package/Link-D92ftFi2.cjs +0 -6
  154. package/Link-DegonJfl.js +0 -59
  155. package/LinkButton-CckYzfJ8.js +0 -69
  156. package/LinkButton-DKZ4z6zu.cjs +0 -6
  157. package/SearchField-CML0kjtn.cjs +0 -6
  158. package/Spinner-CbJ6YAz-.js +0 -53
  159. package/Spinner-yHcy8YHC.cjs +0 -6
  160. package/arrow-right-QJ2gXPKQ.cjs +0 -6
  161. package/check-CLF6Yxza.js +0 -11
  162. package/check-D_KoootC.cjs +0 -6
  163. package/chevron-down-Cd1bkzXT.js +0 -13
  164. package/chevron-down-jl83cllc.cjs +0 -6
  165. package/circle-check-BGo8gML8.cjs +0 -11
  166. package/createLucideIcon-Cg_wkoIA.cjs +0 -21
  167. package/createLucideIcon-DeWljiyi.js +0 -79
  168. package/info-CIEIENo6.cjs +0 -6
  169. package/square-arrow-out-up-right-V4Gd08uI.cjs +0 -6
  170. package/triangle-alert-DJW8U7jL.cjs +0 -6
  171. package/x-H8Zrx8-x.cjs +0 -6
@@ -0,0 +1,51 @@
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { c as a } from "./clsx-OuTLNxxd.js";
3
+ import { c } from "./createLucideIcon-XRdN60yz.js";
4
+ import { $ as d } from "./VisuallyHidden-CYfmTSCD.js";
5
+ import { u as l } from "./useLocalizedStringFormatter-N0AyjzbM.js";
6
+ import './assets/Spinner.css';/**
7
+ * @license lucide-react v0.525.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
+ */
12
+ const m = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], p = c("loader-circle", m), _ = "_container_3nw95_4", f = "_spinner_3nw95_8", g = "_dark_3nw95_18", e = {
13
+ container: _,
14
+ spinner: f,
15
+ dark: g
16
+ }, k = {
17
+ loadingPleaseWait: "Loading, please wait..."
18
+ }, u = {
19
+ loadingPleaseWait: "Laddar, vänligen vänta..."
20
+ }, h = {
21
+ en: k,
22
+ sv: u
23
+ }, S = ({
24
+ small: n,
25
+ isOnColor: r = !1,
26
+ className: t
27
+ }) => {
28
+ const o = l(h);
29
+ return /* @__PURE__ */ i(
30
+ "div",
31
+ {
32
+ className: a(e.container, t),
33
+ role: "status",
34
+ children: [
35
+ /* @__PURE__ */ s(
36
+ p,
37
+ {
38
+ className: a(e.spinner, r && e.dark),
39
+ size: n ? 16 : 32,
40
+ strokeWidth: n ? 2 : 3,
41
+ absoluteStrokeWidth: !0
42
+ }
43
+ ),
44
+ /* @__PURE__ */ s(d, { children: o.format("loadingPleaseWait") })
45
+ ]
46
+ }
47
+ );
48
+ };
49
+ export {
50
+ S
51
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";require('./assets/Spinner.css');const e=require("react/jsx-runtime"),t=require("./clsx-C11secjj.cjs"),c=require("./createLucideIcon-CTVXwe6i.cjs"),o=require("./VisuallyHidden-Doyzl0F7.cjs"),d=require("./useLocalizedStringFormatter-BO2iZEL0.cjs");/**
2
+ * @license lucide-react v0.525.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 l=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],u=c.createLucideIcon("loader-circle",l),_="_container_3nw95_4",g="_spinner_3nw95_8",p="_dark_3nw95_18",n={container:_,spinner:g,dark:p},x={loadingPleaseWait:"Loading, please wait..."},k={loadingPleaseWait:"Laddar, vänligen vänta..."},L={en:x,sv:k},m=({small:s,isOnColor:r=!1,className:a})=>{const i=d.useLocalizedStringFormatter(L);return e.jsxs("div",{className:t.clsx(n.container,a),role:"status",children:[e.jsx(u,{className:t.clsx(n.spinner,r&&n.dark),size:s?16:32,strokeWidth:s?2:3,absoluteStrokeWidth:!0}),e.jsx(o.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:i.format("loadingPleaseWait")})]})};exports.Spinner=m;
@@ -1 +1 @@
1
- "use strict";require('./assets/TabList.css');const h=require("react/jsx-runtime"),o=require("react"),g=require("./clsx-C11secjj.cjs"),V=require("./useObserveElement-MhzEsCkX.cjs"),A=require("./tokens-BghDnMdO.cjs"),x=require("./Collection-BtBX5IMY.cjs"),$=require("./utils-DHNZrQmj.cjs"),z=require("./Hidden-BxRZGdEW.cjs"),v=require("./mergeProps-B5KXZAI3.cjs"),S=require("./filterDOMProps-BS2lrgFA.cjs"),q=require("./inertValue-B3AFhVG4.cjs"),_=require("./usePress-BooY_CAy.cjs"),B=require("./useFocusable-D7I1ujkW.cjs"),I=require("./SelectionManager-D0jYUYcy.cjs"),L=require("./useLabels-CSU0kbtJ.cjs"),W=require("./useHasTabbableChild-CoQRpNbC.cjs"),U=require("./context-Df3XbgBG.cjs"),T=require("./useFocusRing-B-A1OLhU.cjs"),G=require("./useHover-BE_XKZKe.cjs"),J=require("./useSingleSelectListState-BPhlCU26.cjs");function Q(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const C=Q(o),O=new WeakMap;function D(i,e,t){return i?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${O.get(i)}-${t}-${e}`):""}function X(i,e,t){let{key:n,isDisabled:a,shouldSelectOnPressUp:d}=i,{selectionManager:l,selectedKey:c}=e,r=n===c,s=a||e.isDisabled||e.selectionManager.isDisabled(n),{itemProps:u,isPressed:f}=I.$880e95eb8b93ba9a$export$ecf600387e221c37({selectionManager:l,key:n,ref:t,isDisabled:s,shouldSelectOnPressUp:d,linkBehavior:"selection"}),b=D(e,n,"tab"),m=D(e,n,"tabpanel"),{tabIndex:K}=u,p=e.collection.getItem(n),E=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(p==null?void 0:p.props,{labelable:!0});delete E.id;let N=_.$ea8dcbcb9ea1b556$export$7e924b3091a3bd18(p==null?void 0:p.props),{focusableProps:H}=B.$f645667febf57a63$export$4c014de7c8940b4c({isDisabled:s},t);return{tabProps:v.$3ef42575df84b30b$export$9d1611c77c2fe928(E,H,N,u,{id:b,"aria-selected":r,"aria-disabled":s||void 0,"aria-controls":r?m:void 0,tabIndex:s?void 0:K,role:"tab"}),isSelected:r,isDisabled:s,isPressed:f}}function Y(i,e,t){let n=W.$83013635b024ae3d$export$eac1895992b9f3d6(t)?void 0:0;var a;const d=D(e,(a=i.id)!==null&&a!==void 0?a:e==null?void 0:e.selectedKey,"tabpanel"),l=L.$313b98861ee5dd6c$export$d6875122194c7b44({...i,id:d,"aria-labelledby":D(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:v.$3ef42575df84b30b$export$9d1611c77c2fe928(l,{tabIndex:n,role:"tabpanel","aria-describedby":i["aria-describedby"],"aria-details":i["aria-details"]})}}class Z{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var t,n;return this.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))===null||n===void 0||(t=n.props)===null||t===void 0)&&t.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(t!=null&&this.isDisabled(t));return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(t!=null&&this.isDisabled(t));return t}constructor(e,t,n,a=new Set){this.collection=e,this.flipDirection=t==="rtl"&&n==="horizontal",this.disabledKeys=a,this.tabDirection=n==="horizontal"}}function ee(i,e,t){let{orientation:n="horizontal",keyboardActivation:a="automatic"}=i,{collection:d,selectionManager:l,disabledKeys:c}=e,{direction:r}=U.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),s=o.useMemo(()=>new Z(d,r,n,c),[d,c,n,r]),{collectionProps:u}=I.$ae20dd8cbca75726$export$d6daf82dcd84e87c({ref:t,selectionManager:l,keyboardDelegate:s,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:t,linkBehavior:"selection"}),f=v.$bdb11010cef70236$export$f680877a34711e37();O.set(e,f);let b=L.$313b98861ee5dd6c$export$d6875122194c7b44({...i,id:f});return{tabListProps:{...v.$3ef42575df84b30b$export$9d1611c77c2fe928(u,b),role:"tablist","aria-orientation":n,tabIndex:void 0}}}function te(i){var e,t;let n=J.$a0d645289fe9b86b$export$e7f05e985daf4b5f({...i,onSelectionChange:i.onSelectionChange?r=>{var s;r!=null&&((s=i.onSelectionChange)===null||s===void 0||s.call(i,r))}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:(t=(e=i.defaultSelectedKey)!==null&&e!==void 0?e:w(i.collection,i.disabledKeys?new Set(i.disabledKeys):new Set))!==null&&t!==void 0?t:void 0}),{selectionManager:a,collection:d,selectedKey:l}=n,c=o.useRef(l);return o.useEffect(()=>{let r=l;i.selectedKey==null&&(a.isEmpty||r==null||!d.getItem(r))&&(r=w(d,n.disabledKeys),r!=null&&a.setSelectedKeys([r])),(r!=null&&a.focusedKey==null||!a.isFocused&&r!==c.current)&&a.setFocusedKey(r),c.current=r}),{...n,isDisabled:i.isDisabled||!1}}function w(i,e){let t=null;if(i){var n,a,d,l;for(t=i.getFirstKey();t!=null&&(e.has(t)||!((a=i.getItem(t))===null||a===void 0||(n=a.props)===null||n===void 0)&&n.isDisabled)&&t!==i.getLastKey();)t=i.getKeyAfter(t);t!=null&&(e.has(t)||!((l=i.getItem(t))===null||l===void 0||(d=l.props)===null||d===void 0)&&d.isDisabled)&&t===i.getLastKey()&&(t=i.getFirstKey())}return t}const F=o.createContext(null),y=o.createContext(null),M=o.forwardRef(function(e,t){[e,t]=$.$64fa3d84918910a7$export$29f1550f4b0d4415(e,t,F);let{children:n,orientation:a="horizontal"}=e;return n=o.useMemo(()=>typeof n=="function"?n({orientation:a,defaultChildren:null}):n,[n,a]),o.createElement(x.$e1995378a142960e$export$bf788dd355e3a401,{content:n},d=>o.createElement(ie,{props:e,collection:d,tabsRef:t}))});function ie({props:i,tabsRef:e,collection:t}){let{orientation:n="horizontal"}=i,a=te({...i,collection:t,children:void 0}),{focusProps:d,isFocused:l,isFocusVisible:c}=T.$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),r=o.useMemo(()=>({orientation:n,isFocusWithin:l,isFocusVisible:c}),[n,l,c]),s=$.$64fa3d84918910a7$export$4d86445c2cf5e3({...i,defaultClassName:"react-aria-Tabs",values:r});return o.createElement("div",{...S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(i),...d,...s,ref:e,slot:i.slot||void 0,"data-focused":l||void 0,"data-orientation":n,"data-focus-visible":c||void 0,"data-disabled":a.isDisabled||void 0},o.createElement($.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[F,i],[y,a]]},s.children))}const ne=o.forwardRef(function(e,t){return o.useContext(y)?o.createElement(ae,{props:e,forwardedRef:t}):o.createElement(x.$e1995378a142960e$export$fb8073518f34e6ec,e)});function ae({props:i,forwardedRef:e}){let t=o.useContext(y),{CollectionRoot:n}=o.useContext(x.$7135fc7d473fd974$export$4feb769f8ddf26c5),{orientation:a="horizontal",keyboardActivation:d="automatic"}=$.$64fa3d84918910a7$export$fabf2dc03a41866e(F),l=$.$df56164dff5785e2$export$4338b53315abf666(e),{tabListProps:c}=ee({...i,orientation:a,keyboardActivation:d},t,l),r=$.$64fa3d84918910a7$export$4d86445c2cf5e3({...i,children:null,defaultClassName:"react-aria-TabList",values:{orientation:a,state:t}}),s=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(i);return delete s.id,o.createElement("div",{...s,...c,ref:l,...r,"data-orientation":a||void 0},o.createElement(n,{collection:t.collection,persistedKeys:x.$7135fc7d473fd974$export$90e00781bc59d8f9(t.selectionManager.focusedKey)}))}const se=x.$e1995378a142960e$export$18af5c7a9e9b3664("item",(i,e,t)=>{let n=o.useContext(y),a=$.$df56164dff5785e2$export$4338b53315abf666(e),{tabProps:d,isSelected:l,isDisabled:c,isPressed:r}=X({key:t.key,...i},n,a),{focusProps:s,isFocused:u,isFocusVisible:f}=T.$f7dceffc5ad7768b$export$4e328f61c538687f(),{hoverProps:b,isHovered:m}=G.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:c,onHoverStart:i.onHoverStart,onHoverEnd:i.onHoverEnd,onHoverChange:i.onHoverChange}),K=$.$64fa3d84918910a7$export$4d86445c2cf5e3({...i,id:void 0,children:t.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:l,isDisabled:c,isFocused:u,isFocusVisible:f,isPressed:r,isHovered:m}}),p=t.props.href?"a":"div";return o.createElement(p,{...v.$3ef42575df84b30b$export$9d1611c77c2fe928(d,s,b,K),ref:a,"data-selected":l||void 0,"data-disabled":c||void 0,"data-focused":u||void 0,"data-focus-visible":f||void 0,"data-pressed":r||void 0,"data-hovered":m||void 0},K.children)}),re=z.$f39a9eba43920ace$export$86427a43e3e48ebb(function(e,t){const n=o.useContext(y);let a=$.$df56164dff5785e2$export$4338b53315abf666(t),{tabPanelProps:d}=Y(e,n,a),{focusProps:l,isFocused:c,isFocusVisible:r}=T.$f7dceffc5ad7768b$export$4e328f61c538687f(),s=n.selectedKey===e.id,u=$.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:c,isFocusVisible:r,isInert:q.$cdc5a6778b766db2$export$a9d04c5684123369(!s),state:n}});if(!s&&!e.shouldForceMount)return null;let f=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e);delete f.id;let b=s?v.$3ef42575df84b30b$export$9d1611c77c2fe928(f,d,l,u):u;return o.createElement("div",{...b,ref:a,"data-focused":c||void 0,"data-focus-visible":r||void 0,inert:q.$cdc5a6778b766db2$export$a9d04c5684123369(!s),"data-inert":s?void 0:"true"},o.createElement($.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[F,null],[y,null]]},o.createElement(x.$7135fc7d473fd974$export$4feb769f8ddf26c5.Provider,{value:x.$7135fc7d473fd974$export$a164736487e3f0ae},u.children)))}),le="_container_iuog5_4",oe="_list_iuog5_8",de="_listItem_iuog5_14",ce="_panel_iuog5_56",P={container:le,list:oe,listItem:de,panel:ce},ue=({tabs:i,label:e,children:t,className:n,...a})=>{const{width:d}=V.useObserveElement(typeof document>"u"?null:document.body,{includePadding:!0}),l=a.orientation||d>=A.windowSizes.sm?"horizontal":"vertical";if(!(i!=null&&i.length))return h.jsx(M,{...a,orientation:l,className:g.clsx(P.container,n),children:t});if(typeof t=="function")return console.error('Only the declarative API supports passing a function to children, replace the "tabs" prop according to the documentation: https://designsystem.migrationsverket.se/components/tabs/ '),null;const c=C.Children.toArray(t);if(c.length!==i.length)return console.error(`The number of children must match the number of tabs. Children: ${c.length} Tabs: ${i.length}`),null;const r=c.reduce((s,u,f)=>{if(C.isValidElement(u)){const b=i[f];b&&(s[b]=C.cloneElement(u,{id:b}))}return s},{});return h.jsxs(M,{...a,orientation:l,className:g.clsx(P.container,n),children:[h.jsx(j,{"aria-label":e,children:i.map(s=>h.jsx(R,{id:s,children:s},s))}),i.map(s=>h.jsx(k,{id:s,children:r[s]},s))]})},R=({className:i,...e})=>h.jsx(se,{...e,className:g.clsx(P.listItem,i)}),k=({className:i,...e})=>h.jsx(re,{className:g.clsx(P.panel,i),...e}),j=({className:i,...e})=>h.jsx(ne,{className:g.clsx(P.list,i),...e});exports.Tab=R;exports.TabList=j;exports.TabPanel=k;exports.Tabs=ue;
1
+ "use strict";require('./assets/TabList.css');const h=require("react/jsx-runtime"),d=require("react"),g=require("./clsx-C11secjj.cjs"),V=require("./useObserveElement-MhzEsCkX.cjs"),A=require("./tokens-BghDnMdO.cjs"),x=require("./Collection-BtBX5IMY.cjs"),$=require("./utils-DHNZrQmj.cjs"),z=require("./Hidden-BxRZGdEW.cjs"),v=require("./mergeProps-B5KXZAI3.cjs"),S=require("./filterDOMProps-BS2lrgFA.cjs"),E=require("./inertValue-B3AFhVG4.cjs"),_=require("./usePress-BooY_CAy.cjs"),B=require("./useFocusable-D7I1ujkW.cjs"),I=require("./SelectionManager-D0jYUYcy.cjs"),L=require("./useLabels-CSU0kbtJ.cjs"),W=require("./useHasTabbableChild-CoQRpNbC.cjs"),U=require("./context-Df3XbgBG.cjs"),w=require("./useFocusRing-B-A1OLhU.cjs"),G=require("./useHover-BE_XKZKe.cjs"),J=require("./useSingleSelectListState-BPhlCU26.cjs");function Q(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const C=Q(d),O=new WeakMap;function D(i,e,t){return i?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${O.get(i)}-${t}-${e}`):""}function X(i,e,t){let{key:n,isDisabled:a,shouldSelectOnPressUp:o}=i,{selectionManager:l,selectedKey:c}=e,r=n===c,s=a||e.isDisabled||e.selectionManager.isDisabled(n),{itemProps:u,isPressed:f}=I.$880e95eb8b93ba9a$export$ecf600387e221c37({selectionManager:l,key:n,ref:t,isDisabled:s,shouldSelectOnPressUp:o,linkBehavior:"selection"}),b=D(e,n,"tab"),m=D(e,n,"tabpanel"),{tabIndex:K}=u,p=e.collection.getItem(n),T=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(p==null?void 0:p.props,{labelable:!0});delete T.id;let N=_.$ea8dcbcb9ea1b556$export$7e924b3091a3bd18(p==null?void 0:p.props),{focusableProps:H}=B.$f645667febf57a63$export$4c014de7c8940b4c({isDisabled:s},t);return{tabProps:v.$3ef42575df84b30b$export$9d1611c77c2fe928(T,H,N,u,{id:b,"aria-selected":r,"aria-disabled":s||void 0,"aria-controls":r?m:void 0,tabIndex:s?void 0:K,role:"tab"}),isSelected:r,isDisabled:s,isPressed:f}}function Y(i,e,t){let n=W.$83013635b024ae3d$export$eac1895992b9f3d6(t)?void 0:0;var a;const o=D(e,(a=i.id)!==null&&a!==void 0?a:e==null?void 0:e.selectedKey,"tabpanel"),l=L.$313b98861ee5dd6c$export$d6875122194c7b44({...i,id:o,"aria-labelledby":D(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:v.$3ef42575df84b30b$export$9d1611c77c2fe928(l,{tabIndex:n,role:"tabpanel","aria-describedby":i["aria-describedby"],"aria-details":i["aria-details"]})}}class Z{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var t,n;return this.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))===null||n===void 0||(t=n.props)===null||t===void 0)&&t.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(t!=null&&this.isDisabled(t));return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(t!=null&&this.isDisabled(t));return t}constructor(e,t,n,a=new Set){this.collection=e,this.flipDirection=t==="rtl"&&n==="horizontal",this.disabledKeys=a,this.tabDirection=n==="horizontal"}}function ee(i,e,t){let{orientation:n="horizontal",keyboardActivation:a="automatic"}=i,{collection:o,selectionManager:l,disabledKeys:c}=e,{direction:r}=U.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),s=d.useMemo(()=>new Z(o,r,n,c),[o,c,n,r]),{collectionProps:u}=I.$ae20dd8cbca75726$export$d6daf82dcd84e87c({ref:t,selectionManager:l,keyboardDelegate:s,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:t,linkBehavior:"selection"}),f=v.$bdb11010cef70236$export$f680877a34711e37();O.set(e,f);let b=L.$313b98861ee5dd6c$export$d6875122194c7b44({...i,id:f});return{tabListProps:{...v.$3ef42575df84b30b$export$9d1611c77c2fe928(u,b),role:"tablist","aria-orientation":n,tabIndex:void 0}}}function te(i){var e,t;let n=J.$a0d645289fe9b86b$export$e7f05e985daf4b5f({...i,onSelectionChange:i.onSelectionChange?r=>{var s;r!=null&&((s=i.onSelectionChange)===null||s===void 0||s.call(i,r))}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:(t=(e=i.defaultSelectedKey)!==null&&e!==void 0?e:q(i.collection,i.disabledKeys?new Set(i.disabledKeys):new Set))!==null&&t!==void 0?t:void 0}),{selectionManager:a,collection:o,selectedKey:l}=n,c=d.useRef(l);return d.useEffect(()=>{let r=l;i.selectedKey==null&&(a.isEmpty||r==null||!o.getItem(r))&&(r=q(o,n.disabledKeys),r!=null&&a.setSelectedKeys([r])),(r!=null&&a.focusedKey==null||!a.isFocused&&r!==c.current)&&a.setFocusedKey(r),c.current=r}),{...n,isDisabled:i.isDisabled||!1}}function q(i,e){let t=null;if(i){var n,a,o,l;for(t=i.getFirstKey();t!=null&&(e.has(t)||!((a=i.getItem(t))===null||a===void 0||(n=a.props)===null||n===void 0)&&n.isDisabled)&&t!==i.getLastKey();)t=i.getKeyAfter(t);t!=null&&(e.has(t)||!((l=i.getItem(t))===null||l===void 0||(o=l.props)===null||o===void 0)&&o.isDisabled)&&t===i.getLastKey()&&(t=i.getFirstKey())}return t}const F=d.createContext(null),y=d.createContext(null),M=d.forwardRef(function(e,t){[e,t]=$.$64fa3d84918910a7$export$29f1550f4b0d4415(e,t,F);let{children:n,orientation:a="horizontal"}=e;return n=d.useMemo(()=>typeof n=="function"?n({orientation:a,defaultChildren:null}):n,[n,a]),d.createElement(x.$e1995378a142960e$export$bf788dd355e3a401,{content:n},o=>d.createElement(ie,{props:e,collection:o,tabsRef:t}))});function ie({props:i,tabsRef:e,collection:t}){let{orientation:n="horizontal"}=i,a=te({...i,collection:t,children:void 0}),{focusProps:o,isFocused:l,isFocusVisible:c}=w.$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),r=d.useMemo(()=>({orientation:n,isFocusWithin:l,isFocusVisible:c}),[n,l,c]),s=$.$64fa3d84918910a7$export$4d86445c2cf5e3({...i,defaultClassName:"react-aria-Tabs",values:r});return d.createElement("div",{...S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(i),...o,...s,ref:e,slot:i.slot||void 0,"data-focused":l||void 0,"data-orientation":n,"data-focus-visible":c||void 0,"data-disabled":a.isDisabled||void 0},d.createElement($.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[F,i],[y,a]]},s.children))}const ne=d.forwardRef(function(e,t){return d.useContext(y)?d.createElement(ae,{props:e,forwardedRef:t}):d.createElement(x.$e1995378a142960e$export$fb8073518f34e6ec,e)});function ae({props:i,forwardedRef:e}){let t=d.useContext(y),{CollectionRoot:n}=d.useContext(x.$7135fc7d473fd974$export$4feb769f8ddf26c5),{orientation:a="horizontal",keyboardActivation:o="automatic"}=$.$64fa3d84918910a7$export$fabf2dc03a41866e(F),l=$.$df56164dff5785e2$export$4338b53315abf666(e),{tabListProps:c}=ee({...i,orientation:a,keyboardActivation:o},t,l),r=$.$64fa3d84918910a7$export$4d86445c2cf5e3({...i,children:null,defaultClassName:"react-aria-TabList",values:{orientation:a,state:t}}),s=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(i);return delete s.id,d.createElement("div",{...s,...c,ref:l,...r,"data-orientation":a||void 0},d.createElement(n,{collection:t.collection,persistedKeys:x.$7135fc7d473fd974$export$90e00781bc59d8f9(t.selectionManager.focusedKey)}))}const se=x.$e1995378a142960e$export$18af5c7a9e9b3664("item",(i,e,t)=>{let n=d.useContext(y),a=$.$df56164dff5785e2$export$4338b53315abf666(e),{tabProps:o,isSelected:l,isDisabled:c,isPressed:r}=X({key:t.key,...i},n,a),{focusProps:s,isFocused:u,isFocusVisible:f}=w.$f7dceffc5ad7768b$export$4e328f61c538687f(),{hoverProps:b,isHovered:m}=G.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:c,onHoverStart:i.onHoverStart,onHoverEnd:i.onHoverEnd,onHoverChange:i.onHoverChange}),K=$.$64fa3d84918910a7$export$4d86445c2cf5e3({...i,id:void 0,children:t.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:l,isDisabled:c,isFocused:u,isFocusVisible:f,isPressed:r,isHovered:m}}),p=t.props.href?"a":"div";return d.createElement(p,{...v.$3ef42575df84b30b$export$9d1611c77c2fe928(o,s,b,K),ref:a,"data-selected":l||void 0,"data-disabled":c||void 0,"data-focused":u||void 0,"data-focus-visible":f||void 0,"data-pressed":r||void 0,"data-hovered":m||void 0},K.children)}),re=z.$f39a9eba43920ace$export$86427a43e3e48ebb(function(e,t){const n=d.useContext(y);let a=$.$df56164dff5785e2$export$4338b53315abf666(t),{tabPanelProps:o}=Y(e,n,a),{focusProps:l,isFocused:c,isFocusVisible:r}=w.$f7dceffc5ad7768b$export$4e328f61c538687f(),s=n.selectedKey===e.id,u=$.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:c,isFocusVisible:r,isInert:E.$cdc5a6778b766db2$export$a9d04c5684123369(!s),state:n}});if(!s&&!e.shouldForceMount)return null;let f=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e);delete f.id;let b=s?v.$3ef42575df84b30b$export$9d1611c77c2fe928(f,o,l,u):u;return d.createElement("div",{...b,ref:a,"data-focused":c||void 0,"data-focus-visible":r||void 0,inert:E.$cdc5a6778b766db2$export$a9d04c5684123369(!s),"data-inert":s?void 0:"true"},d.createElement($.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[F,null],[y,null]]},d.createElement(x.$7135fc7d473fd974$export$4feb769f8ddf26c5.Provider,{value:x.$7135fc7d473fd974$export$a164736487e3f0ae},u.children)))}),le="_container_rtudw_4",de="_list_rtudw_8",oe="_listItem_rtudw_13",ce="_panel_rtudw_55",P={container:le,list:de,listItem:oe,panel:ce},ue=({tabs:i,label:e,children:t,className:n,...a})=>{const{width:o}=V.useObserveElement(typeof document>"u"?null:document.body,{includePadding:!0}),l=a.orientation||o>=A.windowSizes.sm?"horizontal":"vertical";if(!(i!=null&&i.length))return h.jsx(M,{...a,orientation:l,className:g.clsx(P.container,n),children:t});if(typeof t=="function")return console.error('Only the declarative API supports passing a function to children, replace the "tabs" prop according to the documentation: https://designsystem.migrationsverket.se/components/tabs/ '),null;const c=C.Children.toArray(t);if(c.length!==i.length)return console.error(`The number of children must match the number of tabs. Children: ${c.length} Tabs: ${i.length}`),null;const r=c.reduce((s,u,f)=>{if(C.isValidElement(u)){const b=i[f];b&&(s[b]=C.cloneElement(u,{id:b}))}return s},{});return h.jsxs(M,{...a,orientation:l,className:g.clsx(P.container,n),children:[h.jsx(j,{"aria-label":e,children:i.map(s=>h.jsx(R,{id:s,children:s},s))}),i.map(s=>h.jsx(k,{id:s,children:r[s]},s))]})},R=({className:i,...e})=>h.jsx(se,{...e,className:g.clsx(P.listItem,i)}),k=({className:i,...e})=>h.jsx(re,{className:g.clsx(P.panel,i),...e}),j=({className:i,...e})=>h.jsx(ne,{className:g.clsx(P.list,i),...e});exports.Tab=R;exports.TabList=j;exports.TabPanel=k;exports.Tabs=ue;
@@ -1,6 +1,6 @@
1
1
  import { jsx as m, jsxs as B } from "react/jsx-runtime";
2
- import * as E from "react";
3
- import u, { useMemo as w, useRef as W, useEffect as j, forwardRef as N, createContext as R, useContext as p } from "react";
2
+ import * as w from "react";
3
+ import u, { useMemo as E, useRef as W, useEffect as j, forwardRef as N, createContext as R, useContext as p } from "react";
4
4
  import { c as v } from "./clsx-OuTLNxxd.js";
5
5
  import { u as U } from "./useObserveElement-BdI4zgd7.js";
6
6
  import { w as q } from "./tokens-fEwCQXDv.js";
@@ -12,9 +12,9 @@ import { $ as F } from "./filterDOMProps-D6KHYVBX.js";
12
12
  import { $ as L } from "./inertValue-B7loUihk.js";
13
13
  import { c as ae } from "./usePress-DuR4pVsE.js";
14
14
  import { $ as ne } from "./useFocusable-ChPA2Jc7.js";
15
- import { d as oe, e as le } from "./SelectionManager-zsWy3vsd.js";
15
+ import { d as le, e as se } from "./SelectionManager-zsWy3vsd.js";
16
16
  import { $ as O } from "./useLabels-LrKQiY11.js";
17
- import { $ as se } from "./useHasTabbableChild-BE81d_ab.js";
17
+ import { $ as oe } from "./useHasTabbableChild-BE81d_ab.js";
18
18
  import { $ as re } from "./context-CGNJ3grH.js";
19
19
  import { $ as I } from "./useFocusRing-DOfBqnUN.js";
20
20
  import { $ as de } from "./useHover-DQvJ3Y-W.js";
@@ -24,11 +24,11 @@ function K(i, e, t) {
24
24
  return i ? (typeof e == "string" && (e = e.replace(/\s+/g, "")), `${H.get(i)}-${t}-${e}`) : "";
25
25
  }
26
26
  function fe(i, e, t) {
27
- let { key: a, isDisabled: n, shouldSelectOnPressUp: r } = i, { selectionManager: s, selectedKey: d } = e, l = a === d, o = n || e.isDisabled || e.selectionManager.isDisabled(a), { itemProps: c, isPressed: f } = oe({
28
- selectionManager: s,
27
+ let { key: a, isDisabled: n, shouldSelectOnPressUp: r } = i, { selectionManager: o, selectedKey: d } = e, s = a === d, l = n || e.isDisabled || e.selectionManager.isDisabled(a), { itemProps: c, isPressed: f } = le({
28
+ selectionManager: o,
29
29
  key: a,
30
30
  ref: t,
31
- isDisabled: o,
31
+ isDisabled: l,
32
32
  shouldSelectOnPressUp: r,
33
33
  linkBehavior: "selection"
34
34
  }), b = K(e, a, "tab"), P = K(e, a, "tabpanel"), { tabIndex: x } = c, $ = e.collection.getItem(a), T = F($ == null ? void 0 : $.props, {
@@ -36,32 +36,32 @@ function fe(i, e, t) {
36
36
  });
37
37
  delete T.id;
38
38
  let z = ae($ == null ? void 0 : $.props), { focusableProps: _ } = ne({
39
- isDisabled: o
39
+ isDisabled: l
40
40
  }, t);
41
41
  return {
42
42
  tabProps: g(T, _, z, c, {
43
43
  id: b,
44
- "aria-selected": l,
45
- "aria-disabled": o || void 0,
46
- "aria-controls": l ? P : void 0,
47
- tabIndex: o ? void 0 : x,
44
+ "aria-selected": s,
45
+ "aria-disabled": l || void 0,
46
+ "aria-controls": s ? P : void 0,
47
+ tabIndex: l ? void 0 : x,
48
48
  role: "tab"
49
49
  }),
50
- isSelected: l,
51
- isDisabled: o,
50
+ isSelected: s,
51
+ isDisabled: l,
52
52
  isPressed: f
53
53
  };
54
54
  }
55
55
  function ue(i, e, t) {
56
- let a = se(t) ? void 0 : 0;
56
+ let a = oe(t) ? void 0 : 0;
57
57
  var n;
58
- const r = K(e, (n = i.id) !== null && n !== void 0 ? n : e == null ? void 0 : e.selectedKey, "tabpanel"), s = O({
58
+ const r = K(e, (n = i.id) !== null && n !== void 0 ? n : e == null ? void 0 : e.selectedKey, "tabpanel"), o = O({
59
59
  ...i,
60
60
  id: r,
61
61
  "aria-labelledby": K(e, e == null ? void 0 : e.selectedKey, "tab")
62
62
  });
63
63
  return {
64
- tabPanelProps: g(s, {
64
+ tabPanelProps: g(o, {
65
65
  tabIndex: a,
66
66
  role: "tabpanel",
67
67
  "aria-describedby": i["aria-describedby"],
@@ -113,15 +113,15 @@ class be {
113
113
  }
114
114
  }
115
115
  function $e(i, e, t) {
116
- let { orientation: a = "horizontal", keyboardActivation: n = "automatic" } = i, { collection: r, selectionManager: s, disabledKeys: d } = e, { direction: l } = re(), o = w(() => new be(r, l, a, d), [
116
+ let { orientation: a = "horizontal", keyboardActivation: n = "automatic" } = i, { collection: r, selectionManager: o, disabledKeys: d } = e, { direction: s } = re(), l = E(() => new be(r, s, a, d), [
117
117
  r,
118
118
  d,
119
119
  a,
120
- l
121
- ]), { collectionProps: c } = le({
120
+ s
121
+ ]), { collectionProps: c } = se({
122
122
  ref: t,
123
- selectionManager: s,
124
- keyboardDelegate: o,
123
+ selectionManager: o,
124
+ keyboardDelegate: l,
125
125
  selectOnFocus: n === "automatic",
126
126
  disallowEmptySelection: !0,
127
127
  scrollRef: t,
@@ -145,18 +145,18 @@ function me(i) {
145
145
  var e, t;
146
146
  let a = ce({
147
147
  ...i,
148
- onSelectionChange: i.onSelectionChange ? (l) => {
149
- var o;
150
- l != null && ((o = i.onSelectionChange) === null || o === void 0 || o.call(i, l));
148
+ onSelectionChange: i.onSelectionChange ? (s) => {
149
+ var l;
150
+ s != null && ((l = i.onSelectionChange) === null || l === void 0 || l.call(i, s));
151
151
  } : void 0,
152
152
  suppressTextValueWarning: !0,
153
153
  defaultSelectedKey: (t = (e = i.defaultSelectedKey) !== null && e !== void 0 ? e : M(i.collection, i.disabledKeys ? new Set(i.disabledKeys) : /* @__PURE__ */ new Set())) !== null && t !== void 0 ? t : void 0
154
- }), { selectionManager: n, collection: r, selectedKey: s } = a, d = W(s);
154
+ }), { selectionManager: n, collection: r, selectedKey: o } = a, d = W(o);
155
155
  return j(() => {
156
- let l = s;
157
- i.selectedKey == null && (n.isEmpty || l == null || !r.getItem(l)) && (l = M(r, a.disabledKeys), l != null && n.setSelectedKeys([
158
- l
159
- ])), (l != null && n.focusedKey == null || !n.isFocused && l !== d.current) && n.setFocusedKey(l), d.current = l;
156
+ let s = o;
157
+ i.selectedKey == null && (n.isEmpty || s == null || !r.getItem(s)) && (s = M(r, a.disabledKeys), s != null && n.setSelectedKeys([
158
+ s
159
+ ])), (s != null && n.focusedKey == null || !n.isFocused && s !== d.current) && n.setFocusedKey(s), d.current = s;
160
160
  }), {
161
161
  ...a,
162
162
  isDisabled: i.isDisabled || !1
@@ -165,16 +165,16 @@ function me(i) {
165
165
  function M(i, e) {
166
166
  let t = null;
167
167
  if (i) {
168
- var a, n, r, s;
168
+ var a, n, r, o;
169
169
  for (t = i.getFirstKey(); t != null && (e.has(t) || !((n = i.getItem(t)) === null || n === void 0 || (a = n.props) === null || a === void 0) && a.isDisabled) && t !== i.getLastKey(); ) t = i.getKeyAfter(t);
170
- t != null && (e.has(t) || !((s = i.getItem(t)) === null || s === void 0 || (r = s.props) === null || r === void 0) && r.isDisabled) && t === i.getLastKey() && (t = i.getFirstKey());
170
+ t != null && (e.has(t) || !((o = i.getItem(t)) === null || o === void 0 || (r = o.props) === null || r === void 0) && r.isDisabled) && t === i.getLastKey() && (t = i.getFirstKey());
171
171
  }
172
172
  return t;
173
173
  }
174
174
  const S = /* @__PURE__ */ R(null), h = /* @__PURE__ */ R(null), k = /* @__PURE__ */ N(function(e, t) {
175
175
  [e, t] = Z(e, t, S);
176
176
  let { children: a, orientation: n = "horizontal" } = e;
177
- return a = w(() => typeof a == "function" ? a({
177
+ return a = E(() => typeof a == "function" ? a({
178
178
  orientation: n,
179
179
  defaultChildren: null
180
180
  }) : a, [
@@ -193,28 +193,28 @@ function he({ props: i, tabsRef: e, collection: t }) {
193
193
  ...i,
194
194
  collection: t,
195
195
  children: void 0
196
- }), { focusProps: r, isFocused: s, isFocusVisible: d } = I({
196
+ }), { focusProps: r, isFocused: o, isFocusVisible: d } = I({
197
197
  within: !0
198
- }), l = w(() => ({
198
+ }), s = E(() => ({
199
199
  orientation: a,
200
- isFocusWithin: s,
200
+ isFocusWithin: o,
201
201
  isFocusVisible: d
202
202
  }), [
203
203
  a,
204
- s,
204
+ o,
205
205
  d
206
- ]), o = D({
206
+ ]), l = D({
207
207
  ...i,
208
208
  defaultClassName: "react-aria-Tabs",
209
- values: l
209
+ values: s
210
210
  });
211
211
  return /* @__PURE__ */ u.createElement("div", {
212
212
  ...F(i),
213
213
  ...r,
214
- ...o,
214
+ ...l,
215
215
  ref: e,
216
216
  slot: i.slot || void 0,
217
- "data-focused": s || void 0,
217
+ "data-focused": o || void 0,
218
218
  "data-orientation": a,
219
219
  "data-focus-visible": d || void 0,
220
220
  "data-disabled": n.isDisabled || void 0
@@ -229,7 +229,7 @@ function he({ props: i, tabsRef: e, collection: t }) {
229
229
  n
230
230
  ]
231
231
  ]
232
- }, o.children));
232
+ }, l.children));
233
233
  }
234
234
  const pe = /* @__PURE__ */ N(function(e, t) {
235
235
  return p(h) ? /* @__PURE__ */ u.createElement(ve, {
@@ -238,11 +238,11 @@ const pe = /* @__PURE__ */ N(function(e, t) {
238
238
  }) : /* @__PURE__ */ u.createElement(X, e);
239
239
  });
240
240
  function ve({ props: i, forwardedRef: e }) {
241
- let t = p(h), { CollectionRoot: a } = p(A), { orientation: n = "horizontal", keyboardActivation: r = "automatic" } = ee(S), s = C(e), { tabListProps: d } = $e({
241
+ let t = p(h), { CollectionRoot: a } = p(A), { orientation: n = "horizontal", keyboardActivation: r = "automatic" } = ee(S), o = C(e), { tabListProps: d } = $e({
242
242
  ...i,
243
243
  orientation: n,
244
244
  keyboardActivation: r
245
- }, t, s), l = D({
245
+ }, t, o), s = D({
246
246
  ...i,
247
247
  children: null,
248
248
  defaultClassName: "react-aria-TabList",
@@ -250,12 +250,12 @@ function ve({ props: i, forwardedRef: e }) {
250
250
  orientation: n,
251
251
  state: t
252
252
  }
253
- }), o = F(i);
254
- return delete o.id, /* @__PURE__ */ u.createElement("div", {
255
- ...o,
256
- ...d,
257
- ref: s,
253
+ }), l = F(i);
254
+ return delete l.id, /* @__PURE__ */ u.createElement("div", {
258
255
  ...l,
256
+ ...d,
257
+ ref: o,
258
+ ...s,
259
259
  "data-orientation": n || void 0
260
260
  }, /* @__PURE__ */ u.createElement(a, {
261
261
  collection: t.collection,
@@ -263,10 +263,10 @@ function ve({ props: i, forwardedRef: e }) {
263
263
  }));
264
264
  }
265
265
  const ye = /* @__PURE__ */ G("item", (i, e, t) => {
266
- let a = p(h), n = C(e), { tabProps: r, isSelected: s, isDisabled: d, isPressed: l } = fe({
266
+ let a = p(h), n = C(e), { tabProps: r, isSelected: o, isDisabled: d, isPressed: s } = fe({
267
267
  key: t.key,
268
268
  ...i
269
- }, a, n), { focusProps: o, isFocused: c, isFocusVisible: f } = I(), { hoverProps: b, isHovered: P } = de({
269
+ }, a, n), { focusProps: l, isFocused: c, isFocusVisible: f } = I(), { hoverProps: b, isHovered: P } = de({
270
270
  isDisabled: d,
271
271
  onHoverStart: i.onHoverStart,
272
272
  onHoverEnd: i.onHoverEnd,
@@ -277,49 +277,49 @@ const ye = /* @__PURE__ */ G("item", (i, e, t) => {
277
277
  children: t.rendered,
278
278
  defaultClassName: "react-aria-Tab",
279
279
  values: {
280
- isSelected: s,
280
+ isSelected: o,
281
281
  isDisabled: d,
282
282
  isFocused: c,
283
283
  isFocusVisible: f,
284
- isPressed: l,
284
+ isPressed: s,
285
285
  isHovered: P
286
286
  }
287
287
  }), $ = t.props.href ? "a" : "div";
288
288
  return /* @__PURE__ */ u.createElement($, {
289
- ...g(r, o, b, x),
289
+ ...g(r, l, b, x),
290
290
  ref: n,
291
- "data-selected": s || void 0,
291
+ "data-selected": o || void 0,
292
292
  "data-disabled": d || void 0,
293
293
  "data-focused": c || void 0,
294
294
  "data-focus-visible": f || void 0,
295
- "data-pressed": l || void 0,
295
+ "data-pressed": s || void 0,
296
296
  "data-hovered": P || void 0
297
297
  }, x.children);
298
298
  }), ge = /* @__PURE__ */ te(function(e, t) {
299
299
  const a = p(h);
300
- let n = C(t), { tabPanelProps: r } = ue(e, a, n), { focusProps: s, isFocused: d, isFocusVisible: l } = I(), o = a.selectedKey === e.id, c = D({
300
+ let n = C(t), { tabPanelProps: r } = ue(e, a, n), { focusProps: o, isFocused: d, isFocusVisible: s } = I(), l = a.selectedKey === e.id, c = D({
301
301
  ...e,
302
302
  defaultClassName: "react-aria-TabPanel",
303
303
  values: {
304
304
  isFocused: d,
305
- isFocusVisible: l,
305
+ isFocusVisible: s,
306
306
  // @ts-ignore - compatibility with React < 19
307
- isInert: L(!o),
307
+ isInert: L(!l),
308
308
  state: a
309
309
  }
310
310
  });
311
- if (!o && !e.shouldForceMount) return null;
311
+ if (!l && !e.shouldForceMount) return null;
312
312
  let f = F(e);
313
313
  delete f.id;
314
- let b = o ? g(f, r, s, c) : c;
314
+ let b = l ? g(f, r, o, c) : c;
315
315
  return /* @__PURE__ */ u.createElement("div", {
316
316
  ...b,
317
317
  ref: n,
318
318
  "data-focused": d || void 0,
319
- "data-focus-visible": l || void 0,
319
+ "data-focus-visible": s || void 0,
320
320
  // @ts-ignore
321
- inert: L(!o),
322
- "data-inert": o ? void 0 : "true"
321
+ inert: L(!l),
322
+ "data-inert": l ? void 0 : "true"
323
323
  }, /* @__PURE__ */ u.createElement(V, {
324
324
  values: [
325
325
  [
@@ -334,7 +334,7 @@ const ye = /* @__PURE__ */ G("item", (i, e, t) => {
334
334
  }, /* @__PURE__ */ u.createElement(A.Provider, {
335
335
  value: Q
336
336
  }, c.children)));
337
- }), Pe = "_container_iuog5_4", xe = "_list_iuog5_8", Ke = "_listItem_iuog5_14", De = "_panel_iuog5_56", y = {
337
+ }), Pe = "_container_rtudw_4", xe = "_list_rtudw_8", Ke = "_listItem_rtudw_13", De = "_panel_rtudw_55", y = {
338
338
  container: Pe,
339
339
  list: xe,
340
340
  listItem: Ke,
@@ -349,13 +349,13 @@ const ye = /* @__PURE__ */ G("item", (i, e, t) => {
349
349
  const { width: r } = U(
350
350
  typeof document > "u" ? null : document.body,
351
351
  { includePadding: !0 }
352
- ), s = n.orientation || r >= q.sm ? "horizontal" : "vertical";
352
+ ), o = n.orientation || r >= q.sm ? "horizontal" : "vertical";
353
353
  if (!(i != null && i.length))
354
354
  return /* @__PURE__ */ m(
355
355
  k,
356
356
  {
357
357
  ...n,
358
- orientation: s,
358
+ orientation: o,
359
359
  className: v(y.container, a),
360
360
  children: t
361
361
  }
@@ -364,18 +364,18 @@ const ye = /* @__PURE__ */ G("item", (i, e, t) => {
364
364
  return console.error(
365
365
  'Only the declarative API supports passing a function to children, replace the "tabs" prop according to the documentation: https://designsystem.migrationsverket.se/components/tabs/ '
366
366
  ), null;
367
- const d = E.Children.toArray(t);
367
+ const d = w.Children.toArray(t);
368
368
  if (d.length !== i.length)
369
369
  return console.error(
370
370
  `The number of children must match the number of tabs. Children: ${d.length} Tabs: ${i.length}`
371
371
  ), null;
372
- const l = d.reduce(
373
- (o, c, f) => {
374
- if (E.isValidElement(c)) {
372
+ const s = d.reduce(
373
+ (l, c, f) => {
374
+ if (w.isValidElement(c)) {
375
375
  const b = i[f];
376
- b && (o[b] = E.cloneElement(c, { id: b }));
376
+ b && (l[b] = w.cloneElement(c, { id: b }));
377
377
  }
378
- return o;
378
+ return l;
379
379
  },
380
380
  {}
381
381
  );
@@ -383,24 +383,24 @@ const ye = /* @__PURE__ */ G("item", (i, e, t) => {
383
383
  k,
384
384
  {
385
385
  ...n,
386
- orientation: s,
386
+ orientation: o,
387
387
  className: v(y.container, a),
388
388
  children: [
389
- /* @__PURE__ */ m(Ee, { "aria-label": e, children: i.map((o) => /* @__PURE__ */ m(
389
+ /* @__PURE__ */ m(we, { "aria-label": e, children: i.map((l) => /* @__PURE__ */ m(
390
390
  Fe,
391
391
  {
392
- id: o,
393
- children: o
392
+ id: l,
393
+ children: l
394
394
  },
395
- o
395
+ l
396
396
  )) }),
397
- i.map((o) => /* @__PURE__ */ m(
397
+ i.map((l) => /* @__PURE__ */ m(
398
398
  Se,
399
399
  {
400
- id: o,
401
- children: l[o]
400
+ id: l,
401
+ children: s[l]
402
402
  },
403
- o
403
+ l
404
404
  ))
405
405
  ]
406
406
  }
@@ -417,7 +417,7 @@ const ye = /* @__PURE__ */ G("item", (i, e, t) => {
417
417
  className: v(y.panel, i),
418
418
  ...e
419
419
  }
420
- ), Ee = ({
420
+ ), we = ({
421
421
  className: i,
422
422
  ...e
423
423
  }) => /* @__PURE__ */ m(
@@ -431,5 +431,5 @@ export {
431
431
  Ge as T,
432
432
  Fe as a,
433
433
  Se as b,
434
- Ee as c
434
+ we as c
435
435
  };