@eightshift/ui-components 7.2.0 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Autocomplete-pLMPWMFq.js +451 -0
- package/dist/Button-Biwg7zwt.js +223 -0
- package/dist/Dialog-C1sh8jbh.js +2474 -0
- package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
- package/dist/FocusScope-lGkM8AO8.js +734 -0
- package/dist/Form-BxIJCHYd.js +5 -0
- package/dist/Heading-B2EsUuu6.js +16 -0
- package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
- package/dist/I18nProvider-Cm6dj5jY.js +93 -0
- package/dist/Label-B1TkoVOG.js +17 -0
- package/dist/ListBox-BquE0m8z.js +584 -0
- package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
- package/dist/PortalProvider-BYcv24il.js +13 -0
- package/dist/RadioGroup-BxjLooWU.js +324 -0
- package/dist/SearchField-BkAU0HLm.js +322 -0
- package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
- package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
- package/dist/Text-C8pfwn0W.js +16 -0
- package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
- package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
- package/dist/assets/fonts/google-sans-flex-latin-ext-full-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-latin-full-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-symbols-full-normal.woff2 +0 -0
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
- package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
- package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
- package/dist/components/base-control/base-control.js +2 -2
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/index.js +15 -15
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -5
- package/dist/components/menu/menu.js +11 -11
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +3 -3
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-picker-shell.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/portal-provider/portal-provider.js +2 -2
- package/dist/components/radio/radio.js +9 -9
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.js +3 -3
- package/dist/components/responsive/mini-responsive.js +6 -6
- package/dist/components/responsive/responsive-legacy.js +5 -5
- package/dist/components/responsive/responsive.js +5 -5
- package/dist/components/responsive-preview/responsive-preview.js +2 -2
- package/dist/components/select/async-multi-select.js +27 -26
- package/dist/components/select/async-select.js +27 -26
- package/dist/components/select/multi-select.js +33 -32
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +33 -32
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +8 -8
- package/dist/components/slider/slider.js +8 -8
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
- package/dist/filterDOMProps-BfW758QC.js +69 -0
- package/dist/{gradient-editor-xfxA_s9a.js → gradient-editor-CInqVF8v.js} +6 -11
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +15 -15
- package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
- package/dist/{jsx-svg-BRJ4n3pD.js → jsx-svg-DT1SBWuP.js} +6 -12
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-Bh8G7Urm.js → link-input-BDFhSSvH.js} +324 -356
- package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
- package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
- package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
- package/dist/{shared-BiWZjrGF.js → shared-CI4kcnm8.js} +482 -502
- package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
- package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
- package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
- package/dist/{tabs-DaIUEc0g.js → tabs-C2tPOEYr.js} +150 -153
- package/dist/textSelection-BhX_2zV9.js +45 -0
- package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
- package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
- package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
- package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
- package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
- package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
- package/dist/useField-BXf__jxy.js +32 -0
- package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
- package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
- package/dist/useFormReset-BuMc_O4y.js +17 -0
- package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
- package/dist/useHover-lyApu3ba.js +975 -0
- package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
- package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
- package/dist/useListState-u6DfeXHi.js +135 -0
- package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
- package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
- package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
- package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
- package/dist/usePress-Dnx5rBoD.js +593 -0
- package/dist/useTextField-BW3ZwGyz.js +159 -0
- package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
- package/dist/useToggleState-D5P01lch.js +22 -0
- package/dist/useToolbar-BT25-MJg.js +55 -0
- package/dist/utilities/debounce-throttle.js +1 -1
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +3 -3
- package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
- package/package.json +18 -18
- package/dist/Button-h6xF_WrP.js +0 -225
- package/dist/Dialog-i5VLQw1o.js +0 -2488
- package/dist/FocusScope-CgwbGOBB.js +0 -746
- package/dist/Form-DTMkbrQY.js +0 -5
- package/dist/Heading-Hol-wS_B.js +0 -16
- package/dist/Input-BURqyJXW.js +0 -161
- package/dist/Label-DFXXxMKY.js +0 -17
- package/dist/ListBox-B21SgugS.js +0 -601
- package/dist/OverlayArrow-BoloUPQM.js +0 -573
- package/dist/PortalProvider-DinZZCKX.js +0 -14
- package/dist/RSPContexts-C_z0bI8W.js +0 -12
- package/dist/RadioGroup-BwlGtCja.js +0 -329
- package/dist/SearchField-DR_I4_yn.js +0 -765
- package/dist/SelectionIndicator-31L6EI9F.js +0 -13
- package/dist/Text-O6VBBDlP.js +0 -16
- package/dist/context-C-XNeJ_l.js +0 -93
- package/dist/filterDOMProps-_2_3GD-K.js +0 -69
- package/dist/textSelection-Dv6WPj0Z.js +0 -45
- package/dist/useField-D0WrzR2F.js +0 -32
- package/dist/useFormReset-DdkykzAn.js +0 -18
- package/dist/useHover-qaMm3XFO.js +0 -982
- package/dist/useListState-CD_5vfyy.js +0 -147
- package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
- package/dist/usePress-ZP1TjkFf.js +0 -678
- package/dist/useToggleState-IIDbiKPl.js +0 -23
- /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
- /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
- /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
- /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
- /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
- /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-BUU5J41u.js";
|
|
2
|
-
import { c as $
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as $
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as $
|
|
11
|
-
import {
|
|
12
|
-
import { t as $
|
|
13
|
-
import { n as $
|
|
2
|
+
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, h as $c4867b2f328c2698$export$e5c5a5f917a5871c, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-JFcCNFzy.js";
|
|
3
|
+
import { b as $caaf0dd3060ed57c$export$7e924b3091a3bd18, d as $3e6197669829fe11$export$40bfa8c7b0832715, i as $d1116acdf220c2da$export$4c014de7c8940b4c, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-lyApu3ba.js";
|
|
4
|
+
import { t as $e8ac3c3f5d4bae7f$export$d6875122194c7b44 } from "./useLabels-xOYtkA8o.js";
|
|
5
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-Cm6dj5jY.js";
|
|
6
|
+
import { S as $6f0c29017aeec335$export$d68d59712b04d9d1, a as $f6ba6936bfd098a0$export$ecf600387e221c37, d as $263ab7fc0f95ccdb$export$4feb769f8ddf26c5, f as $263ab7fc0f95ccdb$export$90e00781bc59d8f9, g as $42ceafc619f9c3ba$export$bf788dd355e3a401, h as $42ceafc619f9c3ba$export$18af5c7a9e9b3664, p as $263ab7fc0f95ccdb$export$a164736487e3f0ae, s as $d667c2af82d35a98$export$d6daf82dcd84e87c, v as $42ceafc619f9c3ba$export$fb8073518f34e6ec } from "./useCollection-CBVYSuGz.js";
|
|
7
|
+
import { t as $d7f64c32b702fe2c$export$86427a43e3e48ebb } from "./Hidden-DYY00jLm.js";
|
|
8
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
9
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-BgYY-7ko.js";
|
|
10
|
+
import { n as $792f28e438b9ad5f$export$758399f318e6385a, t as $91fe5e721c7f36c1$export$c9549807523555e0 } from "./SelectionIndicator-Bx_EYBXD.js";
|
|
11
|
+
import { r as $535772f9d2c1f38d$export$2d6ec8fc375ceafa } from "./FocusScope-lGkM8AO8.js";
|
|
12
|
+
import { i as $b24d1bc31a0f941d$export$a9d04c5684123369, t as $b14b6f590b50af39$export$2f645645f7bca764 } from "./useListState-u6DfeXHi.js";
|
|
13
|
+
import { n as $fcc7165e876206c6$export$6d3443f2c48bfc20, t as $fcc7165e876206c6$export$45fda7c47f93fd48 } from "./animation-BJ-2VKdB.js";
|
|
14
14
|
import { RichLabel } from "./components/rich-label/rich-label.js";
|
|
15
|
-
import { t as cva } from "./dist-
|
|
16
|
-
import { r as sprintf, t as __ } from "./build-module-
|
|
15
|
+
import { t as cva } from "./dist-jw8wvxoG.js";
|
|
16
|
+
import { r as sprintf, t as __ } from "./build-module-K6vi4xE0.js";
|
|
17
17
|
import { Notice } from "./components/notice/notice.js";
|
|
18
|
-
import React, { cloneElement, createContext, forwardRef, isValidElement, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
18
|
+
import React, { Children, cloneElement, createContext, forwardRef, isValidElement, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
19
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
//#region node_modules
|
|
21
|
-
function $
|
|
22
|
-
let isDisabled = options
|
|
20
|
+
//#region node_modules/react-aria/dist/private/focus/useHasTabbableChild.mjs
|
|
21
|
+
function $bf14c9739fda2eb3$export$eac1895992b9f3d6(ref, options) {
|
|
22
|
+
let isDisabled = options?.isDisabled;
|
|
23
23
|
let [hasTabbableChild, setHasTabbableChild] = useState(false);
|
|
24
|
-
$
|
|
25
|
-
if (
|
|
24
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
25
|
+
if (ref?.current && !isDisabled) {
|
|
26
26
|
let update = () => {
|
|
27
|
-
if (ref.current) setHasTabbableChild(!!$
|
|
27
|
+
if (ref.current) setHasTabbableChild(!!$535772f9d2c1f38d$export$2d6ec8fc375ceafa(ref.current, { tabbable: true }).nextNode());
|
|
28
28
|
};
|
|
29
29
|
update();
|
|
30
30
|
let observer = new MutationObserver(update);
|
|
@@ -42,43 +42,43 @@ function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
|
|
|
42
42
|
return isDisabled ? false : hasTabbableChild;
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
|
-
//#region node_modules
|
|
46
|
-
var $
|
|
47
|
-
function $
|
|
45
|
+
//#region node_modules/react-aria/dist/private/tabs/utils.mjs
|
|
46
|
+
var $a251981b23baaa12$export$c5f62239608282b6 = new WeakMap();
|
|
47
|
+
function $a251981b23baaa12$export$567fc7097e064344(state, key, role) {
|
|
48
48
|
if (!state) return "";
|
|
49
49
|
if (typeof key === "string") key = key.replace(/\s+/g, "");
|
|
50
|
-
let baseId = $
|
|
50
|
+
let baseId = $a251981b23baaa12$export$c5f62239608282b6.get(state);
|
|
51
51
|
if (process.env.NODE_ENV !== "production" && !baseId) console.error("There is no tab id, please check if you have rendered the tab panel before the tab list.");
|
|
52
52
|
return `${baseId}-${role}-${key}`;
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
|
-
//#region node_modules
|
|
56
|
-
function $
|
|
55
|
+
//#region node_modules/react-aria/dist/private/tabs/useTab.mjs
|
|
56
|
+
function $1b6fa05bad3d7740$export$fdf4756d5b8ef90a(props, state, ref) {
|
|
57
57
|
let { key, isDisabled: propsDisabled, shouldSelectOnPressUp } = props;
|
|
58
58
|
let { selectionManager: manager, selectedKey } = state;
|
|
59
59
|
let isSelected = key === selectedKey;
|
|
60
60
|
let isDisabled = propsDisabled || state.isDisabled || state.selectionManager.isDisabled(key);
|
|
61
|
-
let
|
|
61
|
+
let item = state.collection.getItem(key);
|
|
62
|
+
let { itemProps, isPressed } = $f6ba6936bfd098a0$export$ecf600387e221c37({
|
|
62
63
|
selectionManager: manager,
|
|
63
64
|
key,
|
|
64
65
|
ref,
|
|
65
66
|
isDisabled,
|
|
66
|
-
shouldSelectOnPressUp,
|
|
67
|
+
shouldSelectOnPressUp: shouldSelectOnPressUp ?? item?.props.href != null,
|
|
67
68
|
linkBehavior: "selection"
|
|
68
69
|
});
|
|
69
|
-
let tabId = $
|
|
70
|
-
let tabPanelId = $
|
|
70
|
+
let tabId = $a251981b23baaa12$export$567fc7097e064344(state, key, "tab");
|
|
71
|
+
let tabPanelId = $a251981b23baaa12$export$567fc7097e064344(state, key, "tabpanel");
|
|
71
72
|
let { tabIndex } = itemProps;
|
|
72
|
-
let
|
|
73
|
-
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(item === null || item === void 0 ? void 0 : item.props, { labelable: true });
|
|
73
|
+
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(item?.props, { labelable: true });
|
|
74
74
|
delete domProps.id;
|
|
75
|
-
let linkProps = $
|
|
76
|
-
let { focusableProps } = $
|
|
77
|
-
...item
|
|
75
|
+
let linkProps = $caaf0dd3060ed57c$export$7e924b3091a3bd18(item?.props);
|
|
76
|
+
let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c({
|
|
77
|
+
...item?.props,
|
|
78
78
|
isDisabled
|
|
79
79
|
}, ref);
|
|
80
80
|
return {
|
|
81
|
-
tabProps: $
|
|
81
|
+
tabProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, focusableProps, linkProps, itemProps, {
|
|
82
82
|
id: tabId,
|
|
83
83
|
"aria-selected": isSelected,
|
|
84
84
|
"aria-disabled": isDisabled || void 0,
|
|
@@ -92,15 +92,14 @@ function $0175d55c2a017ebc$export$fdf4756d5b8ef90a(props, state, ref) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
//#endregion
|
|
95
|
-
//#region node_modules
|
|
96
|
-
function $
|
|
97
|
-
let tabIndex = $
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return { tabPanelProps: $3ef42575df84b30b$export$9d1611c77c2fe928($313b98861ee5dd6c$export$d6875122194c7b44({
|
|
95
|
+
//#region node_modules/react-aria/dist/private/tabs/useTabPanel.mjs
|
|
96
|
+
function $7d951241dadd72e4$export$fae0121b5afe572d(props, state, ref) {
|
|
97
|
+
let tabIndex = $bf14c9739fda2eb3$export$eac1895992b9f3d6(ref) ? void 0 : 0;
|
|
98
|
+
const id = $a251981b23baaa12$export$567fc7097e064344(state, props.id ?? state?.selectedKey, "tabpanel");
|
|
99
|
+
return { tabPanelProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928($e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
101
100
|
...props,
|
|
102
101
|
id,
|
|
103
|
-
"aria-labelledby": $
|
|
102
|
+
"aria-labelledby": $a251981b23baaa12$export$567fc7097e064344(state, state?.selectedKey, "tab")
|
|
104
103
|
}), {
|
|
105
104
|
tabIndex,
|
|
106
105
|
role: "tabpanel",
|
|
@@ -109,8 +108,14 @@ function $34bce698202e07cb$export$fae0121b5afe572d(props, state, ref) {
|
|
|
109
108
|
}) };
|
|
110
109
|
}
|
|
111
110
|
//#endregion
|
|
112
|
-
//#region node_modules
|
|
113
|
-
var $
|
|
111
|
+
//#region node_modules/react-aria/dist/private/tabs/TabsKeyboardDelegate.mjs
|
|
112
|
+
var $a226bee26c88efd7$export$15010ca3c1abe90b = class {
|
|
113
|
+
constructor(collection, direction, orientation, disabledKeys = new Set()) {
|
|
114
|
+
this.collection = collection;
|
|
115
|
+
this.flipDirection = direction === "rtl" && orientation === "horizontal";
|
|
116
|
+
this.disabledKeys = disabledKeys;
|
|
117
|
+
this.tabDirection = orientation === "horizontal";
|
|
118
|
+
}
|
|
114
119
|
getKeyLeftOf(key) {
|
|
115
120
|
if (this.flipDirection) return this.getNextKey(key);
|
|
116
121
|
return this.getPreviousKey(key);
|
|
@@ -120,8 +125,7 @@ var $bfc6f2d60b8a4c40$export$15010ca3c1abe90b = class {
|
|
|
120
125
|
return this.getNextKey(key);
|
|
121
126
|
}
|
|
122
127
|
isDisabled(key) {
|
|
123
|
-
|
|
124
|
-
return this.disabledKeys.has(key) || !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0 ? void 0 : _this_collection_getItem_props.isDisabled);
|
|
128
|
+
return this.disabledKeys.has(key) || !!this.collection.getItem(key)?.props?.isDisabled;
|
|
125
129
|
}
|
|
126
130
|
getFirstKey() {
|
|
127
131
|
let key = this.collection.getFirstKey();
|
|
@@ -157,23 +161,17 @@ var $bfc6f2d60b8a4c40$export$15010ca3c1abe90b = class {
|
|
|
157
161
|
} while (key != null && this.isDisabled(key));
|
|
158
162
|
return key;
|
|
159
163
|
}
|
|
160
|
-
constructor(collection, direction, orientation, disabledKeys = new Set()) {
|
|
161
|
-
this.collection = collection;
|
|
162
|
-
this.flipDirection = direction === "rtl" && orientation === "horizontal";
|
|
163
|
-
this.disabledKeys = disabledKeys;
|
|
164
|
-
this.tabDirection = orientation === "horizontal";
|
|
165
|
-
}
|
|
166
164
|
};
|
|
167
165
|
//#endregion
|
|
168
|
-
//#region node_modules
|
|
169
|
-
function $
|
|
166
|
+
//#region node_modules/react-aria/dist/private/tabs/useTabList.mjs
|
|
167
|
+
function $83428e53deb13caf$export$773e389e644c5874(props, state, ref) {
|
|
170
168
|
let { orientation = "horizontal", keyboardActivation = "automatic" } = props;
|
|
171
169
|
let { collection, selectionManager: manager, disabledKeys } = state;
|
|
172
|
-
let { direction } = $
|
|
173
|
-
let { collectionProps } = $
|
|
170
|
+
let { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
171
|
+
let { collectionProps } = $d667c2af82d35a98$export$d6daf82dcd84e87c({
|
|
174
172
|
ref,
|
|
175
173
|
selectionManager: manager,
|
|
176
|
-
keyboardDelegate: useMemo(() => new $
|
|
174
|
+
keyboardDelegate: useMemo(() => new $a226bee26c88efd7$export$15010ca3c1abe90b(collection, direction, orientation, disabledKeys), [
|
|
177
175
|
collection,
|
|
178
176
|
disabledKeys,
|
|
179
177
|
orientation,
|
|
@@ -184,10 +182,10 @@ function $58d314389b21fa3f$export$773e389e644c5874(props, state, ref) {
|
|
|
184
182
|
scrollRef: ref,
|
|
185
183
|
linkBehavior: "selection"
|
|
186
184
|
});
|
|
187
|
-
let tabsId = $
|
|
188
|
-
$
|
|
185
|
+
let tabsId = $390e54f620492c70$export$f680877a34711e37();
|
|
186
|
+
$a251981b23baaa12$export$c5f62239608282b6.set(state, tabsId);
|
|
189
187
|
return { tabListProps: {
|
|
190
|
-
...$
|
|
188
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(collectionProps, $e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
191
189
|
...props,
|
|
192
190
|
id: tabsId
|
|
193
191
|
})),
|
|
@@ -197,12 +195,11 @@ function $58d314389b21fa3f$export$773e389e644c5874(props, state, ref) {
|
|
|
197
195
|
} };
|
|
198
196
|
}
|
|
199
197
|
//#endregion
|
|
200
|
-
//#region node_modules
|
|
201
|
-
function $
|
|
202
|
-
|
|
203
|
-
let [selectedKey, setSelectedKey] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.selectedKey, (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : null, props.onSelectionChange);
|
|
198
|
+
//#region node_modules/react-stately/dist/private/list/useSingleSelectListState.mjs
|
|
199
|
+
function $0fdb127d377ffd84$export$e7f05e985daf4b5f(props) {
|
|
200
|
+
let [selectedKey, setSelectedKey] = $3e6197669829fe11$export$40bfa8c7b0832715(props.selectedKey, props.defaultSelectedKey ?? null, props.onSelectionChange);
|
|
204
201
|
let selectedKeys = useMemo(() => selectedKey != null ? [selectedKey] : [], [selectedKey]);
|
|
205
|
-
let { collection, disabledKeys, selectionManager } = $
|
|
202
|
+
let { collection, disabledKeys, selectionManager } = $b14b6f590b50af39$export$2f645645f7bca764({
|
|
206
203
|
...props,
|
|
207
204
|
selectionMode: "single",
|
|
208
205
|
disallowEmptySelection: true,
|
|
@@ -210,8 +207,7 @@ function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
|
|
|
210
207
|
selectedKeys,
|
|
211
208
|
onSelectionChange: (keys) => {
|
|
212
209
|
if (keys === "all") return;
|
|
213
|
-
|
|
214
|
-
let key = (_keys_values_next_value = keys.values().next().value) !== null && _keys_values_next_value !== void 0 ? _keys_values_next_value : null;
|
|
210
|
+
let key = keys.values().next().value ?? null;
|
|
215
211
|
if (key === selectedKey && props.onSelectionChange) props.onSelectionChange(key);
|
|
216
212
|
setSelectedKey(key);
|
|
217
213
|
}
|
|
@@ -226,24 +222,22 @@ function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
|
|
|
226
222
|
};
|
|
227
223
|
}
|
|
228
224
|
//#endregion
|
|
229
|
-
//#region node_modules
|
|
230
|
-
function $
|
|
231
|
-
|
|
232
|
-
let state = $a0d645289fe9b86b$export$e7f05e985daf4b5f({
|
|
225
|
+
//#region node_modules/react-stately/dist/private/tabs/useTabListState.mjs
|
|
226
|
+
function $caeb030f09a278a1$export$4ba071daf4e486(props) {
|
|
227
|
+
let state = $0fdb127d377ffd84$export$e7f05e985daf4b5f({
|
|
233
228
|
...props,
|
|
234
229
|
onSelectionChange: props.onSelectionChange ? (key) => {
|
|
235
|
-
|
|
236
|
-
if (key != null) (_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 || _props_onSelectionChange.call(props, key);
|
|
230
|
+
if (key != null) props.onSelectionChange?.(key);
|
|
237
231
|
} : void 0,
|
|
238
232
|
suppressTextValueWarning: true,
|
|
239
|
-
defaultSelectedKey:
|
|
233
|
+
defaultSelectedKey: props.defaultSelectedKey ?? $caeb030f09a278a1$var$findDefaultSelectedKey(props.collection, props.disabledKeys ? new Set(props.disabledKeys) : new Set()) ?? void 0
|
|
240
234
|
});
|
|
241
235
|
let { selectionManager, collection, selectedKey: currentSelectedKey } = state;
|
|
242
236
|
let lastSelectedKey = useRef(currentSelectedKey);
|
|
243
237
|
useEffect(() => {
|
|
244
238
|
let selectedKey = currentSelectedKey;
|
|
245
239
|
if (props.selectedKey == null && (selectionManager.isEmpty || selectedKey == null || !collection.getItem(selectedKey))) {
|
|
246
|
-
selectedKey = $
|
|
240
|
+
selectedKey = $caeb030f09a278a1$var$findDefaultSelectedKey(collection, state.disabledKeys);
|
|
247
241
|
if (selectedKey != null) selectionManager.setSelectedKeys([selectedKey]);
|
|
248
242
|
}
|
|
249
243
|
if (selectedKey != null && selectionManager.focusedKey == null || !selectionManager.isFocused && selectedKey !== lastSelectedKey.current) selectionManager.setFocusedKey(selectedKey);
|
|
@@ -254,41 +248,40 @@ function $76f919a04c5a7d14$export$4ba071daf4e486(props) {
|
|
|
254
248
|
isDisabled: props.isDisabled || false
|
|
255
249
|
};
|
|
256
250
|
}
|
|
257
|
-
function $
|
|
251
|
+
function $caeb030f09a278a1$var$findDefaultSelectedKey(collection, disabledKeys) {
|
|
258
252
|
let selectedKey = null;
|
|
259
253
|
if (collection) {
|
|
260
|
-
var _collection_getItem_props, _collection_getItem, _collection_getItem_props1, _collection_getItem1;
|
|
261
254
|
selectedKey = collection.getFirstKey();
|
|
262
|
-
while (selectedKey != null && (disabledKeys.has(selectedKey) ||
|
|
263
|
-
if (selectedKey != null && (disabledKeys.has(selectedKey) ||
|
|
255
|
+
while (selectedKey != null && (disabledKeys.has(selectedKey) || collection.getItem(selectedKey)?.props?.isDisabled) && selectedKey !== collection.getLastKey()) selectedKey = collection.getKeyAfter(selectedKey);
|
|
256
|
+
if (selectedKey != null && (disabledKeys.has(selectedKey) || collection.getItem(selectedKey)?.props?.isDisabled) && selectedKey === collection.getLastKey()) selectedKey = collection.getFirstKey();
|
|
264
257
|
}
|
|
265
258
|
return selectedKey;
|
|
266
259
|
}
|
|
267
260
|
//#endregion
|
|
268
|
-
//#region node_modules/react-aria-components/dist/Tabs.mjs
|
|
269
|
-
var $
|
|
270
|
-
var $
|
|
271
|
-
var $
|
|
272
|
-
[props, ref] = $
|
|
261
|
+
//#region node_modules/react-aria-components/dist/private/Tabs.mjs
|
|
262
|
+
var $b4f18e3395fe64d7$export$cfa7aa87c26e7d1f = createContext(null);
|
|
263
|
+
var $b4f18e3395fe64d7$export$364712098d2aa57c = createContext(null);
|
|
264
|
+
var $b4f18e3395fe64d7$export$b2539bed5023c21c = forwardRef(function Tabs(props, ref) {
|
|
265
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $b4f18e3395fe64d7$export$cfa7aa87c26e7d1f);
|
|
273
266
|
let { children, orientation = "horizontal" } = props;
|
|
274
267
|
children = useMemo(() => typeof children === "function" ? children({
|
|
275
268
|
orientation,
|
|
276
269
|
defaultChildren: null
|
|
277
270
|
}) : children, [children, orientation]);
|
|
278
|
-
return React.createElement($
|
|
271
|
+
return React.createElement($42ceafc619f9c3ba$export$bf788dd355e3a401, { content: children }, (collection) => React.createElement($b4f18e3395fe64d7$var$TabsInner, {
|
|
279
272
|
props,
|
|
280
273
|
collection,
|
|
281
274
|
tabsRef: ref
|
|
282
275
|
}));
|
|
283
276
|
});
|
|
284
|
-
function $
|
|
277
|
+
function $b4f18e3395fe64d7$var$TabsInner({ props, tabsRef: ref, collection }) {
|
|
285
278
|
let { orientation = "horizontal" } = props;
|
|
286
|
-
let state = $
|
|
279
|
+
let state = $caeb030f09a278a1$export$4ba071daf4e486({
|
|
287
280
|
...props,
|
|
288
281
|
collection,
|
|
289
282
|
children: void 0
|
|
290
283
|
});
|
|
291
|
-
let { focusProps, isFocused, isFocusVisible } = $
|
|
284
|
+
let { focusProps, isFocused, isFocusVisible } = $0c4a58759813079a$export$4e328f61c538687f({ within: true });
|
|
292
285
|
let values = useMemo(() => ({
|
|
293
286
|
orientation,
|
|
294
287
|
isFocusWithin: isFocused,
|
|
@@ -298,39 +291,39 @@ function $5e8ad37a45e1c704$var$TabsInner({ props, tabsRef: ref, collection }) {
|
|
|
298
291
|
isFocused,
|
|
299
292
|
isFocusVisible
|
|
300
293
|
]);
|
|
301
|
-
let renderProps = $
|
|
294
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
302
295
|
...props,
|
|
303
296
|
defaultClassName: "react-aria-Tabs",
|
|
304
297
|
values
|
|
305
298
|
});
|
|
306
|
-
let DOMProps = $
|
|
307
|
-
return React.createElement($
|
|
308
|
-
...$
|
|
299
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
300
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
301
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, focusProps),
|
|
309
302
|
ref,
|
|
310
303
|
slot: props.slot || void 0,
|
|
311
304
|
"data-focused": isFocused || void 0,
|
|
312
305
|
"data-orientation": orientation,
|
|
313
306
|
"data-focus-visible": isFocusVisible || void 0,
|
|
314
307
|
"data-disabled": state.isDisabled || void 0
|
|
315
|
-
}, React.createElement($
|
|
308
|
+
}, React.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [[$b4f18e3395fe64d7$export$cfa7aa87c26e7d1f, props], [$b4f18e3395fe64d7$export$364712098d2aa57c, state]] }, renderProps.children));
|
|
316
309
|
}
|
|
317
|
-
var $
|
|
318
|
-
return useContext($
|
|
310
|
+
var $b4f18e3395fe64d7$export$e51a686c67fdaa2d = forwardRef(function TabList(props, ref) {
|
|
311
|
+
return useContext($b4f18e3395fe64d7$export$364712098d2aa57c) ? React.createElement($b4f18e3395fe64d7$var$TabListInner, {
|
|
319
312
|
props,
|
|
320
313
|
forwardedRef: ref
|
|
321
|
-
}) : React.createElement($
|
|
314
|
+
}) : React.createElement($42ceafc619f9c3ba$export$fb8073518f34e6ec, props);
|
|
322
315
|
});
|
|
323
|
-
function $
|
|
324
|
-
let state = useContext($
|
|
325
|
-
let { CollectionRoot } = useContext($
|
|
326
|
-
let { orientation = "horizontal", keyboardActivation = "automatic" } = $
|
|
327
|
-
let objectRef = $
|
|
328
|
-
let { tabListProps } = $
|
|
316
|
+
function $b4f18e3395fe64d7$var$TabListInner({ props, forwardedRef: ref }) {
|
|
317
|
+
let state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
318
|
+
let { CollectionRoot } = useContext($263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
319
|
+
let { orientation = "horizontal", keyboardActivation = "automatic" } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($b4f18e3395fe64d7$export$cfa7aa87c26e7d1f);
|
|
320
|
+
let objectRef = $03e8ab2d84d7657a$export$4338b53315abf666(ref);
|
|
321
|
+
let { tabListProps } = $83428e53deb13caf$export$773e389e644c5874({
|
|
329
322
|
...props,
|
|
330
323
|
orientation,
|
|
331
324
|
keyboardActivation
|
|
332
325
|
}, state, objectRef);
|
|
333
|
-
let renderProps = $
|
|
326
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
334
327
|
...props,
|
|
335
328
|
children: null,
|
|
336
329
|
defaultClassName: "react-aria-TabList",
|
|
@@ -339,34 +332,37 @@ function $5e8ad37a45e1c704$var$TabListInner({ props, forwardedRef: ref }) {
|
|
|
339
332
|
state
|
|
340
333
|
}
|
|
341
334
|
});
|
|
342
|
-
let DOMProps = $
|
|
335
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
343
336
|
delete DOMProps.id;
|
|
344
|
-
return React.createElement($
|
|
345
|
-
...$
|
|
337
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
338
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, tabListProps),
|
|
346
339
|
ref: objectRef,
|
|
347
340
|
"data-orientation": orientation || void 0
|
|
348
|
-
}, React.createElement($
|
|
341
|
+
}, React.createElement($792f28e438b9ad5f$export$758399f318e6385a, null, React.createElement(CollectionRoot, {
|
|
349
342
|
collection: state.collection,
|
|
350
|
-
persistedKeys: $
|
|
343
|
+
persistedKeys: $263ab7fc0f95ccdb$export$90e00781bc59d8f9(state.selectionManager.focusedKey)
|
|
351
344
|
})));
|
|
352
345
|
}
|
|
353
|
-
var $
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
346
|
+
var $b4f18e3395fe64d7$var$TabItemNode = class extends $6f0c29017aeec335$export$d68d59712b04d9d1 {
|
|
347
|
+
static {
|
|
348
|
+
this.type = "item";
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
var $b4f18e3395fe64d7$export$3e41faf802a29e71 = $42ceafc619f9c3ba$export$18af5c7a9e9b3664($b4f18e3395fe64d7$var$TabItemNode, (props, forwardedRef, item) => {
|
|
352
|
+
let state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
353
|
+
let ref = $03e8ab2d84d7657a$export$4338b53315abf666(forwardedRef);
|
|
354
|
+
let { tabProps, isSelected, isDisabled, isPressed } = $1b6fa05bad3d7740$export$fdf4756d5b8ef90a({
|
|
359
355
|
key: item.key,
|
|
360
356
|
...props
|
|
361
357
|
}, state, ref);
|
|
362
|
-
let { focusProps, isFocused, isFocusVisible } = $
|
|
363
|
-
let { hoverProps, isHovered } = $
|
|
358
|
+
let { focusProps, isFocused, isFocusVisible } = $0c4a58759813079a$export$4e328f61c538687f();
|
|
359
|
+
let { hoverProps, isHovered } = $e969f22b6713ca4a$export$ae780daf29e6d456({
|
|
364
360
|
isDisabled,
|
|
365
361
|
onHoverStart: props.onHoverStart,
|
|
366
362
|
onHoverEnd: props.onHoverEnd,
|
|
367
363
|
onHoverChange: props.onHoverChange
|
|
368
364
|
});
|
|
369
|
-
let renderProps = $
|
|
365
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
370
366
|
...props,
|
|
371
367
|
id: void 0,
|
|
372
368
|
children: item.rendered,
|
|
@@ -380,12 +376,12 @@ var $5e8ad37a45e1c704$export$3e41faf802a29e71 = $e1995378a142960e$export$18af5c7
|
|
|
380
376
|
isHovered
|
|
381
377
|
}
|
|
382
378
|
});
|
|
383
|
-
let ElementType = item.props.href ? $
|
|
384
|
-
let DOMProps = $
|
|
379
|
+
let ElementType = item.props.href ? $7230ffa83bc0c2cf$export$df3a06d6289f983e.a : $7230ffa83bc0c2cf$export$df3a06d6289f983e.div;
|
|
380
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
385
381
|
delete DOMProps.id;
|
|
386
382
|
delete DOMProps.onClick;
|
|
387
383
|
return React.createElement(ElementType, {
|
|
388
|
-
...$
|
|
384
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, tabProps, focusProps, hoverProps),
|
|
389
385
|
ref,
|
|
390
386
|
"data-selected": isSelected || void 0,
|
|
391
387
|
"data-disabled": isDisabled || void 0,
|
|
@@ -393,56 +389,56 @@ var $5e8ad37a45e1c704$export$3e41faf802a29e71 = $e1995378a142960e$export$18af5c7
|
|
|
393
389
|
"data-focus-visible": isFocusVisible || void 0,
|
|
394
390
|
"data-pressed": isPressed || void 0,
|
|
395
391
|
"data-hovered": isHovered || void 0
|
|
396
|
-
}, React.createElement($
|
|
392
|
+
}, React.createElement($91fe5e721c7f36c1$export$c9549807523555e0.Provider, { value: { isSelected } }, renderProps.children));
|
|
397
393
|
});
|
|
398
|
-
var $
|
|
399
|
-
const state = useContext($
|
|
400
|
-
let ref = $
|
|
394
|
+
var $b4f18e3395fe64d7$export$3d96ec278d3efce4 = $d7f64c32b702fe2c$export$86427a43e3e48ebb(function TabPanel(props, forwardedRef) {
|
|
395
|
+
const state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
396
|
+
let ref = $03e8ab2d84d7657a$export$4338b53315abf666(forwardedRef);
|
|
401
397
|
let isSelected = state.selectedKey === props.id;
|
|
402
398
|
let [isInitiallySelected, setInitiallySelected] = useState(state.selectedKey != null ? isSelected : null);
|
|
403
399
|
if (isInitiallySelected == null && state.selectedKey != null) setInitiallySelected(isSelected);
|
|
404
400
|
else if (!isSelected && isInitiallySelected) setInitiallySelected(false);
|
|
405
|
-
let isExiting = $
|
|
401
|
+
let isExiting = $fcc7165e876206c6$export$45fda7c47f93fd48(ref, isSelected);
|
|
406
402
|
if (!isSelected && !props.shouldForceMount && !isExiting) return null;
|
|
407
|
-
return React.createElement($
|
|
403
|
+
return React.createElement($b4f18e3395fe64d7$var$TabPanelInner, {
|
|
408
404
|
...props,
|
|
409
405
|
tabPanelRef: ref,
|
|
410
406
|
isInitiallySelected: isInitiallySelected || false,
|
|
411
407
|
isExiting
|
|
412
408
|
});
|
|
413
409
|
});
|
|
414
|
-
function $
|
|
415
|
-
let state = useContext($
|
|
410
|
+
function $b4f18e3395fe64d7$var$TabPanelInner(props) {
|
|
411
|
+
let state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
416
412
|
let { id, tabPanelRef: ref, isInitiallySelected, isExiting, ...otherProps } = props;
|
|
417
|
-
let { tabPanelProps } = $
|
|
418
|
-
let { focusProps, isFocused, isFocusVisible } = $
|
|
413
|
+
let { tabPanelProps } = $7d951241dadd72e4$export$fae0121b5afe572d(props, state, ref);
|
|
414
|
+
let { focusProps, isFocused, isFocusVisible } = $0c4a58759813079a$export$4e328f61c538687f();
|
|
419
415
|
let isSelected = state.selectedKey === props.id;
|
|
420
|
-
let isEntering = $
|
|
421
|
-
let renderProps = $
|
|
416
|
+
let isEntering = $fcc7165e876206c6$export$6d3443f2c48bfc20(ref) && !isInitiallySelected;
|
|
417
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
422
418
|
...props,
|
|
423
419
|
defaultClassName: "react-aria-TabPanel",
|
|
424
420
|
values: {
|
|
425
421
|
isFocused,
|
|
426
422
|
isFocusVisible,
|
|
427
|
-
isInert: $
|
|
423
|
+
isInert: $b24d1bc31a0f941d$export$a9d04c5684123369(!isSelected),
|
|
428
424
|
isEntering,
|
|
429
425
|
isExiting,
|
|
430
426
|
state
|
|
431
427
|
}
|
|
432
428
|
});
|
|
433
|
-
let DOMProps = $
|
|
429
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(otherProps, { global: true });
|
|
434
430
|
delete DOMProps.id;
|
|
435
|
-
let domProps = isSelected ? $
|
|
436
|
-
return React.createElement($
|
|
431
|
+
let domProps = isSelected ? $bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, tabPanelProps, focusProps, renderProps) : $bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps);
|
|
432
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
437
433
|
...domProps,
|
|
438
434
|
ref,
|
|
439
435
|
"data-focused": isFocused || void 0,
|
|
440
436
|
"data-focus-visible": isFocusVisible || void 0,
|
|
441
|
-
inert: $
|
|
437
|
+
inert: $b24d1bc31a0f941d$export$a9d04c5684123369(!isSelected || props.inert),
|
|
442
438
|
"data-inert": !isSelected ? "true" : void 0,
|
|
443
439
|
"data-entering": isEntering || void 0,
|
|
444
440
|
"data-exiting": isExiting || void 0
|
|
445
|
-
}, React.createElement($
|
|
441
|
+
}, React.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [[$b4f18e3395fe64d7$export$cfa7aa87c26e7d1f, null], [$b4f18e3395fe64d7$export$364712098d2aa57c, null]] }, React.createElement($263ab7fc0f95ccdb$export$4feb769f8ddf26c5.Provider, { value: $263ab7fc0f95ccdb$export$a164736487e3f0ae }, renderProps.children)));
|
|
446
442
|
}
|
|
447
443
|
//#endregion
|
|
448
444
|
//#region lib/components/tabs/tabs.jsx
|
|
@@ -463,7 +459,7 @@ var tabListClasses = cva("es:flex", {
|
|
|
463
459
|
{
|
|
464
460
|
type: ["underline", "underlineSecondary"],
|
|
465
461
|
orientation: "horizontal",
|
|
466
|
-
class: "es:border-b es:border-b-secondary-200 es:justify-center es:rounded-t-lg"
|
|
462
|
+
class: "es:border-b es:border-b-secondary-200 es:justify-center-safe es:rounded-t-lg"
|
|
467
463
|
},
|
|
468
464
|
{
|
|
469
465
|
type: ["underline", "underlineSecondary"],
|
|
@@ -534,7 +530,7 @@ var tabClasses = cva([
|
|
|
534
530
|
invisible: { true: "es:hidden" },
|
|
535
531
|
iconWithLabel: {
|
|
536
532
|
true: "es:justify-start",
|
|
537
|
-
false: "es:justify-center"
|
|
533
|
+
false: "es:justify-center-safe"
|
|
538
534
|
},
|
|
539
535
|
selected: { false: [
|
|
540
536
|
"es:btn-group-h:not-pressed:not-after-current:not-first:rounded-l-sm",
|
|
@@ -550,7 +546,7 @@ var tabClasses = cva([
|
|
|
550
546
|
"underlineSecondary",
|
|
551
547
|
"bubble"
|
|
552
548
|
],
|
|
553
|
-
class: ["es:flex-col es:justify-center", "es:text-secondary-700 es:selected:text-accent-700"]
|
|
549
|
+
class: ["es:flex-col es:justify-center-safe", "es:text-secondary-700 es:selected:text-accent-700"]
|
|
554
550
|
},
|
|
555
551
|
{
|
|
556
552
|
type: ["pill", "pillCompact"],
|
|
@@ -628,12 +624,12 @@ var tabClasses = cva([
|
|
|
628
624
|
{
|
|
629
625
|
type: ["pill"],
|
|
630
626
|
vertical: false,
|
|
631
|
-
class: ["es:justify-center es:px-6"]
|
|
627
|
+
class: ["es:justify-center-safe es:px-6"]
|
|
632
628
|
},
|
|
633
629
|
{
|
|
634
630
|
type: ["pillCompact"],
|
|
635
631
|
vertical: false,
|
|
636
|
-
class: ["es:justify-center es:px-3"]
|
|
632
|
+
class: ["es:justify-center-safe es:px-3"]
|
|
637
633
|
},
|
|
638
634
|
{
|
|
639
635
|
type: ["pill"],
|
|
@@ -688,7 +684,7 @@ var tabIconClasses = cva("es:transition es:duration-200 es:ease-spring-bouncy",
|
|
|
688
684
|
});
|
|
689
685
|
var tabBadgeClasses = cva([
|
|
690
686
|
"es:transition-plus",
|
|
691
|
-
"es:flex es:items-center-safe es:justify-center",
|
|
687
|
+
"es:flex es:items-center-safe es:justify-center-safe",
|
|
692
688
|
"es:min-h-4.5 es:min-w-4.5 es:leading-none es:rounded-full es:shrink-0",
|
|
693
689
|
"es:text-12 es:leading-none es:text-box-trim",
|
|
694
690
|
"es:any-icon:size-2.5"
|
|
@@ -814,11 +810,12 @@ var Tabs = (props) => {
|
|
|
814
810
|
if (hidden) return null;
|
|
815
811
|
let tabPanelCounter = 1;
|
|
816
812
|
let tabCounter = 1;
|
|
817
|
-
const preparedChildren =
|
|
818
|
-
|
|
813
|
+
const preparedChildren = Children.toArray(children);
|
|
814
|
+
const realTabIds = Children.toArray(preparedChildren?.[0]?.props?.children).map((tab, i) => tab?.props?.id ?? `tab-${baseId}-${i + 1}`);
|
|
819
815
|
const childrenWithIds = preparedChildren.reduce((acc, child, index) => {
|
|
816
|
+
if (!isValidElement(child)) return acc;
|
|
820
817
|
if (child.type.displayName === "TabList") {
|
|
821
|
-
const childItems =
|
|
818
|
+
const childItems = Children.toArray(child?.props?.children);
|
|
822
819
|
tabCounter = (childItems?.length ?? 0) + 1;
|
|
823
820
|
if (childItems.length < 1) return acc;
|
|
824
821
|
return [...acc, cloneElement(child, {
|
|
@@ -848,7 +845,7 @@ var Tabs = (props) => {
|
|
|
848
845
|
subtitle: sprintf(__("Number of <Tab>s (%s) and <TabPanel>s (%s) should be the same. <Tab>s should be within a <TabList>.", "eightshift-ui-components"), tabCounter - 1, tabPanelCounter - 1),
|
|
849
846
|
alignIconToTitle: true
|
|
850
847
|
});
|
|
851
|
-
return jsx($
|
|
848
|
+
return jsx($b4f18e3395fe64d7$export$b2539bed5023c21c, {
|
|
852
849
|
...rest,
|
|
853
850
|
orientation: vertical ? "vertical" : "horizontal",
|
|
854
851
|
className: clsx(vertical ? "es:grid es:gap-4" : "es:flex-col", vertical && [
|
|
@@ -877,7 +874,7 @@ Tabs.displayName = "Tabs";
|
|
|
877
874
|
*/
|
|
878
875
|
var TabList = (props) => {
|
|
879
876
|
const { children, "aria-label": ariaLabel, className, type, flat, ...other } = props;
|
|
880
|
-
return jsx($
|
|
877
|
+
return jsx($b4f18e3395fe64d7$export$e51a686c67fdaa2d, {
|
|
881
878
|
"aria-label": ariaLabel ?? __("tabs", "eightshift-ui-components"),
|
|
882
879
|
className: ({ orientation }) => clsx(tabListClasses({
|
|
883
880
|
orientation,
|
|
@@ -909,7 +906,7 @@ TabList.displayName = "TabList";
|
|
|
909
906
|
*/
|
|
910
907
|
var Tab = (props) => {
|
|
911
908
|
const { children, disabled, isParentVertical, className, badgeClassName, icon, label, subtitle, type, badge, invisible, flat, ...other } = props;
|
|
912
|
-
return jsxs($
|
|
909
|
+
return jsxs($b4f18e3395fe64d7$export$3e41faf802a29e71, {
|
|
913
910
|
...other,
|
|
914
911
|
isDisabled: disabled || invisible,
|
|
915
912
|
className: clsx(tabClasses({
|
|
@@ -961,7 +958,7 @@ Tab.displayName = "Tab";
|
|
|
961
958
|
*/
|
|
962
959
|
var TabPanel = (props) => {
|
|
963
960
|
const { children, className, type, vertical, ...other } = props;
|
|
964
|
-
return jsx($
|
|
961
|
+
return jsx($b4f18e3395fe64d7$export$3d96ec278d3efce4, {
|
|
965
962
|
...other,
|
|
966
963
|
className: clsx(tabPanelClasses({
|
|
967
964
|
type,
|