@midas-ds/components 10.4.0 → 11.0.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.
- package/{AccordionItem-BqsgiVWV.js → AccordionItem-BtDoammf.js} +7 -7
- package/{AccordionItem-BcsoC78F.cjs → AccordionItem-D2QYNgZS.cjs} +1 -1
- package/{BadgeContainer-DM8TdyMT.js → BadgeContainer-CKBIZWsc.js} +13 -13
- package/BadgeContainer-DWVHS5dn.cjs +1 -0
- package/{Breadcrumbs-D7eoibWk.js → Breadcrumbs-BBzSV4SK.js} +4 -4
- package/{Breadcrumbs-CfW5IuyE.cjs → Breadcrumbs-CFUryOhf.cjs} +1 -1
- package/{Button-BZUo7vsZ.js → Button-BjMaGya2.js} +2 -2
- package/{Button-CFYdzG0H.js → Button-CepQFEit.js} +4 -4
- package/{Button-BXY5ZhqI.cjs → Button-Dq6ugqxT.cjs} +1 -1
- package/Button.module-D-mPLRxe.js +14 -0
- package/Button.module-goCEz5qs.cjs +1 -0
- package/CHANGELOG.md +36 -0
- package/{Card-BaWSgtSF.js → Card-BRs1FKX5.js} +4 -4
- package/{Card-Cc1TNPcQ.cjs → Card-cdL5669N.cjs} +1 -1
- package/{CharacterCounter-cLhqPZlk.js → CharacterCounter-DpBDwvLw.js} +2 -2
- package/{Checkbox-LuUwTZ3W.js → Checkbox-EB_SCBEo.js} +3 -3
- package/{CheckboxGroup-CUA8_xSx.js → CheckboxGroup-CC9QGMuE.js} +7 -8
- package/CheckboxGroup-DhQX10rP.cjs +1 -0
- package/{Collection--62xKPm9.js → Collection-D2jVTmDW.js} +1 -1
- package/{ColorSchemeSwitch-Cwono7Ap.js → ColorSchemeSwitch-Cnyb9EKC.js} +42 -41
- package/ColorSchemeSwitch-owUryjYz.cjs +16 -0
- package/ComboBox-CiCB2e4W.cjs +1 -0
- package/{ComboBox-HLIAbb2q.js → ComboBox-Dnk8JMQ6.js} +65 -66
- package/{DateField-CnLEi7uX.js → DateField-BAS2v9aI.js} +4 -4
- package/{DateField-B3VjOSde.cjs → DateField-DleDM0Sy.cjs} +1 -1
- package/{DateInputDivider-Bi5N-C0c.js → DateInputDivider-B3oE1_tB.js} +39 -38
- package/DateInputDivider-ToFY-yjB.cjs +1 -0
- package/{DateRangePicker-CFOoGvut.js → DateRangePicker-Blej-jD0.js} +71 -72
- package/DateRangePicker-CYXWnCTq.cjs +6 -0
- package/{Dialog-pSSy1zwf.cjs → Dialog-B3R3WtL5.cjs} +1 -1
- package/{Dialog-SqciohRY.js → Dialog-BkUw6PlA.js} +7 -7
- package/{Dialog-CtVrVuMr.js → Dialog-DKHo0W9B.js} +443 -468
- package/Dialog-DtHk3eXI.cjs +1 -0
- package/{DragAndDrop-BoEd260f.cjs → DragAndDrop-CSg60YQE.cjs} +1 -1
- package/{DragAndDrop-DkSTL28C.js → DragAndDrop-DOXLfJaA.js} +1 -1
- package/Dropdown-CYakzdJg.cjs +6 -0
- package/{Dropdown-CkBp70BH.js → Dropdown-D6WCi_Ll.js} +19 -19
- package/FieldError-Bv3Q6ZP-.cjs +1 -0
- package/FieldError-CDCvUjK5.js +46 -0
- package/{FileUpload-B4rv-wke.js → FileUpload-BokzdXVc.js} +448 -562
- package/{FileUpload-BwMhyLjG.cjs → FileUpload-Bz9md5zc.cjs} +2 -2
- package/{FocusScope-D_hwN_TJ.js → FocusScope-BCsrRPqD.js} +1 -1
- package/{Group-CpkUzEAs.js → Group-B0vQfHDy.js} +1 -1
- package/{Heading-NxtGri2i.js → Heading-D2y_kiC0.js} +1 -1
- package/{InfoBanner-CVry6Y8i.cjs → InfoBanner-CzwbOdRG.cjs} +1 -1
- package/{InfoBanner-CBUoad7A.js → InfoBanner-D05poAe3.js} +5 -5
- package/{Input-LnjmFI1x.js → Input-n-Z20KbW.js} +1 -1
- package/{Label-TVxwGZ-O.js → Label-JLgFEbP9.js} +5 -5
- package/{Label-CNmTN1YY.cjs → Label-VO6CAFux.cjs} +1 -1
- package/Layout-BwLxIwtY.cjs +16 -0
- package/{Layout-amz9BESl.js → Layout-CcADAhds.js} +98 -98
- package/{Link-Bn8V3ZI0.js → Link-CibH8uRY.js} +3 -3
- package/Link-ESjrl63P.cjs +6 -0
- package/Link-ovwNVMfg.js +60 -0
- package/LinkButton-B6AWNiRn.cjs +6 -0
- package/LinkButton-BkZULm2a.js +69 -0
- package/{ListBox-BCz5-23H.cjs → ListBox-B0E1hdEt.cjs} +1 -1
- package/{ListBox-C-isJIHL.js → ListBox-CsxDGpCA.js} +11 -11
- package/{ListBoxButton-DNm3gvcT.cjs → ListBoxButton-BsuHFd_O.cjs} +1 -1
- package/{ListBoxButton-C_krklY0.js → ListBoxButton-DawRfuny.js} +1 -1
- package/{ListBoxSection-CfQZoURJ.cjs → ListBoxSection-C-Rz358T.cjs} +1 -1
- package/{ListBoxSection-BVR2xtOH.js → ListBoxSection-Cc2cx0_S.js} +6 -6
- package/{ListKeyboardDelegate-CY6t6y1t.js → ListKeyboardDelegate-C-sPNj0f.js} +2 -2
- package/{ListKeyboardDelegate-CPsZ7D83.cjs → ListKeyboardDelegate-ZKBk2IId.cjs} +1 -1
- package/{OverlayArrow-CfhSYL46.js → OverlayArrow-DB_aVTVM.js} +1 -1
- package/Popover--r4Zr4mO.cjs +1 -0
- package/{Popover-C8VY1YKi.js → Popover-DypW9ift.js} +13 -13
- package/PressResponder-4jE_HLu3.cjs +1 -0
- package/PressResponder-C3APAKsz.js +34 -0
- package/{ProgressBar-BNCjpcv8.js → ProgressBar-CFgcqHTR.js} +2 -2
- package/{ProgressBar-CcbxcWdT.cjs → ProgressBar-CJFNiudl.cjs} +1 -1
- package/Radio-CMH6pTWD.cjs +1 -0
- package/{Radio-CZYibh9r.js → Radio-DUBSD0kQ.js} +19 -20
- package/{RangeCalendar-B16b6tJD.js → RangeCalendar-BCruEq9d.js} +106 -109
- package/RangeCalendar-BY82hPRu.cjs +11 -0
- package/SearchField-QFyuaT-K.cjs +6 -0
- package/{SearchField-giwECmXS.js → SearchField-nwlyszwt.js} +47 -47
- package/Select-C5i-rIDh.cjs +1 -0
- package/{Select-mwaAv20X.js → Select-DKME5lZp.js} +107 -108
- package/SelectionManager-BJjqIWtf.cjs +1 -0
- package/{SelectionManager-zsWy3vsd.js → SelectionManager-BubxiIKu.js} +25 -24
- package/{Separator-Dn5LYN5I.js → Separator-CEZ5y7tZ.js} +4 -4
- package/{Separator-CxF-3jhR.cjs → Separator-DPLEx950.cjs} +1 -1
- package/Spinner-VSyPhiJ9.js +51 -0
- package/Spinner-vof0Y9Hh.cjs +6 -0
- package/{TabList-7VtCiXxX.cjs → TabList-BkSWzbDG.cjs} +1 -1
- package/{TabList-CthsM5h6.js → TabList-QApx8qRC.js} +90 -90
- package/{Table-BcQPvJT3.js → Table-B5Aine4F.js} +55 -54
- package/Table-DGYC-sDq.cjs +16 -0
- package/{Tag-Bs8T2Ei7.js → Tag-Byva_Xuy.js} +136 -135
- package/Tag-bYq-wf5D.cjs +1 -0
- package/{Text-DlKqpvSa.js → Text-BPcfhYQ9.js} +1 -1
- package/{Text-92cPh38G.js → Text-DcZqSUN9.js} +3 -3
- package/{TextArea-DBNAVWqL.js → TextArea-BhmdgD1w.js} +8 -8
- package/{TextArea-XJDfeXRs.cjs → TextArea-CY_tzBAJ.cjs} +1 -1
- package/{TextField-BdK9KEQ5.cjs → TextField-BAX93sq7.cjs} +1 -1
- package/{TextField-ByDJkig9.js → TextField-Dma22dnD.js} +19 -19
- package/{Toast-DPPvPhrF.js → Toast-CWt_mNIg.js} +5 -5
- package/{Toast-l1bKo2oA.cjs → Toast-DdmSvNaO.cjs} +1 -1
- package/{ToggleButtonGroup-DH8IgR4G.cjs → ToggleButtonGroup-DZ_wo0qx.cjs} +1 -1
- package/{ToggleButtonGroup-HOWNWtQZ.js → ToggleButtonGroup-HjvaTYD4.js} +4 -4
- package/{Tooltip-5mLWn_wO.js → Tooltip-DjNc93tV.js} +3 -3
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/arrow-right-BGd86zzR.cjs +6 -0
- package/{arrow-right-Dg8sttFO.js → arrow-right-uemUGIg8.js} +5 -5
- package/assets/BadgeContainer.css +1 -1
- package/assets/Button.css +1 -1
- package/assets/FileUpload.css +1 -1
- package/assets/LinkButton.css +1 -1
- package/assets/Popover.css +1 -1
- package/assets/TabList.css +1 -1
- package/assets/Tag.css +1 -1
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/breadcrumbs/index.cjs +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +1 -1
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +1 -1
- package/card/Card.d.ts +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.js +1 -1
- package/check-B0aKTFe5.cjs +6 -0
- package/check-B5h1DvDs.js +11 -0
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- package/chevron-down-5hFlg_lR.cjs +6 -0
- package/chevron-down-DmZMdOiC.js +11 -0
- package/{circle-check-B9HYcH7Z.js → circle-check-BErh6TKu.js} +9 -9
- package/circle-check-OVUGxwp9.cjs +11 -0
- package/color-scheme-switch/index.cjs +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +1 -1
- package/createLucideIcon-CTVXwe6i.cjs +21 -0
- package/createLucideIcon-XRdN60yz.js +94 -0
- package/date-field/index.cjs +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/dropdown/index.cjs +1 -1
- package/dropdown/index.js +1 -1
- package/field-error/index.cjs +1 -1
- package/field-error/index.js +1 -1
- package/file-upload/FileUpload.d.ts +3 -14
- package/file-upload/index.cjs +1 -1
- package/file-upload/index.d.ts +1 -1
- package/file-upload/index.js +3 -2
- package/{getScrollParent-CsZ9ciml.cjs → getScrollParent-DuKmPmUa.cjs} +1 -1
- package/{getScrollParent-CT_L9LUr.js → getScrollParent-Ru2U2LlM.js} +1 -1
- package/heading/index.js +1 -1
- package/index.cjs +1 -1
- package/index.js +97 -96
- package/{info-BZwphdye.js → info-CPK1vbOJ.js} +5 -5
- package/info-Dj6SyPex.cjs +6 -0
- package/info-banner/index.cjs +1 -1
- package/info-banner/index.js +1 -1
- package/label/index.cjs +1 -1
- package/label/index.js +1 -1
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/link/Link.d.ts +1 -1
- package/link/index.cjs +1 -1
- package/link/index.js +2 -2
- package/link-button/LinkButton.d.ts +1 -1
- package/link-button/index.cjs +1 -1
- package/link-button/index.js +2 -2
- package/list-box/index.cjs +1 -1
- package/list-box/index.js +2 -2
- package/modal/index.cjs +1 -1
- package/modal/index.js +2 -2
- package/package.json +1 -1
- package/popover/index.cjs +1 -1
- package/popover/index.js +1 -1
- package/progress-bar/index.cjs +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/scrollIntoView-ClEACHUk.js +57 -0
- package/scrollIntoView-DRSoJp89.cjs +1 -0
- package/search-field/index.cjs +1 -1
- package/search-field/index.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/spinner/index.cjs +1 -1
- package/spinner/index.js +1 -1
- package/{square-arrow-out-up-right-BkyqV2PN.js → square-arrow-out-up-right-ok0A3Ovo.js} +4 -4
- package/square-arrow-out-up-right-xCFdJTzY.cjs +6 -0
- package/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text/index.js +1 -1
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/theme/index.cjs +1 -1
- package/theme/index.d.ts +1 -0
- package/theme/index.js +2 -2
- package/theme/tokens.d.ts +1 -0
- package/toast/index.cjs +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.cjs +1 -1
- package/toggle-button/index.js +1 -1
- package/{tokens-BghDnMdO.cjs → tokens-BF-dPard.cjs} +1 -1
- package/{tokens-fEwCQXDv.js → tokens-r1r3wC04.js} +4 -3
- package/tooltip/index.js +1 -1
- package/{triangle-alert-wxyxspAl.js → triangle-alert-B_qAPmWC.js} +5 -5
- package/triangle-alert-BviJNFjf.cjs +6 -0
- package/{useButton-1-Jf-oHj.js → useButton-BoIV3kDJ.js} +5 -5
- package/{useDateFormatter-BVCkxVdw.js → useDateFormatter-C7BJgoDR.js} +1 -1
- package/useDescription-CPo72trh.cjs +1 -0
- package/useDescription-DYfKjGGU.js +32 -0
- package/{useField-BEBXv5Mh.js → useField-CefQB81E.js} +1 -1
- package/{useFilter-e2oIVF_O.cjs → useFilter-BhM2yVO3.cjs} +1 -1
- package/{useFilter-CousKe2K.js → useFilter-DginflOU.js} +1 -1
- package/{useFocusable-ChPA2Jc7.js → useFocusable-BjE42axF.js} +7 -7
- package/{useHasTabbableChild-BE81d_ab.js → useHasTabbableChild-DP62kzkG.js} +1 -1
- package/{useHighlightSelectionDescription-BfR_vGOe.cjs → useHighlightSelectionDescription-DmbDkFGY.cjs} +1 -1
- package/{useHighlightSelectionDescription-D73hrkmn.js → useHighlightSelectionDescription-xr_16pKd.js} +2 -2
- package/{useListState-CebsX_1d.js → useListState-DNB7JWoj.js} +1 -1
- package/{useListState-DymkJGDF.cjs → useListState-wLau6fXo.cjs} +1 -1
- package/{usePress-DuR4pVsE.js → usePress-BW47IcyU.js} +34 -34
- package/{useSingleSelectListState-BLXvGjLI.js → useSingleSelectListState-B0OMoHd_.js} +1 -1
- package/{useSingleSelectListState-BPhlCU26.cjs → useSingleSelectListState-DlO5H9N-.cjs} +1 -1
- package/{useTextField-C-sUypsx.js → useTextField-DjxayZsV.js} +2 -2
- package/{utils-DJhAJHk_.js → utils-KLjWgdLR.js} +5 -5
- package/{x-JK7i-TQC.js → x-C2xUHAEl.js} +5 -5
- package/x-rV-nu490.cjs +6 -0
- package/BadgeContainer-I1XA3OCl.cjs +0 -1
- package/Button.module-DEQtBYe5.cjs +0 -1
- package/Button.module-tti8HGxs.js +0 -14
- package/CheckboxGroup-DmUOM0xl.cjs +0 -1
- package/ColorSchemeSwitch-DDXdSzqg.cjs +0 -16
- package/ComboBox-BBC7jhnm.cjs +0 -1
- package/DateInputDivider-3BvwXXa9.cjs +0 -1
- package/DateRangePicker-BPlZ12r8.cjs +0 -6
- package/Dialog-CSnN6baf.cjs +0 -1
- package/Dropdown-DAsVShlt.cjs +0 -6
- package/FieldError-B3YFj-an.js +0 -23
- package/FieldError-BbR-29BM.js +0 -28
- package/FieldError-MVsU-Mgw.cjs +0 -1
- package/FieldError-bRTpchvr.cjs +0 -1
- package/Layout-Dw-oCqxd.cjs +0 -16
- package/Link-D92ftFi2.cjs +0 -6
- package/Link-DegonJfl.js +0 -59
- package/LinkButton-CckYzfJ8.js +0 -69
- package/LinkButton-DKZ4z6zu.cjs +0 -6
- package/Popover-CnAsw3wI.cjs +0 -1
- package/Radio-B2zfEFdq.cjs +0 -1
- package/RangeCalendar-C1LFeOVk.cjs +0 -11
- package/SearchField-CML0kjtn.cjs +0 -6
- package/Select-DKey6CeS.cjs +0 -1
- package/SelectionManager-D0jYUYcy.cjs +0 -1
- package/Spinner-CbJ6YAz-.js +0 -53
- package/Spinner-yHcy8YHC.cjs +0 -6
- package/Table-DkvNp6xm.cjs +0 -16
- package/Tag-CFWZ2LQW.cjs +0 -1
- package/arrow-right-QJ2gXPKQ.cjs +0 -6
- package/check-CLF6Yxza.js +0 -11
- package/check-D_KoootC.cjs +0 -6
- package/chevron-down-Cd1bkzXT.js +0 -13
- package/chevron-down-jl83cllc.cjs +0 -6
- package/circle-check-BGo8gML8.cjs +0 -11
- package/createLucideIcon-Cg_wkoIA.cjs +0 -21
- package/createLucideIcon-DeWljiyi.js +0 -79
- package/file-upload/intl/translations.json.d.ts +0 -17
- package/info-CIEIENo6.cjs +0 -6
- package/scrollIntoView-BLnsPvFA.js +0 -87
- package/scrollIntoView-joIyo-Jt.cjs +0 -1
- package/square-arrow-out-up-right-V4Gd08uI.cjs +0 -6
- package/triangle-alert-DJW8U7jL.cjs +0 -6
- package/x-H8Zrx8-x.cjs +0 -6
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import V, { useRef as S, useEffect as q, useMemo as j, useState as se } from "react";
|
|
2
2
|
import { $ as he, a as Y, c as we, d as ye } from "./mergeProps-C1U1OIeJ.js";
|
|
3
3
|
import { $ as ke, b as xe, m as ue, c as Ae } from "./utils-CoCR_Fce.js";
|
|
4
|
-
import {
|
|
4
|
+
import { b as Fe, c as Pe, f as Ie } from "./usePress-BW47IcyU.js";
|
|
5
5
|
import { $ as J } from "./useEvent-CigwyJOw.js";
|
|
6
|
-
import { a as Me, b as
|
|
7
|
-
import { flushSync as
|
|
8
|
-
import { h as
|
|
9
|
-
import {
|
|
10
|
-
import { $ as
|
|
11
|
-
import { $ as
|
|
6
|
+
import { a as Me, b as pe } from "./scrollIntoView-ClEACHUk.js";
|
|
7
|
+
import { flushSync as Ce } from "react-dom";
|
|
8
|
+
import { h as Be, o as Re, f as ve } from "./useHover-DQvJ3Y-W.js";
|
|
9
|
+
import { b as ae } from "./useFocusable-BjE42axF.js";
|
|
10
|
+
import { $ as Le } from "./FocusScope-BCsrRPqD.js";
|
|
11
|
+
import { $ as Oe } from "./context-CGNJ3grH.js";
|
|
12
|
+
import { $ as ze } from "./useDescription-DYfKjGGU.js";
|
|
12
13
|
import { $ as Ue } from "./useControlledState-u436Wbp1.js";
|
|
13
14
|
function be(n, e) {
|
|
14
15
|
const t = S(!0), l = S(null);
|
|
@@ -20,7 +21,7 @@ function be(n, e) {
|
|
|
20
21
|
}
|
|
21
22
|
const Ve = "react-aria-clear-focus", He = "react-aria-focus";
|
|
22
23
|
function H(n) {
|
|
23
|
-
return
|
|
24
|
+
return Be() ? n.metaKey : n.ctrlKey;
|
|
24
25
|
}
|
|
25
26
|
const We = 500;
|
|
26
27
|
function Ge(n) {
|
|
@@ -60,7 +61,7 @@ function Ge(n) {
|
|
|
60
61
|
type: "longpressend"
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
|
-
}), m =
|
|
64
|
+
}), m = ze(i && !e ? r : void 0);
|
|
64
65
|
return {
|
|
65
66
|
longPressProps: Y(E, m)
|
|
66
67
|
};
|
|
@@ -90,7 +91,7 @@ function Ye(n) {
|
|
|
90
91
|
return t && n.getElementById(t) || e;
|
|
91
92
|
}
|
|
92
93
|
function fe(n) {
|
|
93
|
-
return
|
|
94
|
+
return Re() ? n.altKey : n.ctrlKey;
|
|
94
95
|
}
|
|
95
96
|
function re(n, e) {
|
|
96
97
|
var t, l;
|
|
@@ -133,14 +134,14 @@ function Xe(n) {
|
|
|
133
134
|
function Ne(n) {
|
|
134
135
|
return n.length === 1 || !/^[A-Z]/i.test(n) ? n : "";
|
|
135
136
|
}
|
|
136
|
-
function
|
|
137
|
-
let { selectionManager: e, keyboardDelegate: t, ref: l, autoFocus: i = !1, shouldFocusWrap: c = !1, disallowEmptySelection: r = !1, disallowSelectAll: f = !1, escapeKeyBehavior: a = "clearSelection", selectOnFocus: g = e.selectionBehavior === "replace", disallowTypeAhead: E = !1, shouldUseVirtualFocus: m, allowsTabNavigation: v = !1, isVirtualized: $, scrollRef: b = l, linkBehavior: k = "action" } = n, { direction: h } =
|
|
137
|
+
function $t(n) {
|
|
138
|
+
let { selectionManager: e, keyboardDelegate: t, ref: l, autoFocus: i = !1, shouldFocusWrap: c = !1, disallowEmptySelection: r = !1, disallowSelectAll: f = !1, escapeKeyBehavior: a = "clearSelection", selectOnFocus: g = e.selectionBehavior === "replace", disallowTypeAhead: E = !1, shouldUseVirtualFocus: m, allowsTabNavigation: v = !1, isVirtualized: $, scrollRef: b = l, linkBehavior: k = "action" } = n, { direction: h } = Oe(), d = Pe(), K = (o) => {
|
|
138
139
|
var s;
|
|
139
140
|
if (o.altKey && o.key === "Tab" && o.preventDefault(), !(!((s = l.current) === null || s === void 0) && s.contains(o.target))) return;
|
|
140
141
|
const p = (u, z) => {
|
|
141
142
|
if (u != null) {
|
|
142
143
|
if (e.isLink(u) && k === "selection" && g && !fe(o)) {
|
|
143
|
-
|
|
144
|
+
Ce(() => {
|
|
144
145
|
e.setFocusedKey(u, z);
|
|
145
146
|
});
|
|
146
147
|
let U = re(l, u), de = e.getItemProps(u);
|
|
@@ -218,7 +219,7 @@ function bt(n) {
|
|
|
218
219
|
if (!v) {
|
|
219
220
|
if (o.shiftKey) l.current.focus();
|
|
220
221
|
else {
|
|
221
|
-
let u =
|
|
222
|
+
let u = Le(l.current, {
|
|
222
223
|
tabbable: !0
|
|
223
224
|
}), z, U;
|
|
224
225
|
do
|
|
@@ -317,7 +318,7 @@ function bt(n) {
|
|
|
317
318
|
if (!(s instanceof HTMLElement))
|
|
318
319
|
return;
|
|
319
320
|
(o === "keyboard" || R.current) && (O.current && cancelAnimationFrame(O.current), O.current = requestAnimationFrame(() => {
|
|
320
|
-
b.current && (
|
|
321
|
+
b.current && (Me(b.current, s), o !== "virtual" && pe(s, {
|
|
321
322
|
containingElement: l.current
|
|
322
323
|
}));
|
|
323
324
|
}));
|
|
@@ -350,7 +351,7 @@ function bt(n) {
|
|
|
350
351
|
})
|
|
351
352
|
};
|
|
352
353
|
}
|
|
353
|
-
function
|
|
354
|
+
function mt(n) {
|
|
354
355
|
let { id: e, selectionManager: t, key: l, ref: i, shouldSelectOnPressUp: c, shouldUseVirtualFocus: r, focus: f, isDisabled: a, onAction: g, allowsDifferentPressOrigin: E, linkBehavior: m = "action" } = n, v = Pe();
|
|
355
356
|
e = we(e);
|
|
356
357
|
let $ = (s) => {
|
|
@@ -627,7 +628,7 @@ function et(n, e) {
|
|
|
627
628
|
function oe(n) {
|
|
628
629
|
return n[0].toUpperCase() + n.slice(1);
|
|
629
630
|
}
|
|
630
|
-
function
|
|
631
|
+
function gt(n, e, t) {
|
|
631
632
|
let l = j(() => new _e(), []), { children: i, items: c, collection: r } = n;
|
|
632
633
|
return j(() => {
|
|
633
634
|
if (r) return r;
|
|
@@ -659,7 +660,7 @@ function it(n, e) {
|
|
|
659
660
|
t++;
|
|
660
661
|
}
|
|
661
662
|
}
|
|
662
|
-
function
|
|
663
|
+
function Kt(n) {
|
|
663
664
|
let e;
|
|
664
665
|
for (let t of n) e = t;
|
|
665
666
|
return e;
|
|
@@ -692,7 +693,7 @@ function nt(n, e) {
|
|
|
692
693
|
if (!e.has(t)) return !1;
|
|
693
694
|
return !0;
|
|
694
695
|
}
|
|
695
|
-
function
|
|
696
|
+
function St(n) {
|
|
696
697
|
let { selectionMode: e = "none", disallowEmptySelection: t = !1, allowDuplicateSelectionEvents: l, selectionBehavior: i = "toggle", disabledBehavior: c = "all" } = n, r = S(!1), [, f] = se(!1), a = S(null), g = S(null), [, E] = se(null), m = j(() => Se(n.selectedKeys), [
|
|
697
698
|
n.selectedKeys
|
|
698
699
|
]), v = j(() => Se(n.defaultSelectedKeys, new M()), [
|
|
@@ -1017,16 +1018,16 @@ class Ee {
|
|
|
1017
1018
|
}
|
|
1018
1019
|
}
|
|
1019
1020
|
export {
|
|
1020
|
-
|
|
1021
|
-
|
|
1021
|
+
St as $,
|
|
1022
|
+
gt as a,
|
|
1022
1023
|
Ee as b,
|
|
1023
1024
|
re as c,
|
|
1024
|
-
|
|
1025
|
-
|
|
1025
|
+
mt as d,
|
|
1026
|
+
$t as e,
|
|
1026
1027
|
tt as f,
|
|
1027
1028
|
Xe as g,
|
|
1028
1029
|
je as h,
|
|
1029
|
-
|
|
1030
|
+
Kt as i,
|
|
1030
1031
|
lt as j,
|
|
1031
1032
|
it as k,
|
|
1032
1033
|
Ge as l
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { e as b, f as u } from "./SelectionManager-
|
|
2
|
-
import { $ as m, a as p } from "./ListKeyboardDelegate-
|
|
1
|
+
import { e as b, f as u } from "./SelectionManager-BubxiIKu.js";
|
|
2
|
+
import { $ as m, a as p } from "./ListKeyboardDelegate-C-sPNj0f.js";
|
|
3
3
|
import x, { useMemo as g, createContext as d } from "react";
|
|
4
|
-
import { $ as y } from "./utils-
|
|
5
|
-
import { $ as h } from "./Collection
|
|
4
|
+
import { $ as y } from "./utils-KLjWgdLR.js";
|
|
5
|
+
import { $ as h } from "./Collection-D2jVTmDW.js";
|
|
6
6
|
function P(t) {
|
|
7
7
|
let { selectionManager: e, collection: a, disabledKeys: r, ref: c, keyboardDelegate: o, layoutDelegate: l } = t, $ = m({
|
|
8
8
|
usage: "search",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./SelectionManager-
|
|
1
|
+
"use strict";const i=require("./SelectionManager-BJjqIWtf.cjs"),b=require("./ListKeyboardDelegate-ZKBk2IId.cjs"),d=require("react"),p=require("./utils-DHNZrQmj.cjs"),g=require("./Collection-BtBX5IMY.cjs");function y(t){let{selectionManager:e,collection:a,disabledKeys:r,ref:o,keyboardDelegate:c,layoutDelegate:$}=t,l=b.$325a3faab7a68acd$export$a16aca283550c30d({usage:"search",sensitivity:"base"}),n=e.disabledBehavior,u=d.useMemo(()=>c||new b.$2a25aae57d74318e$export$a05409b8bb224a5a({collection:a,disabledKeys:r,disabledBehavior:n,ref:o,collator:l,layoutDelegate:$}),[c,$,a,r,o,l,n]),{collectionProps:x}=i.$ae20dd8cbca75726$export$d6daf82dcd84e87c({...t,ref:o,selectionManager:e,keyboardDelegate:u});return{listProps:x}}const f=new WeakMap;function h(t){let e=f.get(t);if(e!=null)return e;let a=0,r=o=>{for(let c of o)c.type==="section"?r(i.$c5a24bc478652b5f$export$1005530eda016c13(c,t)):c.type==="item"&&a++};return r(t),f.set(t,a),a}const D=d.createContext(null),s=d.createContext({}),m=g.$e1995378a142960e$export$18af5c7a9e9b3664("header",function(e,a){return[e,a]=p.$64fa3d84918910a7$export$29f1550f4b0d4415(e,a,s),d.createElement("header",{className:"react-aria-Header",...e,ref:a},e.children)}),M=d.createContext({});exports.$431f98aba6844401$export$6615d83f6de245ce=M;exports.$453cc9f0df89c0a5$export$77d5aafae4e095b2=h;exports.$72a5793c14baf454$export$8b251419efc915eb=m;exports.$72a5793c14baf454$export$e0e4026c12a8bdbb=s;exports.$982254629710d113$export$b95089534ab7c1fd=y;exports.$d2f53cda644affe3$export$65d2a03b8800d6e3=D;
|
|
@@ -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-BF-dPard.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-BJjqIWtf.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-DlO5H9N-.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;
|