lizaui 12.0.19 → 12.0.21
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/button-group/index.cjs.js +1 -1
- package/dist/button-group/index.es.js +2 -2
- package/dist/button-v2/index.cjs.js +3 -3
- package/dist/button-v2/index.es.js +3 -3
- package/dist/chunks/{Button-daStTTzk.js → Button-Bumy9bze.js} +7 -56
- package/dist/chunks/Button-Bumy9bze.js.map +1 -0
- package/dist/chunks/{Button-DK8vIKEw.js → Button-CFYOfByw.js} +9 -58
- package/dist/chunks/Button-CFYOfByw.js.map +1 -0
- package/dist/chunks/{FocusScope-D-jCzxHq.js → FocusScope-4TdD5fCA.js} +3 -3
- package/dist/chunks/{FocusScope-D-jCzxHq.js.map → FocusScope-4TdD5fCA.js.map} +1 -1
- package/dist/chunks/{FocusScope-BJBTKF3R.js → FocusScope-jSNMAXzg.js} +3 -3
- package/dist/chunks/{FocusScope-BJBTKF3R.js.map → FocusScope-jSNMAXzg.js.map} +1 -1
- package/dist/chunks/Hidden-BY45Dc0j.js +54 -0
- package/dist/chunks/Hidden-BY45Dc0j.js.map +1 -0
- package/dist/chunks/Hidden-C55DpjMP.js +55 -0
- package/dist/chunks/Hidden-C55DpjMP.js.map +1 -0
- package/dist/chunks/{I18nProvider-8HiWALvM.js → I18nProvider-BUfkOEhQ.js} +2 -2
- package/dist/chunks/{I18nProvider-8HiWALvM.js.map → I18nProvider-BUfkOEhQ.js.map} +1 -1
- package/dist/chunks/{I18nProvider-DSyuLrKX.js → I18nProvider-Coj9x7B8.js} +2 -2
- package/dist/chunks/{I18nProvider-DSyuLrKX.js.map → I18nProvider-Coj9x7B8.js.map} +1 -1
- package/dist/chunks/{ProgressBar-CYj13G9N.js → ProgressBar-542C1mif.js} +5 -5
- package/dist/chunks/{ProgressBar-CYj13G9N.js.map → ProgressBar-542C1mif.js.map} +1 -1
- package/dist/chunks/{ProgressBar-BiWM84v5.js → ProgressBar-BiKRsJ8m.js} +5 -5
- package/dist/chunks/{ProgressBar-BiWM84v5.js.map → ProgressBar-BiKRsJ8m.js.map} +1 -1
- package/dist/chunks/SharedElementTransition-BSCoaphV.js +106 -0
- package/dist/chunks/{SharedElementTransition-D87oSBzB.js.map → SharedElementTransition-BSCoaphV.js.map} +1 -1
- package/dist/chunks/SharedElementTransition-CJVe1D_I.js +107 -0
- package/dist/chunks/{SharedElementTransition-BxczX23g.js.map → SharedElementTransition-CJVe1D_I.js.map} +1 -1
- package/dist/chunks/VisuallyHidden-CTe1-RoI.js +49 -0
- package/dist/chunks/VisuallyHidden-CTe1-RoI.js.map +1 -0
- package/dist/chunks/VisuallyHidden-DPJuOMsW.js +50 -0
- package/dist/chunks/VisuallyHidden-DPJuOMsW.js.map +1 -0
- package/dist/chunks/{button-group-CXxfE0Nh.js → button-group-CJ72SS4c.js} +2 -2
- package/dist/chunks/{button-group-CXxfE0Nh.js.map → button-group-CJ72SS4c.js.map} +1 -1
- package/dist/chunks/{button-group-CAIXp_CY.js → button-group-DJ5IdBp6.js} +2 -2
- package/dist/chunks/{button-group-CAIXp_CY.js.map → button-group-DJ5IdBp6.js.map} +1 -1
- package/dist/chunks/{compose-zqddfADC.js → compose-Cfw0sImv.js} +2 -2
- package/dist/chunks/{compose-zqddfADC.js.map → compose-Cfw0sImv.js.map} +1 -1
- package/dist/chunks/{compose-DVjlikkg.js → compose-DOOi0Yan.js} +2 -2
- package/dist/chunks/{compose-DVjlikkg.js.map → compose-DOOi0Yan.js.map} +1 -1
- package/dist/chunks/{focusSafely-CoIRf3xM.js → focusSafely-CKxVSn6H.js} +40 -2
- package/dist/chunks/{focusSafely-CoIRf3xM.js.map → focusSafely-CKxVSn6H.js.map} +1 -1
- package/dist/chunks/{focusSafely-kwqdsDlJ.js → focusSafely-DfEgLKh6.js} +46 -8
- package/dist/chunks/{focusSafely-kwqdsDlJ.js.map → focusSafely-DfEgLKh6.js.map} +1 -1
- package/dist/chunks/mergeRefs-Y9oG13yB.js +24 -0
- package/dist/chunks/mergeRefs-Y9oG13yB.js.map +1 -0
- package/dist/chunks/mergeRefs-t6d4XvXq.js +25 -0
- package/dist/chunks/mergeRefs-t6d4XvXq.js.map +1 -0
- package/dist/chunks/{number-ClNYm70x.js → number-CYgYWykt.js} +2 -2
- package/dist/chunks/{number-ClNYm70x.js.map → number-CYgYWykt.js.map} +1 -1
- package/dist/chunks/{number-apyCzMO6.js → number-DDpsLN2d.js} +2 -2
- package/dist/chunks/{number-apyCzMO6.js.map → number-DDpsLN2d.js.map} +1 -1
- package/dist/chunks/{radio-group-dNkQoY2h.js → radio-group-BwXvYzSm.js} +15 -13
- package/dist/chunks/{radio-group-dNkQoY2h.js.map → radio-group-BwXvYzSm.js.map} +1 -1
- package/dist/chunks/{radio-group-V6X0yA63.js → radio-group-hO2beGF6.js} +17 -15
- package/dist/chunks/{radio-group-V6X0yA63.js.map → radio-group-hO2beGF6.js.map} +1 -1
- package/dist/chunks/useControlledState-DE_m1RML.js +39 -0
- package/dist/chunks/useControlledState-DE_m1RML.js.map +1 -0
- package/dist/chunks/useControlledState-DZA25XHU.js +40 -0
- package/dist/chunks/useControlledState-DZA25XHU.js.map +1 -0
- package/dist/chunks/{useFormReset-Cf2fzi86.js → useFormReset-BYRGk5vb.js} +2 -2
- package/dist/chunks/{useFormReset-Cf2fzi86.js.map → useFormReset-BYRGk5vb.js.map} +1 -1
- package/dist/chunks/{useFormReset-Bwwr8ivc.js → useFormReset-Bgv2ktIE.js} +2 -2
- package/dist/chunks/{useFormReset-Bwwr8ivc.js.map → useFormReset-Bgv2ktIE.js.map} +1 -1
- package/dist/chunks/useHasTabbableChild-CSJ0P5QT.js +2577 -0
- package/dist/chunks/useHasTabbableChild-CSJ0P5QT.js.map +1 -0
- package/dist/chunks/useHasTabbableChild-kl2T5gEX.js +2576 -0
- package/dist/chunks/useHasTabbableChild-kl2T5gEX.js.map +1 -0
- package/dist/chunks/{useHover-B3gEex-2.js → useHover-BHCSbkLb.js} +3 -3
- package/dist/chunks/{useHover-B3gEex-2.js.map → useHover-BHCSbkLb.js.map} +1 -1
- package/dist/chunks/{useHover-Dn1CIUT8.js → useHover-D9f9xyxz.js} +3 -3
- package/dist/chunks/{useHover-Dn1CIUT8.js.map → useHover-D9f9xyxz.js.map} +1 -1
- package/dist/chunks/{useLabel-ClsFWJD0.js → useLabel-CzhH-Tov.js} +4 -23
- package/dist/chunks/useLabel-CzhH-Tov.js.map +1 -0
- package/dist/chunks/{useLabel-todYehRc.js → useLabel-YLbDMN-c.js} +4 -23
- package/dist/chunks/useLabel-YLbDMN-c.js.map +1 -0
- package/dist/chunks/useLabels-BiXnWBSL.js +23 -0
- package/dist/chunks/useLabels-BiXnWBSL.js.map +1 -0
- package/dist/chunks/useLabels-Bl0mJafM.js +24 -0
- package/dist/chunks/useLabels-Bl0mJafM.js.map +1 -0
- package/dist/chunks/{useMove-BifTPO2Z.js → useMove-DeuS9PRx.js} +3 -3
- package/dist/chunks/{useMove-BifTPO2Z.js.map → useMove-DeuS9PRx.js.map} +1 -1
- package/dist/chunks/{useMove-C6JNYkjM.js → useMove-Xpbmb6OD.js} +3 -3
- package/dist/chunks/{useMove-C6JNYkjM.js.map → useMove-Xpbmb6OD.js.map} +1 -1
- package/dist/chunks/{usePress-D_rPVnKY.js → usePress-Arf10jW0.js} +4 -4
- package/dist/chunks/{usePress-D_rPVnKY.js.map → usePress-Arf10jW0.js.map} +1 -1
- package/dist/chunks/{usePress-BtBLddLY.js → usePress-B1yQk_p8.js} +4 -4
- package/dist/chunks/{usePress-BtBLddLY.js.map → usePress-B1yQk_p8.js.map} +1 -1
- package/dist/chunks/{useProgressBar-B1VDzYE6.js → useProgressBar-BsO-Q5JP.js} +4 -4
- package/dist/chunks/{useProgressBar-B1VDzYE6.js.map → useProgressBar-BsO-Q5JP.js.map} +1 -1
- package/dist/chunks/{useProgressBar--b8hyT4v.js → useProgressBar-d2k0k8r0.js} +4 -4
- package/dist/chunks/{useProgressBar--b8hyT4v.js.map → useProgressBar-d2k0k8r0.js.map} +1 -1
- package/dist/chunks/{useSlot-DnUNwd8f.js → useSlot-CFaaZeQE.js} +4 -4
- package/dist/chunks/{useSlot-DnUNwd8f.js.map → useSlot-CFaaZeQE.js.map} +1 -1
- package/dist/chunks/{useSlot-Dwd3MQYT.js → useSlot-TNtJf1z8.js} +4 -4
- package/dist/chunks/{useSlot-Dwd3MQYT.js.map → useSlot-TNtJf1z8.js.map} +1 -1
- package/dist/chunks/{utils-Ki_DdjNi.js → utils-BCEhcDlv.js} +12 -33
- package/dist/chunks/utils-BCEhcDlv.js.map +1 -0
- package/dist/chunks/{utils-GD-7Nve2.js → utils-DvHk9ofL.js} +5 -26
- package/dist/chunks/utils-DvHk9ofL.js.map +1 -0
- package/dist/components/icons/icons.d.ts +20 -0
- package/dist/components/icons/icons.d.ts.map +1 -0
- package/dist/components/scroll-shadow/index.d.ts +22 -0
- package/dist/components/scroll-shadow/index.d.ts.map +1 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts +33 -0
- package/dist/components/scroll-shadow/scroll-shadow.d.ts.map +1 -0
- package/dist/components/scroll-shadow/scroll-shadow.styles.d.ts +70 -0
- package/dist/components/scroll-shadow/scroll-shadow.styles.d.ts.map +1 -0
- package/dist/components/scroll-shadow/use-safe-layout-effect.d.ts +3 -0
- package/dist/components/scroll-shadow/use-safe-layout-effect.d.ts.map +1 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.d.ts +12 -0
- package/dist/components/scroll-shadow/use-scroll-shadow.d.ts.map +1 -0
- package/dist/components/tabs/index.d.ts +26 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/tabs.d.ts +40 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.styles.d.ts +87 -0
- package/dist/components/tabs/tabs.styles.d.ts.map +1 -0
- package/dist/data-table/index.cjs.js +297 -2813
- package/dist/data-table/index.cjs.js.map +1 -1
- package/dist/data-table/index.es.js +208 -2724
- package/dist/data-table/index.es.js.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +3 -3
- package/dist/lib/utils/assertion.d.ts +10 -0
- package/dist/lib/utils/assertion.d.ts.map +1 -0
- package/dist/lib/utils/class-name.d.ts +8 -0
- package/dist/lib/utils/class-name.d.ts.map +1 -0
- package/dist/lib/utils/cn.d.ts +23 -0
- package/dist/lib/utils/cn.d.ts.map +1 -0
- package/dist/lib/utils/collection-prop-injection.d.ts +32 -0
- package/dist/lib/utils/collection-prop-injection.d.ts.map +1 -0
- package/dist/lib/utils/compose.d.ts +8 -0
- package/dist/lib/utils/compose.d.ts.map +1 -0
- package/dist/lib/utils/dom.d.ts +22 -0
- package/dist/lib/utils/dom.d.ts.map +1 -0
- package/dist/lib/utils/field-slots-gate.d.ts +10 -0
- package/dist/lib/utils/field-slots-gate.d.ts.map +1 -0
- package/dist/lib/utils/logger.d.ts +24 -0
- package/dist/lib/utils/logger.d.ts.map +1 -0
- package/dist/lib/utils/normalize.d.ts +6 -0
- package/dist/lib/utils/normalize.d.ts.map +1 -0
- package/dist/lib/utils/use-has-text-slot.d.ts +14 -0
- package/dist/lib/utils/use-has-text-slot.d.ts.map +1 -0
- package/dist/lizaui.css +632 -0
- package/dist/meter/index.cjs.js +4 -4
- package/dist/meter/index.es.js +4 -4
- package/dist/progress-bar/index.cjs.js +2 -2
- package/dist/progress-bar/index.es.js +2 -2
- package/dist/radio/index.cjs.js +2 -2
- package/dist/radio/index.es.js +2 -2
- package/dist/radio-group/index.cjs.js +1 -1
- package/dist/radio-group/index.es.js +2 -2
- package/dist/scroll-shadow/index.cjs.js +394 -0
- package/dist/scroll-shadow/index.cjs.js.map +1 -0
- package/dist/scroll-shadow/index.es.js +394 -0
- package/dist/scroll-shadow/index.es.js.map +1 -0
- package/dist/scroll-shadow.d.ts +2 -0
- package/dist/slider/index.cjs.js +11 -10
- package/dist/slider/index.cjs.js.map +1 -1
- package/dist/slider/index.es.js +10 -9
- package/dist/slider/index.es.js.map +1 -1
- package/dist/tabs/index.cjs.js +1400 -0
- package/dist/tabs/index.cjs.js.map +1 -0
- package/dist/tabs/index.es.js +1400 -0
- package/dist/tabs/index.es.js.map +1 -0
- package/dist/tabs.d.ts +2 -0
- package/dist/toggle-switch/index.cjs.js +11 -9
- package/dist/toggle-switch/index.cjs.js.map +1 -1
- package/dist/toggle-switch/index.es.js +9 -7
- package/dist/toggle-switch/index.es.js.map +1 -1
- package/dist/toolbar/index.cjs.js +4 -4
- package/dist/toolbar/index.es.js +4 -4
- package/package.json +12 -1
- package/dist/chunks/Button-DK8vIKEw.js.map +0 -1
- package/dist/chunks/Button-daStTTzk.js.map +0 -1
- package/dist/chunks/SharedElementTransition-BxczX23g.js +0 -12
- package/dist/chunks/SharedElementTransition-D87oSBzB.js +0 -13
- package/dist/chunks/VisuallyHidden-BbvdASBh.js +0 -85
- package/dist/chunks/VisuallyHidden-BbvdASBh.js.map +0 -1
- package/dist/chunks/VisuallyHidden-C-WtISJo.js +0 -86
- package/dist/chunks/VisuallyHidden-C-WtISJo.js.map +0 -1
- package/dist/chunks/useLabel-ClsFWJD0.js.map +0 -1
- package/dist/chunks/useLabel-todYehRc.js.map +0 -1
- package/dist/chunks/utils-GD-7Nve2.js.map +0 -1
- package/dist/chunks/utils-Ki_DdjNi.js.map +0 -1
|
@@ -0,0 +1,1400 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import React__default, { useMemo, useCallback, useRef, useEffect, useState, forwardRef, useContext, createContext, Children, isValidElement, use } from "react";
|
|
4
|
+
import { $ as $60f19cefd567a3e4$export$253fe78d46329472, a as $d03379b88399b8c5$export$6cd28814d92fa9c9, b as $4a07ac835f260f78$export$6c8a5aaad13c9852, c as $f6ba6936bfd098a0$export$ecf600387e221c37, d as $bf14c9739fda2eb3$export$eac1895992b9f3d6, e as $d667c2af82d35a98$export$d6daf82dcd84e87c, f as $42ceafc619f9c3ba$export$bf788dd355e3a401, g as $42ceafc619f9c3ba$export$18af5c7a9e9b3664, h as $91fe5e721c7f36c1$export$c9549807523555e0, i as $42ceafc619f9c3ba$export$fb8073518f34e6ec, j as $b24d1bc31a0f941d$export$a9d04c5684123369, k as $263ab7fc0f95ccdb$export$4feb769f8ddf26c5, l as $263ab7fc0f95ccdb$export$a164736487e3f0ae, m as $263ab7fc0f95ccdb$export$90e00781bc59d8f9, n as $91fe5e721c7f36c1$export$17f80983afe4e444 } from "../chunks/useHasTabbableChild-CSJ0P5QT.js";
|
|
5
|
+
import { g as $c4867b2f328c2698$export$e5c5a5f917a5871c, j as $a4e76a5424781910$export$e08e3b67e392101e, d as $bbaa08b3cd72f041$export$9d1611c77c2fe928, h as $390e54f620492c70$export$f680877a34711e37, $ as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, f as $03e8ab2d84d7657a$export$4338b53315abf666, b as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, c as $7230ffa83bc0c2cf$export$df3a06d6289f983e, l as $7230ffa83bc0c2cf$export$2881499e37b75b9a, m as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, e as $7230ffa83bc0c2cf$export$c245e6201fed2f75 } from "../chunks/utils-BCEhcDlv.js";
|
|
6
|
+
import { $ as $792f28e438b9ad5f$export$758399f318e6385a } from "../chunks/SharedElementTransition-CJVe1D_I.js";
|
|
7
|
+
import { $ as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "../chunks/filterDOMProps-DqJGvnmf.js";
|
|
8
|
+
import { a as $fe16bffc7a557bf0$export$7f54fc3180508a52, e as $d1116acdf220c2da$export$4c014de7c8940b4c, f as $0c4a58759813079a$export$4e328f61c538687f, g as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "../chunks/useHover-BHCSbkLb.js";
|
|
9
|
+
import { A as $d447af545b77c9f1$export$37a5fde709c1db82, B as $caaf0dd3060ed57c$export$7e924b3091a3bd18 } from "../chunks/focusSafely-DfEgLKh6.js";
|
|
10
|
+
import { $ as $e8ac3c3f5d4bae7f$export$d6875122194c7b44 } from "../chunks/useLabels-Bl0mJafM.js";
|
|
11
|
+
import { $ as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "../chunks/I18nProvider-Coj9x7B8.js";
|
|
12
|
+
import { $ as $6f0c29017aeec335$export$d68d59712b04d9d1 } from "../chunks/BaseCollection-CdxYWaH6.js";
|
|
13
|
+
import { $ as $d7f64c32b702fe2c$export$86427a43e3e48ebb } from "../chunks/Hidden-C55DpjMP.js";
|
|
14
|
+
import { $ as $3e6197669829fe11$export$40bfa8c7b0832715 } from "../chunks/useControlledState-DZA25XHU.js";
|
|
15
|
+
import { flushSync } from "react-dom";
|
|
16
|
+
import { tv, cx } from "tailwind-variants";
|
|
17
|
+
import { $ as $4064df0d6f9620e1$export$c9058316764c140e } from "../chunks/mergeRefs-t6d4XvXq.js";
|
|
18
|
+
import { ScrollShadow } from "../scroll-shadow/index.es.js";
|
|
19
|
+
class $f664a81d022446b5$export$d085fb9e920b5ca7 {
|
|
20
|
+
constructor(nodes) {
|
|
21
|
+
this.keyMap = /* @__PURE__ */ new Map();
|
|
22
|
+
this.firstKey = null;
|
|
23
|
+
this.lastKey = null;
|
|
24
|
+
this.iterable = nodes;
|
|
25
|
+
let visit = (node) => {
|
|
26
|
+
this.keyMap.set(node.key, node);
|
|
27
|
+
if (node.childNodes && node.type === "section") for (let child of node.childNodes) visit(child);
|
|
28
|
+
};
|
|
29
|
+
for (let node of nodes) visit(node);
|
|
30
|
+
let last = null;
|
|
31
|
+
let index = 0;
|
|
32
|
+
let size = 0;
|
|
33
|
+
for (let [key, node] of this.keyMap) {
|
|
34
|
+
if (last) {
|
|
35
|
+
last.nextKey = key;
|
|
36
|
+
node.prevKey = last.key;
|
|
37
|
+
} else {
|
|
38
|
+
this.firstKey = key;
|
|
39
|
+
node.prevKey = void 0;
|
|
40
|
+
}
|
|
41
|
+
if (node.type === "item") node.index = index++;
|
|
42
|
+
if (node.type === "section" || node.type === "item") size++;
|
|
43
|
+
last = node;
|
|
44
|
+
last.nextKey = void 0;
|
|
45
|
+
}
|
|
46
|
+
this._size = size;
|
|
47
|
+
this.lastKey = last?.key ?? null;
|
|
48
|
+
}
|
|
49
|
+
*[Symbol.iterator]() {
|
|
50
|
+
yield* this.iterable;
|
|
51
|
+
}
|
|
52
|
+
get size() {
|
|
53
|
+
return this._size;
|
|
54
|
+
}
|
|
55
|
+
getKeys() {
|
|
56
|
+
return this.keyMap.keys();
|
|
57
|
+
}
|
|
58
|
+
getKeyBefore(key) {
|
|
59
|
+
let node = this.keyMap.get(key);
|
|
60
|
+
return node ? node.prevKey ?? null : null;
|
|
61
|
+
}
|
|
62
|
+
getKeyAfter(key) {
|
|
63
|
+
let node = this.keyMap.get(key);
|
|
64
|
+
return node ? node.nextKey ?? null : null;
|
|
65
|
+
}
|
|
66
|
+
getFirstKey() {
|
|
67
|
+
return this.firstKey;
|
|
68
|
+
}
|
|
69
|
+
getLastKey() {
|
|
70
|
+
return this.lastKey;
|
|
71
|
+
}
|
|
72
|
+
getItem(key) {
|
|
73
|
+
return this.keyMap.get(key) ?? null;
|
|
74
|
+
}
|
|
75
|
+
at(idx) {
|
|
76
|
+
const keys = [
|
|
77
|
+
...this.getKeys()
|
|
78
|
+
];
|
|
79
|
+
return this.getItem(keys[idx]);
|
|
80
|
+
}
|
|
81
|
+
getChildren(key) {
|
|
82
|
+
let node = this.keyMap.get(key);
|
|
83
|
+
return node?.childNodes || [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function $b14b6f590b50af39$export$2f645645f7bca764(props) {
|
|
87
|
+
let { filter, layoutDelegate } = props;
|
|
88
|
+
let selectionState = $60f19cefd567a3e4$export$253fe78d46329472(props);
|
|
89
|
+
let disabledKeys = useMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
90
|
+
props.disabledKeys
|
|
91
|
+
]);
|
|
92
|
+
let factory = useCallback((nodes) => filter ? new $f664a81d022446b5$export$d085fb9e920b5ca7(filter(nodes)) : new $f664a81d022446b5$export$d085fb9e920b5ca7(nodes), [
|
|
93
|
+
filter
|
|
94
|
+
]);
|
|
95
|
+
let context = useMemo(() => ({
|
|
96
|
+
suppressTextValueWarning: props.suppressTextValueWarning
|
|
97
|
+
}), [
|
|
98
|
+
props.suppressTextValueWarning
|
|
99
|
+
]);
|
|
100
|
+
let collection = $d03379b88399b8c5$export$6cd28814d92fa9c9(props, factory, context);
|
|
101
|
+
let selectionManager = useMemo(() => new $4a07ac835f260f78$export$6c8a5aaad13c9852(collection, selectionState, {
|
|
102
|
+
layoutDelegate
|
|
103
|
+
}), [
|
|
104
|
+
collection,
|
|
105
|
+
selectionState,
|
|
106
|
+
layoutDelegate
|
|
107
|
+
]);
|
|
108
|
+
$b14b6f590b50af39$var$useFocusedKeyReset(collection, selectionManager);
|
|
109
|
+
return {
|
|
110
|
+
collection,
|
|
111
|
+
disabledKeys,
|
|
112
|
+
selectionManager
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function $b14b6f590b50af39$var$useFocusedKeyReset(collection, selectionManager) {
|
|
116
|
+
const cachedCollection = useRef(null);
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
if (selectionManager.focusedKey != null && !collection.getItem(selectionManager.focusedKey) && cachedCollection.current) {
|
|
119
|
+
let key = cachedCollection.current.getKeyAfter(selectionManager.focusedKey);
|
|
120
|
+
let nextFocusedKey = null;
|
|
121
|
+
while (key != null) {
|
|
122
|
+
let node = collection.getItem(key);
|
|
123
|
+
if (node && node.type === "item" && !selectionManager.isDisabled(key)) {
|
|
124
|
+
nextFocusedKey = key;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
key = cachedCollection.current.getKeyAfter(key);
|
|
128
|
+
}
|
|
129
|
+
if (nextFocusedKey == null) {
|
|
130
|
+
key = cachedCollection.current.getKeyBefore(selectionManager.focusedKey);
|
|
131
|
+
while (key != null) {
|
|
132
|
+
let node = collection.getItem(key);
|
|
133
|
+
if (node && node.type === "item" && !selectionManager.isDisabled(key)) {
|
|
134
|
+
nextFocusedKey = key;
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
key = cachedCollection.current.getKeyBefore(key);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
selectionManager.setFocusedKey(nextFocusedKey);
|
|
141
|
+
}
|
|
142
|
+
cachedCollection.current = collection;
|
|
143
|
+
}, [
|
|
144
|
+
collection,
|
|
145
|
+
selectionManager
|
|
146
|
+
]);
|
|
147
|
+
}
|
|
148
|
+
function $fcc7165e876206c6$export$6d3443f2c48bfc20(ref, isReady = true, onEnter) {
|
|
149
|
+
let [isEntering, setEntering] = useState(true);
|
|
150
|
+
let isAnimationReady = isEntering && isReady;
|
|
151
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
152
|
+
if (!isReady && ref.current) return $a4e76a5424781910$export$e08e3b67e392101e($d447af545b77c9f1$export$37a5fde709c1db82(ref.current, "opacity", "0"), $d447af545b77c9f1$export$37a5fde709c1db82(ref.current, "clip", "rect(0 0 0 0)"), $d447af545b77c9f1$export$37a5fde709c1db82(ref.current, "clip-path", "inset(50%)"), $d447af545b77c9f1$export$37a5fde709c1db82(ref.current, "mask-image", "linear-gradient(#0000, #0000)"));
|
|
153
|
+
}, [
|
|
154
|
+
ref,
|
|
155
|
+
isReady
|
|
156
|
+
]);
|
|
157
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
158
|
+
if (isAnimationReady && ref.current && "getAnimations" in ref.current) {
|
|
159
|
+
for (let animation of ref.current.getAnimations()) if (animation instanceof CSSTransition) animation.cancel();
|
|
160
|
+
}
|
|
161
|
+
}, [
|
|
162
|
+
ref,
|
|
163
|
+
isAnimationReady
|
|
164
|
+
]);
|
|
165
|
+
$fcc7165e876206c6$var$useAnimation(ref, isAnimationReady, onEnter, useCallback(() => setEntering(false), []));
|
|
166
|
+
return isAnimationReady;
|
|
167
|
+
}
|
|
168
|
+
function $fcc7165e876206c6$export$45fda7c47f93fd48(ref, isOpen, onExit) {
|
|
169
|
+
let [exitState, setExitState] = useState(isOpen ? "open" : "closed");
|
|
170
|
+
switch (exitState) {
|
|
171
|
+
case "open":
|
|
172
|
+
if (!isOpen) setExitState("exiting");
|
|
173
|
+
break;
|
|
174
|
+
case "closed":
|
|
175
|
+
case "exiting":
|
|
176
|
+
if (isOpen) setExitState("open");
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
let isExiting = exitState === "exiting";
|
|
180
|
+
$fcc7165e876206c6$var$useAnimation(ref, isExiting, onExit, useCallback(() => {
|
|
181
|
+
setExitState((state) => state === "exiting" ? "closed" : state);
|
|
182
|
+
}, []));
|
|
183
|
+
return isExiting;
|
|
184
|
+
}
|
|
185
|
+
function $fcc7165e876206c6$var$useAnimation(ref, isActive, onStart, onEnd) {
|
|
186
|
+
let isActiveRef = useRef(null);
|
|
187
|
+
let start = $fe16bffc7a557bf0$export$7f54fc3180508a52(onStart);
|
|
188
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
189
|
+
if (isActive && ref.current && isActiveRef.current !== isActive) {
|
|
190
|
+
isActiveRef.current = isActive;
|
|
191
|
+
if (!("getAnimations" in ref.current)) {
|
|
192
|
+
onEnd();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
let startPromise = start?.(ref.current);
|
|
196
|
+
let animations = ref.current.getAnimations().filter((a) => (typeof DocumentTimeline === "undefined" || a.timeline instanceof DocumentTimeline) && a.playState === "running");
|
|
197
|
+
if (animations.length === 0 && !startPromise) {
|
|
198
|
+
onEnd();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
Promise.all([
|
|
202
|
+
startPromise,
|
|
203
|
+
...animations.map((a) => a.finished)
|
|
204
|
+
]).then(() => {
|
|
205
|
+
flushSync(() => {
|
|
206
|
+
onEnd();
|
|
207
|
+
});
|
|
208
|
+
}).catch(() => {
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
isActiveRef.current = isActive;
|
|
212
|
+
}, [
|
|
213
|
+
ref,
|
|
214
|
+
isActive,
|
|
215
|
+
onEnd
|
|
216
|
+
]);
|
|
217
|
+
}
|
|
218
|
+
const $a251981b23baaa12$export$c5f62239608282b6 = /* @__PURE__ */ new WeakMap();
|
|
219
|
+
function $a251981b23baaa12$export$567fc7097e064344(state, key, role) {
|
|
220
|
+
if (!state)
|
|
221
|
+
return "";
|
|
222
|
+
if (typeof key === "string") key = key.replace(/\s+/g, "");
|
|
223
|
+
let baseId = $a251981b23baaa12$export$c5f62239608282b6.get(state);
|
|
224
|
+
if (process.env.NODE_ENV !== "production" && !baseId) ;
|
|
225
|
+
return `${baseId}-${role}-${key}`;
|
|
226
|
+
}
|
|
227
|
+
function $1b6fa05bad3d7740$export$fdf4756d5b8ef90a(props, state, ref) {
|
|
228
|
+
let { key, isDisabled: propsDisabled, shouldSelectOnPressUp } = props;
|
|
229
|
+
let { selectionManager: manager, selectedKey } = state;
|
|
230
|
+
let isSelected = key === selectedKey;
|
|
231
|
+
let isDisabled = propsDisabled || state.isDisabled || state.selectionManager.isDisabled(key);
|
|
232
|
+
let item = state.collection.getItem(key);
|
|
233
|
+
let { itemProps, isPressed } = $f6ba6936bfd098a0$export$ecf600387e221c37({
|
|
234
|
+
selectionManager: manager,
|
|
235
|
+
key,
|
|
236
|
+
ref,
|
|
237
|
+
isDisabled,
|
|
238
|
+
// Link tabs should behave like native anchors (navigate on press up)
|
|
239
|
+
// This avoids reopening beforeunload dialogs when browsers replay
|
|
240
|
+
// queued pointer enter/leave events after cancellation.
|
|
241
|
+
shouldSelectOnPressUp: shouldSelectOnPressUp ?? item?.props.href != null,
|
|
242
|
+
linkBehavior: "selection"
|
|
243
|
+
});
|
|
244
|
+
let tabId = $a251981b23baaa12$export$567fc7097e064344(state, key, "tab");
|
|
245
|
+
let tabPanelId = $a251981b23baaa12$export$567fc7097e064344(state, key, "tabpanel");
|
|
246
|
+
let { tabIndex } = itemProps;
|
|
247
|
+
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(item?.props, {
|
|
248
|
+
labelable: true
|
|
249
|
+
});
|
|
250
|
+
delete domProps.id;
|
|
251
|
+
let linkProps = $caaf0dd3060ed57c$export$7e924b3091a3bd18(item?.props);
|
|
252
|
+
let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c({
|
|
253
|
+
...item?.props,
|
|
254
|
+
isDisabled
|
|
255
|
+
}, ref);
|
|
256
|
+
return {
|
|
257
|
+
tabProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, focusableProps, linkProps, itemProps, {
|
|
258
|
+
id: tabId,
|
|
259
|
+
"aria-selected": isSelected,
|
|
260
|
+
"aria-disabled": isDisabled || void 0,
|
|
261
|
+
"aria-controls": isSelected ? tabPanelId : void 0,
|
|
262
|
+
tabIndex: isDisabled ? void 0 : tabIndex,
|
|
263
|
+
role: "tab"
|
|
264
|
+
}),
|
|
265
|
+
isSelected,
|
|
266
|
+
isDisabled,
|
|
267
|
+
isPressed
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function $7d951241dadd72e4$export$fae0121b5afe572d(props, state, ref) {
|
|
271
|
+
let tabIndex = $bf14c9739fda2eb3$export$eac1895992b9f3d6(ref) ? void 0 : 0;
|
|
272
|
+
const id = $a251981b23baaa12$export$567fc7097e064344(state, props.id ?? state?.selectedKey, "tabpanel");
|
|
273
|
+
const tabPanelProps = $e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
274
|
+
...props,
|
|
275
|
+
id,
|
|
276
|
+
"aria-labelledby": $a251981b23baaa12$export$567fc7097e064344(state, state?.selectedKey, "tab")
|
|
277
|
+
});
|
|
278
|
+
return {
|
|
279
|
+
tabPanelProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(tabPanelProps, {
|
|
280
|
+
tabIndex,
|
|
281
|
+
role: "tabpanel",
|
|
282
|
+
"aria-describedby": props["aria-describedby"],
|
|
283
|
+
"aria-details": props["aria-details"]
|
|
284
|
+
})
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
class $a226bee26c88efd7$export$15010ca3c1abe90b {
|
|
288
|
+
constructor(collection, direction, orientation, disabledKeys = /* @__PURE__ */ new Set()) {
|
|
289
|
+
this.collection = collection;
|
|
290
|
+
this.flipDirection = direction === "rtl";
|
|
291
|
+
this.disabledKeys = disabledKeys;
|
|
292
|
+
this.tabDirection = orientation === "horizontal";
|
|
293
|
+
}
|
|
294
|
+
getKeyLeftOf(key) {
|
|
295
|
+
if (this.flipDirection) return this.getNextKey(key);
|
|
296
|
+
return this.getPreviousKey(key);
|
|
297
|
+
}
|
|
298
|
+
getKeyRightOf(key) {
|
|
299
|
+
if (this.flipDirection) return this.getPreviousKey(key);
|
|
300
|
+
return this.getNextKey(key);
|
|
301
|
+
}
|
|
302
|
+
isDisabled(key) {
|
|
303
|
+
return this.disabledKeys.has(key) || !!this.collection.getItem(key)?.props?.isDisabled;
|
|
304
|
+
}
|
|
305
|
+
getFirstKey() {
|
|
306
|
+
let key = this.collection.getFirstKey();
|
|
307
|
+
if (key != null && this.isDisabled(key)) key = this.getNextKey(key);
|
|
308
|
+
return key;
|
|
309
|
+
}
|
|
310
|
+
getLastKey() {
|
|
311
|
+
let key = this.collection.getLastKey();
|
|
312
|
+
if (key != null && this.isDisabled(key)) key = this.getPreviousKey(key);
|
|
313
|
+
return key;
|
|
314
|
+
}
|
|
315
|
+
getKeyAbove(key) {
|
|
316
|
+
if (this.tabDirection) return null;
|
|
317
|
+
return this.getPreviousKey(key);
|
|
318
|
+
}
|
|
319
|
+
getKeyBelow(key) {
|
|
320
|
+
if (this.tabDirection) return null;
|
|
321
|
+
return this.getNextKey(key);
|
|
322
|
+
}
|
|
323
|
+
getNextKey(startKey) {
|
|
324
|
+
let key = startKey;
|
|
325
|
+
do {
|
|
326
|
+
key = this.collection.getKeyAfter(key);
|
|
327
|
+
if (key == null) key = this.collection.getFirstKey();
|
|
328
|
+
} while (key != null && this.isDisabled(key) && key !== startKey);
|
|
329
|
+
return key;
|
|
330
|
+
}
|
|
331
|
+
getPreviousKey(startKey) {
|
|
332
|
+
let key = startKey;
|
|
333
|
+
do {
|
|
334
|
+
key = this.collection.getKeyBefore(key);
|
|
335
|
+
if (key == null) key = this.collection.getLastKey();
|
|
336
|
+
} while (key != null && this.isDisabled(key) && key !== startKey);
|
|
337
|
+
return key;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function $83428e53deb13caf$export$773e389e644c5874(props, state, ref) {
|
|
341
|
+
let { orientation = "horizontal", keyboardActivation = "automatic" } = props;
|
|
342
|
+
let { collection, selectionManager: manager, disabledKeys } = state;
|
|
343
|
+
let { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
344
|
+
let delegate = useMemo(() => new $a226bee26c88efd7$export$15010ca3c1abe90b(collection, direction, orientation, disabledKeys), [
|
|
345
|
+
collection,
|
|
346
|
+
disabledKeys,
|
|
347
|
+
orientation,
|
|
348
|
+
direction
|
|
349
|
+
]);
|
|
350
|
+
let { collectionProps } = $d667c2af82d35a98$export$d6daf82dcd84e87c({
|
|
351
|
+
ref,
|
|
352
|
+
selectionManager: manager,
|
|
353
|
+
keyboardDelegate: delegate,
|
|
354
|
+
selectOnFocus: keyboardActivation === "automatic",
|
|
355
|
+
disallowEmptySelection: true,
|
|
356
|
+
scrollRef: ref,
|
|
357
|
+
linkBehavior: "selection"
|
|
358
|
+
});
|
|
359
|
+
let tabsId = $390e54f620492c70$export$f680877a34711e37();
|
|
360
|
+
$a251981b23baaa12$export$c5f62239608282b6.set(state, tabsId);
|
|
361
|
+
let tabListLabelProps = $e8ac3c3f5d4bae7f$export$d6875122194c7b44({
|
|
362
|
+
...props,
|
|
363
|
+
id: tabsId
|
|
364
|
+
});
|
|
365
|
+
return {
|
|
366
|
+
tabListProps: {
|
|
367
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(collectionProps, tabListLabelProps),
|
|
368
|
+
role: "tablist",
|
|
369
|
+
"aria-orientation": orientation,
|
|
370
|
+
tabIndex: void 0
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
function $0fdb127d377ffd84$export$e7f05e985daf4b5f(props) {
|
|
375
|
+
let [selectedKey, setSelectedKey] = $3e6197669829fe11$export$40bfa8c7b0832715(props.selectedKey, props.defaultSelectedKey ?? null, props.onSelectionChange);
|
|
376
|
+
let selectedKeys = useMemo(() => selectedKey != null ? [
|
|
377
|
+
selectedKey
|
|
378
|
+
] : [], [
|
|
379
|
+
selectedKey
|
|
380
|
+
]);
|
|
381
|
+
let { collection, disabledKeys, selectionManager } = $b14b6f590b50af39$export$2f645645f7bca764({
|
|
382
|
+
...props,
|
|
383
|
+
selectionMode: "single",
|
|
384
|
+
disallowEmptySelection: true,
|
|
385
|
+
allowDuplicateSelectionEvents: true,
|
|
386
|
+
selectedKeys,
|
|
387
|
+
onSelectionChange: (keys) => {
|
|
388
|
+
if (keys === "all") return;
|
|
389
|
+
let key = keys.values().next().value ?? null;
|
|
390
|
+
if (key === selectedKey && props.onSelectionChange) props.onSelectionChange(key);
|
|
391
|
+
setSelectedKey(key);
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
let selectedItem = selectedKey != null ? collection.getItem(selectedKey) : null;
|
|
395
|
+
return {
|
|
396
|
+
collection,
|
|
397
|
+
disabledKeys,
|
|
398
|
+
selectionManager,
|
|
399
|
+
selectedKey,
|
|
400
|
+
setSelectedKey,
|
|
401
|
+
selectedItem
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
function $caeb030f09a278a1$export$4ba071daf4e486(props) {
|
|
405
|
+
let state = $0fdb127d377ffd84$export$e7f05e985daf4b5f({
|
|
406
|
+
...props,
|
|
407
|
+
onSelectionChange: props.onSelectionChange ? (key) => {
|
|
408
|
+
if (key != null) props.onSelectionChange?.(key);
|
|
409
|
+
} : void 0,
|
|
410
|
+
suppressTextValueWarning: true,
|
|
411
|
+
defaultSelectedKey: props.defaultSelectedKey ?? $caeb030f09a278a1$var$findDefaultSelectedKey(props.collection, props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
|
|
412
|
+
});
|
|
413
|
+
let { selectionManager, collection, selectedKey: currentSelectedKey } = state;
|
|
414
|
+
let lastSelectedKey = useRef(currentSelectedKey);
|
|
415
|
+
useEffect(() => {
|
|
416
|
+
let selectedKey = currentSelectedKey;
|
|
417
|
+
if (props.selectedKey == null && (selectionManager.isEmpty || selectedKey == null || !collection.getItem(selectedKey))) {
|
|
418
|
+
selectedKey = $caeb030f09a278a1$var$findDefaultSelectedKey(collection, state.disabledKeys);
|
|
419
|
+
if (selectedKey != null)
|
|
420
|
+
selectionManager.setSelectedKeys([
|
|
421
|
+
selectedKey
|
|
422
|
+
]);
|
|
423
|
+
}
|
|
424
|
+
if (selectedKey != null && selectionManager.focusedKey == null || !selectionManager.isFocused && selectedKey !== lastSelectedKey.current) selectionManager.setFocusedKey(selectedKey);
|
|
425
|
+
lastSelectedKey.current = selectedKey;
|
|
426
|
+
});
|
|
427
|
+
return {
|
|
428
|
+
...state,
|
|
429
|
+
isDisabled: props.isDisabled || false
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
function $caeb030f09a278a1$var$findDefaultSelectedKey(collection, disabledKeys) {
|
|
433
|
+
let selectedKey = null;
|
|
434
|
+
if (collection) {
|
|
435
|
+
selectedKey = collection.getFirstKey();
|
|
436
|
+
while (selectedKey != null && (disabledKeys.has(selectedKey) || collection.getItem(selectedKey)?.props?.isDisabled) && selectedKey !== collection.getLastKey()) selectedKey = collection.getKeyAfter(selectedKey);
|
|
437
|
+
if (selectedKey != null && (disabledKeys.has(selectedKey) || collection.getItem(selectedKey)?.props?.isDisabled) && selectedKey === collection.getLastKey()) selectedKey = collection.getFirstKey();
|
|
438
|
+
}
|
|
439
|
+
return selectedKey;
|
|
440
|
+
}
|
|
441
|
+
const $b4f18e3395fe64d7$export$cfa7aa87c26e7d1f = /* @__PURE__ */ createContext(null);
|
|
442
|
+
const $b4f18e3395fe64d7$export$364712098d2aa57c = /* @__PURE__ */ createContext(null);
|
|
443
|
+
const $b4f18e3395fe64d7$export$b2539bed5023c21c = /* @__PURE__ */ forwardRef(function Tabs(props, ref) {
|
|
444
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $b4f18e3395fe64d7$export$cfa7aa87c26e7d1f);
|
|
445
|
+
let { children, orientation = "horizontal" } = props;
|
|
446
|
+
children = useMemo(() => typeof children === "function" ? children({
|
|
447
|
+
orientation,
|
|
448
|
+
defaultChildren: null
|
|
449
|
+
}) : children, [
|
|
450
|
+
children,
|
|
451
|
+
orientation
|
|
452
|
+
]);
|
|
453
|
+
return /* @__PURE__ */ React__default.createElement($42ceafc619f9c3ba$export$bf788dd355e3a401, {
|
|
454
|
+
content: children
|
|
455
|
+
}, (collection) => /* @__PURE__ */ React__default.createElement($b4f18e3395fe64d7$var$TabsInner, {
|
|
456
|
+
props,
|
|
457
|
+
collection,
|
|
458
|
+
tabsRef: ref
|
|
459
|
+
}));
|
|
460
|
+
});
|
|
461
|
+
function $b4f18e3395fe64d7$var$TabsInner({ props, tabsRef: ref, collection }) {
|
|
462
|
+
let { orientation = "horizontal" } = props;
|
|
463
|
+
let state = $caeb030f09a278a1$export$4ba071daf4e486({
|
|
464
|
+
...props,
|
|
465
|
+
collection,
|
|
466
|
+
children: void 0
|
|
467
|
+
});
|
|
468
|
+
let { focusProps, isFocused, isFocusVisible } = $0c4a58759813079a$export$4e328f61c538687f({
|
|
469
|
+
within: true
|
|
470
|
+
});
|
|
471
|
+
let values = useMemo(() => ({
|
|
472
|
+
orientation,
|
|
473
|
+
isFocusWithin: isFocused,
|
|
474
|
+
isFocusVisible
|
|
475
|
+
}), [
|
|
476
|
+
orientation,
|
|
477
|
+
isFocused,
|
|
478
|
+
isFocusVisible
|
|
479
|
+
]);
|
|
480
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
481
|
+
...props,
|
|
482
|
+
defaultClassName: "react-aria-Tabs",
|
|
483
|
+
values
|
|
484
|
+
});
|
|
485
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, {
|
|
486
|
+
global: true
|
|
487
|
+
});
|
|
488
|
+
return /* @__PURE__ */ React__default.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
489
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, focusProps),
|
|
490
|
+
ref,
|
|
491
|
+
slot: props.slot || void 0,
|
|
492
|
+
"data-focused": isFocused || void 0,
|
|
493
|
+
"data-orientation": orientation,
|
|
494
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
495
|
+
"data-disabled": state.isDisabled || void 0
|
|
496
|
+
}, /* @__PURE__ */ React__default.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, {
|
|
497
|
+
values: [
|
|
498
|
+
[
|
|
499
|
+
$b4f18e3395fe64d7$export$cfa7aa87c26e7d1f,
|
|
500
|
+
props
|
|
501
|
+
],
|
|
502
|
+
[
|
|
503
|
+
$b4f18e3395fe64d7$export$364712098d2aa57c,
|
|
504
|
+
state
|
|
505
|
+
]
|
|
506
|
+
]
|
|
507
|
+
}, renderProps.children));
|
|
508
|
+
}
|
|
509
|
+
const $b4f18e3395fe64d7$export$e51a686c67fdaa2d = /* @__PURE__ */ forwardRef(function TabList(props, ref) {
|
|
510
|
+
let state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
511
|
+
return state ? /* @__PURE__ */ React__default.createElement($b4f18e3395fe64d7$var$TabListInner, {
|
|
512
|
+
props,
|
|
513
|
+
forwardedRef: ref
|
|
514
|
+
}) : /* @__PURE__ */ React__default.createElement($42ceafc619f9c3ba$export$fb8073518f34e6ec, props);
|
|
515
|
+
});
|
|
516
|
+
function $b4f18e3395fe64d7$var$TabListInner({ props, forwardedRef: ref }) {
|
|
517
|
+
let state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
518
|
+
let { CollectionRoot } = useContext($263ab7fc0f95ccdb$export$4feb769f8ddf26c5);
|
|
519
|
+
let { orientation = "horizontal", keyboardActivation = "automatic" } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($b4f18e3395fe64d7$export$cfa7aa87c26e7d1f);
|
|
520
|
+
let objectRef = $03e8ab2d84d7657a$export$4338b53315abf666(ref);
|
|
521
|
+
let { tabListProps } = $83428e53deb13caf$export$773e389e644c5874({
|
|
522
|
+
...props,
|
|
523
|
+
orientation,
|
|
524
|
+
keyboardActivation
|
|
525
|
+
}, state, objectRef);
|
|
526
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
527
|
+
...props,
|
|
528
|
+
children: null,
|
|
529
|
+
defaultClassName: "react-aria-TabList",
|
|
530
|
+
values: {
|
|
531
|
+
orientation,
|
|
532
|
+
state
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, {
|
|
536
|
+
global: true
|
|
537
|
+
});
|
|
538
|
+
delete DOMProps.id;
|
|
539
|
+
return /* @__PURE__ */ React__default.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
540
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, tabListProps),
|
|
541
|
+
ref: objectRef,
|
|
542
|
+
"data-orientation": orientation || void 0
|
|
543
|
+
}, /* @__PURE__ */ React__default.createElement($792f28e438b9ad5f$export$758399f318e6385a, null, /* @__PURE__ */ React__default.createElement(CollectionRoot, {
|
|
544
|
+
collection: state.collection,
|
|
545
|
+
persistedKeys: $263ab7fc0f95ccdb$export$90e00781bc59d8f9(state.selectionManager.focusedKey)
|
|
546
|
+
})));
|
|
547
|
+
}
|
|
548
|
+
const _$b4f18e3395fe64d7$var$TabItemNode = class _$b4f18e3395fe64d7$var$TabItemNode extends $6f0c29017aeec335$export$d68d59712b04d9d1 {
|
|
549
|
+
};
|
|
550
|
+
_$b4f18e3395fe64d7$var$TabItemNode.type = "item";
|
|
551
|
+
let $b4f18e3395fe64d7$var$TabItemNode = _$b4f18e3395fe64d7$var$TabItemNode;
|
|
552
|
+
const $b4f18e3395fe64d7$export$3e41faf802a29e71 = /* @__PURE__ */ $42ceafc619f9c3ba$export$18af5c7a9e9b3664($b4f18e3395fe64d7$var$TabItemNode, (props, forwardedRef, item) => {
|
|
553
|
+
let state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
554
|
+
let ref = $03e8ab2d84d7657a$export$4338b53315abf666(forwardedRef);
|
|
555
|
+
let { tabProps, isSelected, isDisabled, isPressed } = $1b6fa05bad3d7740$export$fdf4756d5b8ef90a({
|
|
556
|
+
key: item.key,
|
|
557
|
+
...props
|
|
558
|
+
}, state, ref);
|
|
559
|
+
let { focusProps, isFocused, isFocusVisible } = $0c4a58759813079a$export$4e328f61c538687f();
|
|
560
|
+
let { hoverProps, isHovered } = $e969f22b6713ca4a$export$ae780daf29e6d456({
|
|
561
|
+
isDisabled,
|
|
562
|
+
onHoverStart: props.onHoverStart,
|
|
563
|
+
onHoverEnd: props.onHoverEnd,
|
|
564
|
+
onHoverChange: props.onHoverChange
|
|
565
|
+
});
|
|
566
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
567
|
+
...props,
|
|
568
|
+
id: void 0,
|
|
569
|
+
children: item.rendered,
|
|
570
|
+
defaultClassName: "react-aria-Tab",
|
|
571
|
+
values: {
|
|
572
|
+
isSelected,
|
|
573
|
+
isDisabled,
|
|
574
|
+
isFocused,
|
|
575
|
+
isFocusVisible,
|
|
576
|
+
isPressed,
|
|
577
|
+
isHovered
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
let ElementType = item.props.href ? $7230ffa83bc0c2cf$export$df3a06d6289f983e.a : $7230ffa83bc0c2cf$export$df3a06d6289f983e.div;
|
|
581
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, {
|
|
582
|
+
global: true
|
|
583
|
+
});
|
|
584
|
+
delete DOMProps.id;
|
|
585
|
+
delete DOMProps.onClick;
|
|
586
|
+
return /* @__PURE__ */ React__default.createElement(ElementType, {
|
|
587
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, tabProps, focusProps, hoverProps),
|
|
588
|
+
ref,
|
|
589
|
+
"data-selected": isSelected || void 0,
|
|
590
|
+
"data-disabled": isDisabled || void 0,
|
|
591
|
+
"data-focused": isFocused || void 0,
|
|
592
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
593
|
+
"data-pressed": isPressed || void 0,
|
|
594
|
+
"data-hovered": isHovered || void 0
|
|
595
|
+
}, /* @__PURE__ */ React__default.createElement($91fe5e721c7f36c1$export$c9549807523555e0.Provider, {
|
|
596
|
+
value: {
|
|
597
|
+
isSelected
|
|
598
|
+
}
|
|
599
|
+
}, renderProps.children));
|
|
600
|
+
});
|
|
601
|
+
const $b4f18e3395fe64d7$export$3d96ec278d3efce4 = /* @__PURE__ */ $d7f64c32b702fe2c$export$86427a43e3e48ebb(function TabPanel(props, forwardedRef) {
|
|
602
|
+
const state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
603
|
+
let ref = $03e8ab2d84d7657a$export$4338b53315abf666(forwardedRef);
|
|
604
|
+
let isSelected = state.selectedKey === props.id;
|
|
605
|
+
let [isInitiallySelected, setInitiallySelected] = useState(state.selectedKey != null ? isSelected : null);
|
|
606
|
+
if (isInitiallySelected == null && state.selectedKey != null) setInitiallySelected(isSelected);
|
|
607
|
+
else if (!isSelected && isInitiallySelected) setInitiallySelected(false);
|
|
608
|
+
let isExiting = $fcc7165e876206c6$export$45fda7c47f93fd48(ref, isSelected);
|
|
609
|
+
if (!isSelected && !props.shouldForceMount && !isExiting) return null;
|
|
610
|
+
return /* @__PURE__ */ React__default.createElement($b4f18e3395fe64d7$var$TabPanelInner, {
|
|
611
|
+
...props,
|
|
612
|
+
tabPanelRef: ref,
|
|
613
|
+
isInitiallySelected: isInitiallySelected || false,
|
|
614
|
+
isExiting
|
|
615
|
+
});
|
|
616
|
+
});
|
|
617
|
+
function $b4f18e3395fe64d7$var$TabPanelInner(props) {
|
|
618
|
+
let state = useContext($b4f18e3395fe64d7$export$364712098d2aa57c);
|
|
619
|
+
let { id, tabPanelRef: ref, isInitiallySelected, isExiting, ...otherProps } = props;
|
|
620
|
+
let { tabPanelProps } = $7d951241dadd72e4$export$fae0121b5afe572d(props, state, ref);
|
|
621
|
+
let { focusProps, isFocused, isFocusVisible } = $0c4a58759813079a$export$4e328f61c538687f();
|
|
622
|
+
let isSelected = state.selectedKey === props.id;
|
|
623
|
+
let isEntering = $fcc7165e876206c6$export$6d3443f2c48bfc20(ref) && !isInitiallySelected;
|
|
624
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
625
|
+
...props,
|
|
626
|
+
defaultClassName: "react-aria-TabPanel",
|
|
627
|
+
values: {
|
|
628
|
+
isFocused,
|
|
629
|
+
isFocusVisible,
|
|
630
|
+
// @ts-ignore - compatibility with React < 19
|
|
631
|
+
isInert: $b24d1bc31a0f941d$export$a9d04c5684123369(!isSelected),
|
|
632
|
+
isEntering,
|
|
633
|
+
isExiting,
|
|
634
|
+
state
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(otherProps, {
|
|
638
|
+
global: true
|
|
639
|
+
});
|
|
640
|
+
delete DOMProps.id;
|
|
641
|
+
let domProps = isSelected ? $bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, tabPanelProps, focusProps, renderProps) : $bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps);
|
|
642
|
+
return /* @__PURE__ */ React__default.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
643
|
+
...domProps,
|
|
644
|
+
ref,
|
|
645
|
+
"data-focused": isFocused || void 0,
|
|
646
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
647
|
+
// @ts-ignore
|
|
648
|
+
inert: $b24d1bc31a0f941d$export$a9d04c5684123369(!isSelected || props.inert),
|
|
649
|
+
"data-inert": !isSelected ? "true" : void 0,
|
|
650
|
+
"data-entering": isEntering || void 0,
|
|
651
|
+
"data-exiting": isExiting || void 0
|
|
652
|
+
}, /* @__PURE__ */ React__default.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, {
|
|
653
|
+
values: [
|
|
654
|
+
[
|
|
655
|
+
$b4f18e3395fe64d7$export$cfa7aa87c26e7d1f,
|
|
656
|
+
null
|
|
657
|
+
],
|
|
658
|
+
[
|
|
659
|
+
$b4f18e3395fe64d7$export$364712098d2aa57c,
|
|
660
|
+
null
|
|
661
|
+
]
|
|
662
|
+
]
|
|
663
|
+
}, /* @__PURE__ */ React__default.createElement($263ab7fc0f95ccdb$export$4feb769f8ddf26c5.Provider, {
|
|
664
|
+
value: $263ab7fc0f95ccdb$export$a164736487e3f0ae
|
|
665
|
+
}, renderProps.children)));
|
|
666
|
+
}
|
|
667
|
+
const tabsVariants = tv({
|
|
668
|
+
defaultVariants: {
|
|
669
|
+
align: "center",
|
|
670
|
+
variant: "primary"
|
|
671
|
+
},
|
|
672
|
+
slots: {
|
|
673
|
+
base: "tabs",
|
|
674
|
+
scrollNext: "tabs__list-container__scroll-next",
|
|
675
|
+
scrollPrev: "tabs__list-container__scroll-prev",
|
|
676
|
+
scroller: "tabs__list-container__scroller",
|
|
677
|
+
separator: "tabs__separator",
|
|
678
|
+
tab: "tabs__tab",
|
|
679
|
+
tabIndicator: "tabs__indicator",
|
|
680
|
+
tabList: "tabs__list",
|
|
681
|
+
tabListContainer: "tabs__list-container",
|
|
682
|
+
tabPanel: "tabs__panel"
|
|
683
|
+
},
|
|
684
|
+
variants: {
|
|
685
|
+
align: {
|
|
686
|
+
center: {},
|
|
687
|
+
// No class as the base already centers tab content
|
|
688
|
+
end: {
|
|
689
|
+
base: "tabs--align-end"
|
|
690
|
+
},
|
|
691
|
+
start: {
|
|
692
|
+
base: "tabs--align-start"
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
variant: {
|
|
696
|
+
primary: {},
|
|
697
|
+
secondary: {
|
|
698
|
+
base: "tabs--secondary"
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
const colors = {
|
|
704
|
+
blue: "\x1B[34m",
|
|
705
|
+
green: "\x1B[32m",
|
|
706
|
+
magenta: "\x1B[35m",
|
|
707
|
+
red: "\x1B[31m",
|
|
708
|
+
reset: "\x1B[0m",
|
|
709
|
+
yellow: "\x1B[33m"
|
|
710
|
+
};
|
|
711
|
+
const levelColors = {
|
|
712
|
+
debug: colors.magenta,
|
|
713
|
+
error: colors.red,
|
|
714
|
+
info: colors.blue,
|
|
715
|
+
success: colors.green,
|
|
716
|
+
warn: colors.yellow
|
|
717
|
+
};
|
|
718
|
+
const levelEmojis = {
|
|
719
|
+
debug: "🔍",
|
|
720
|
+
error: "❌",
|
|
721
|
+
info: "ℹ️",
|
|
722
|
+
success: "✅",
|
|
723
|
+
warn: "⚠️"
|
|
724
|
+
};
|
|
725
|
+
class Logger {
|
|
726
|
+
enabled;
|
|
727
|
+
prefix;
|
|
728
|
+
constructor(options = {}) {
|
|
729
|
+
this.enabled = options.enabled ?? true;
|
|
730
|
+
this.prefix = options.prefix ?? "HeroUI";
|
|
731
|
+
}
|
|
732
|
+
formatMessage(level, message) {
|
|
733
|
+
const color = levelColors[level];
|
|
734
|
+
const emoji = levelEmojis[level];
|
|
735
|
+
return `${color}[${this.prefix}]${colors.reset} ${emoji} ${message}`;
|
|
736
|
+
}
|
|
737
|
+
log(level, message, ...args) {
|
|
738
|
+
if (!this.enabled) return;
|
|
739
|
+
this.formatMessage(level, message);
|
|
740
|
+
}
|
|
741
|
+
info(message, ...args) {
|
|
742
|
+
this.log("info", message, ...args);
|
|
743
|
+
}
|
|
744
|
+
success(message, ...args) {
|
|
745
|
+
this.log("success", message, ...args);
|
|
746
|
+
}
|
|
747
|
+
warn(message, ...args) {
|
|
748
|
+
this.log("warn", message, ...args);
|
|
749
|
+
}
|
|
750
|
+
error(message, ...args) {
|
|
751
|
+
this.log("error", message, ...args);
|
|
752
|
+
}
|
|
753
|
+
debug(message, ...args) {
|
|
754
|
+
this.log("debug", message, ...args);
|
|
755
|
+
}
|
|
756
|
+
divider(char = "=", length = 80) {
|
|
757
|
+
if (!this.enabled) return;
|
|
758
|
+
}
|
|
759
|
+
newline() {
|
|
760
|
+
if (!this.enabled) return;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
const logger = new Logger({
|
|
764
|
+
prefix: "LizaUI"
|
|
765
|
+
});
|
|
766
|
+
let registry;
|
|
767
|
+
const __DEV__ = typeof process !== "undefined" && process.env?.["NODE_ENV"] !== "production";
|
|
768
|
+
const createCollectionSlot = (name) => {
|
|
769
|
+
if (__DEV__) {
|
|
770
|
+
registry ??= /* @__PURE__ */ new Set();
|
|
771
|
+
if (registry.has(name)) {
|
|
772
|
+
logger.warn(`Duplicate collection slot "${name}". Use a unique, namespaced name (e.g. "tabs.listContainer", "menu.popover").`);
|
|
773
|
+
}
|
|
774
|
+
registry.add(name);
|
|
775
|
+
}
|
|
776
|
+
const key = `$$heroui.collection.${name}`;
|
|
777
|
+
const SlotContext = createContext(void 0);
|
|
778
|
+
const inject = (children, value) => {
|
|
779
|
+
return Children.map(children, (child) => {
|
|
780
|
+
if (!isValidElement(child)) {
|
|
781
|
+
return child;
|
|
782
|
+
}
|
|
783
|
+
return React__default.cloneElement(child, {
|
|
784
|
+
[key]: value
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
};
|
|
788
|
+
const consume = (props) => {
|
|
789
|
+
const {
|
|
790
|
+
[key]: injected,
|
|
791
|
+
...rest
|
|
792
|
+
} = props;
|
|
793
|
+
return [injected, rest];
|
|
794
|
+
};
|
|
795
|
+
const useSlot = (props) => {
|
|
796
|
+
const $ = c(5);
|
|
797
|
+
let t0;
|
|
798
|
+
if ($[0] !== props) {
|
|
799
|
+
t0 = consume(props);
|
|
800
|
+
$[0] = props;
|
|
801
|
+
$[1] = t0;
|
|
802
|
+
} else {
|
|
803
|
+
t0 = $[1];
|
|
804
|
+
}
|
|
805
|
+
const [fromProps, rest] = t0;
|
|
806
|
+
const fromContext = useContext(SlotContext);
|
|
807
|
+
const t1 = fromProps ?? fromContext;
|
|
808
|
+
let t2;
|
|
809
|
+
if ($[2] !== rest || $[3] !== t1) {
|
|
810
|
+
t2 = [t1, rest];
|
|
811
|
+
$[2] = rest;
|
|
812
|
+
$[3] = t1;
|
|
813
|
+
$[4] = t2;
|
|
814
|
+
} else {
|
|
815
|
+
t2 = $[4];
|
|
816
|
+
}
|
|
817
|
+
return t2;
|
|
818
|
+
};
|
|
819
|
+
const Injector = (t0) => {
|
|
820
|
+
const $ = c(8);
|
|
821
|
+
let T0;
|
|
822
|
+
let t1;
|
|
823
|
+
let t2;
|
|
824
|
+
if ($[0] !== t0) {
|
|
825
|
+
const {
|
|
826
|
+
children,
|
|
827
|
+
...value
|
|
828
|
+
} = t0;
|
|
829
|
+
T0 = SlotContext.Provider;
|
|
830
|
+
t1 = value;
|
|
831
|
+
t2 = inject(children, value);
|
|
832
|
+
$[0] = t0;
|
|
833
|
+
$[1] = T0;
|
|
834
|
+
$[2] = t1;
|
|
835
|
+
$[3] = t2;
|
|
836
|
+
} else {
|
|
837
|
+
T0 = $[1];
|
|
838
|
+
t1 = $[2];
|
|
839
|
+
t2 = $[3];
|
|
840
|
+
}
|
|
841
|
+
let t3;
|
|
842
|
+
if ($[4] !== T0 || $[5] !== t1 || $[6] !== t2) {
|
|
843
|
+
t3 = /* @__PURE__ */ jsx(T0, { value: t1, children: t2 });
|
|
844
|
+
$[4] = T0;
|
|
845
|
+
$[5] = t1;
|
|
846
|
+
$[6] = t2;
|
|
847
|
+
$[7] = t3;
|
|
848
|
+
} else {
|
|
849
|
+
t3 = $[7];
|
|
850
|
+
}
|
|
851
|
+
return t3;
|
|
852
|
+
};
|
|
853
|
+
Injector.displayName = `HeroUI.CollectionSlot(${name})`;
|
|
854
|
+
const withSlot = (Primitive, defaultRender) => {
|
|
855
|
+
const Wrapped = forwardRef(function CollectionSlotTarget(props, forwardedRef) {
|
|
856
|
+
const [injected, rest] = useSlot(props);
|
|
857
|
+
const {
|
|
858
|
+
children,
|
|
859
|
+
...restProps
|
|
860
|
+
} = rest;
|
|
861
|
+
if (!injected) {
|
|
862
|
+
return /* @__PURE__ */ jsx(Primitive, { ...restProps, ref: forwardedRef, children });
|
|
863
|
+
}
|
|
864
|
+
if (defaultRender) {
|
|
865
|
+
return defaultRender({
|
|
866
|
+
...restProps,
|
|
867
|
+
children
|
|
868
|
+
}, injected, forwardedRef);
|
|
869
|
+
}
|
|
870
|
+
const {
|
|
871
|
+
className: containerClassName,
|
|
872
|
+
render: customRender,
|
|
873
|
+
...containerRest
|
|
874
|
+
} = injected;
|
|
875
|
+
return /* @__PURE__ */ jsx(Primitive, { ...restProps, ref: forwardedRef, children: customRender ? customRender({
|
|
876
|
+
children,
|
|
877
|
+
className: containerClassName,
|
|
878
|
+
...containerRest
|
|
879
|
+
}) : /* @__PURE__ */ jsx("div", { className: containerClassName, "data-slot": `${name}-container`, ...containerRest, children }) });
|
|
880
|
+
});
|
|
881
|
+
Wrapped.displayName = `HeroUI.withCollectionSlot(${Primitive.displayName || Primitive.name || name})`;
|
|
882
|
+
return Wrapped;
|
|
883
|
+
};
|
|
884
|
+
return {
|
|
885
|
+
key,
|
|
886
|
+
inject,
|
|
887
|
+
consume,
|
|
888
|
+
useSlot,
|
|
889
|
+
Injector,
|
|
890
|
+
withSlot,
|
|
891
|
+
Context: SlotContext
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
function composeTwRenderProps(className, tailwind) {
|
|
895
|
+
return $7230ffa83bc0c2cf$export$c245e6201fed2f75(className, (className2, renderProps) => {
|
|
896
|
+
const tw = typeof tailwind === "function" ? tailwind(renderProps) ?? "" : tailwind ?? "";
|
|
897
|
+
const cls = className2 ?? "";
|
|
898
|
+
return cx(tw, cls) ?? "";
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
const composeSlotClassName = (slotFn, className, variants) => {
|
|
902
|
+
return typeof slotFn === "function" ? slotFn({
|
|
903
|
+
...{},
|
|
904
|
+
className
|
|
905
|
+
}) : className;
|
|
906
|
+
};
|
|
907
|
+
function DOMElement(ElementType, props) {
|
|
908
|
+
const {
|
|
909
|
+
ref: forwardedRef,
|
|
910
|
+
render,
|
|
911
|
+
...otherProps
|
|
912
|
+
} = props;
|
|
913
|
+
const elementRef = useRef(null);
|
|
914
|
+
const ref = useMemo(() => $4064df0d6f9620e1$export$c9058316764c140e(forwardedRef, elementRef), [forwardedRef, elementRef]);
|
|
915
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
916
|
+
if (typeof process !== "undefined" && process.env?.["NODE_ENV"] !== "production" && render) {
|
|
917
|
+
if (!elementRef.current) ;
|
|
918
|
+
}
|
|
919
|
+
}, [ElementType, render]);
|
|
920
|
+
const domProps = {
|
|
921
|
+
...otherProps,
|
|
922
|
+
ref
|
|
923
|
+
};
|
|
924
|
+
if (render) {
|
|
925
|
+
return render(domProps, void 0);
|
|
926
|
+
}
|
|
927
|
+
return /* @__PURE__ */ jsx(ElementType, { ...domProps });
|
|
928
|
+
}
|
|
929
|
+
const domComponentCache = {};
|
|
930
|
+
const dom = new Proxy({}, {
|
|
931
|
+
get(_target, elementType) {
|
|
932
|
+
if (typeof elementType !== "string") {
|
|
933
|
+
return void 0;
|
|
934
|
+
}
|
|
935
|
+
let res = domComponentCache[elementType];
|
|
936
|
+
if (!res) {
|
|
937
|
+
res = DOMElement.bind(null, elementType);
|
|
938
|
+
domComponentCache[elementType] = res;
|
|
939
|
+
}
|
|
940
|
+
return res;
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
const IconChevronDown = (props) => {
|
|
944
|
+
const $ = c(3);
|
|
945
|
+
let t0;
|
|
946
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
947
|
+
t0 = /* @__PURE__ */ jsx("path", { clipRule: "evenodd", d: "M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06", fill: "currentColor", fillRule: "evenodd" });
|
|
948
|
+
$[0] = t0;
|
|
949
|
+
} else {
|
|
950
|
+
t0 = $[0];
|
|
951
|
+
}
|
|
952
|
+
let t1;
|
|
953
|
+
if ($[1] !== props) {
|
|
954
|
+
t1 = /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", fill: "none", height: 16, role: "presentation", viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg", ...props, children: t0 });
|
|
955
|
+
$[1] = props;
|
|
956
|
+
$[2] = t1;
|
|
957
|
+
} else {
|
|
958
|
+
t1 = $[2];
|
|
959
|
+
}
|
|
960
|
+
return t1;
|
|
961
|
+
};
|
|
962
|
+
const IconChevronUp = (props) => {
|
|
963
|
+
const $ = c(3);
|
|
964
|
+
let t0;
|
|
965
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
966
|
+
t0 = /* @__PURE__ */ jsx("path", { clipRule: "evenodd", d: "M13.03 10.53a.75.75 0 0 1-1.06 0L8 6.56l-3.97 3.97a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06", fill: "currentColor", fillRule: "evenodd" });
|
|
967
|
+
$[0] = t0;
|
|
968
|
+
} else {
|
|
969
|
+
t0 = $[0];
|
|
970
|
+
}
|
|
971
|
+
let t1;
|
|
972
|
+
if ($[1] !== props) {
|
|
973
|
+
t1 = /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", fill: "none", height: 16, role: "presentation", viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg", ...props, children: t0 });
|
|
974
|
+
$[1] = props;
|
|
975
|
+
$[2] = t1;
|
|
976
|
+
} else {
|
|
977
|
+
t1 = $[2];
|
|
978
|
+
}
|
|
979
|
+
return t1;
|
|
980
|
+
};
|
|
981
|
+
const IconChevronLeft = (props) => {
|
|
982
|
+
const $ = c(3);
|
|
983
|
+
let t0;
|
|
984
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
985
|
+
t0 = /* @__PURE__ */ jsx("path", { clipRule: "evenodd", d: "M10.53 2.97a.75.75 0 0 1 0 1.06L6.56 8l3.97 3.97a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 0", fill: "currentColor", fillRule: "evenodd" });
|
|
986
|
+
$[0] = t0;
|
|
987
|
+
} else {
|
|
988
|
+
t0 = $[0];
|
|
989
|
+
}
|
|
990
|
+
let t1;
|
|
991
|
+
if ($[1] !== props) {
|
|
992
|
+
t1 = /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", fill: "none", height: 16, role: "presentation", viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg", ...props, children: t0 });
|
|
993
|
+
$[1] = props;
|
|
994
|
+
$[2] = t1;
|
|
995
|
+
} else {
|
|
996
|
+
t1 = $[2];
|
|
997
|
+
}
|
|
998
|
+
return t1;
|
|
999
|
+
};
|
|
1000
|
+
const IconChevronRight = (props) => {
|
|
1001
|
+
const $ = c(3);
|
|
1002
|
+
let t0;
|
|
1003
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
1004
|
+
t0 = /* @__PURE__ */ jsx("path", { clipRule: "evenodd", d: "M5.47 2.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 0-1.06Z", fill: "currentColor", fillRule: "evenodd" });
|
|
1005
|
+
$[0] = t0;
|
|
1006
|
+
} else {
|
|
1007
|
+
t0 = $[0];
|
|
1008
|
+
}
|
|
1009
|
+
let t1;
|
|
1010
|
+
if ($[1] !== props) {
|
|
1011
|
+
t1 = /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", fill: "none", height: 16, role: "presentation", viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg", ...props, children: t0 });
|
|
1012
|
+
$[1] = props;
|
|
1013
|
+
$[2] = t1;
|
|
1014
|
+
} else {
|
|
1015
|
+
t1 = $[2];
|
|
1016
|
+
}
|
|
1017
|
+
return t1;
|
|
1018
|
+
};
|
|
1019
|
+
const TabsContext = createContext({});
|
|
1020
|
+
const listContainerSlot = createCollectionSlot("tabs.listContainer");
|
|
1021
|
+
const TabsRoot = (t0) => {
|
|
1022
|
+
const $ = c(24);
|
|
1023
|
+
let align;
|
|
1024
|
+
let children;
|
|
1025
|
+
let className;
|
|
1026
|
+
let props;
|
|
1027
|
+
let t1;
|
|
1028
|
+
let variant;
|
|
1029
|
+
if ($[0] !== t0) {
|
|
1030
|
+
({
|
|
1031
|
+
align,
|
|
1032
|
+
children,
|
|
1033
|
+
className,
|
|
1034
|
+
orientation: t1,
|
|
1035
|
+
variant,
|
|
1036
|
+
...props
|
|
1037
|
+
} = t0);
|
|
1038
|
+
$[0] = t0;
|
|
1039
|
+
$[1] = align;
|
|
1040
|
+
$[2] = children;
|
|
1041
|
+
$[3] = className;
|
|
1042
|
+
$[4] = props;
|
|
1043
|
+
$[5] = t1;
|
|
1044
|
+
$[6] = variant;
|
|
1045
|
+
} else {
|
|
1046
|
+
align = $[1];
|
|
1047
|
+
children = $[2];
|
|
1048
|
+
className = $[3];
|
|
1049
|
+
props = $[4];
|
|
1050
|
+
t1 = $[5];
|
|
1051
|
+
variant = $[6];
|
|
1052
|
+
}
|
|
1053
|
+
const orientation = t1 === void 0 ? "horizontal" : t1;
|
|
1054
|
+
let t2;
|
|
1055
|
+
if ($[7] !== align || $[8] !== variant) {
|
|
1056
|
+
t2 = tabsVariants({
|
|
1057
|
+
align,
|
|
1058
|
+
variant
|
|
1059
|
+
});
|
|
1060
|
+
$[7] = align;
|
|
1061
|
+
$[8] = variant;
|
|
1062
|
+
$[9] = t2;
|
|
1063
|
+
} else {
|
|
1064
|
+
t2 = $[9];
|
|
1065
|
+
}
|
|
1066
|
+
const slots = t2;
|
|
1067
|
+
let t3;
|
|
1068
|
+
if ($[10] !== orientation || $[11] !== slots) {
|
|
1069
|
+
t3 = {
|
|
1070
|
+
orientation,
|
|
1071
|
+
slots
|
|
1072
|
+
};
|
|
1073
|
+
$[10] = orientation;
|
|
1074
|
+
$[11] = slots;
|
|
1075
|
+
$[12] = t3;
|
|
1076
|
+
} else {
|
|
1077
|
+
t3 = $[12];
|
|
1078
|
+
}
|
|
1079
|
+
const contextValue = t3;
|
|
1080
|
+
let t4;
|
|
1081
|
+
if ($[13] !== className || $[14] !== slots) {
|
|
1082
|
+
t4 = composeTwRenderProps(className, slots.base());
|
|
1083
|
+
$[13] = className;
|
|
1084
|
+
$[14] = slots;
|
|
1085
|
+
$[15] = t4;
|
|
1086
|
+
} else {
|
|
1087
|
+
t4 = $[15];
|
|
1088
|
+
}
|
|
1089
|
+
let t5;
|
|
1090
|
+
if ($[16] !== children || $[17] !== orientation || $[18] !== props || $[19] !== t4) {
|
|
1091
|
+
t5 = /* @__PURE__ */ jsx($b4f18e3395fe64d7$export$b2539bed5023c21c, { ...props, className: t4, "data-slot": "tabs", orientation, children });
|
|
1092
|
+
$[16] = children;
|
|
1093
|
+
$[17] = orientation;
|
|
1094
|
+
$[18] = props;
|
|
1095
|
+
$[19] = t4;
|
|
1096
|
+
$[20] = t5;
|
|
1097
|
+
} else {
|
|
1098
|
+
t5 = $[20];
|
|
1099
|
+
}
|
|
1100
|
+
let t6;
|
|
1101
|
+
if ($[21] !== contextValue || $[22] !== t5) {
|
|
1102
|
+
t6 = /* @__PURE__ */ jsx(TabsContext, { value: contextValue, children: t5 });
|
|
1103
|
+
$[21] = contextValue;
|
|
1104
|
+
$[22] = t5;
|
|
1105
|
+
$[23] = t6;
|
|
1106
|
+
} else {
|
|
1107
|
+
t6 = $[23];
|
|
1108
|
+
}
|
|
1109
|
+
return t6;
|
|
1110
|
+
};
|
|
1111
|
+
const TabListContainer = (t0) => {
|
|
1112
|
+
const $ = c(12);
|
|
1113
|
+
let children;
|
|
1114
|
+
let className;
|
|
1115
|
+
let containerProps;
|
|
1116
|
+
let render;
|
|
1117
|
+
if ($[0] !== t0) {
|
|
1118
|
+
({
|
|
1119
|
+
children,
|
|
1120
|
+
className,
|
|
1121
|
+
render,
|
|
1122
|
+
...containerProps
|
|
1123
|
+
} = t0);
|
|
1124
|
+
$[0] = t0;
|
|
1125
|
+
$[1] = children;
|
|
1126
|
+
$[2] = className;
|
|
1127
|
+
$[3] = containerProps;
|
|
1128
|
+
$[4] = render;
|
|
1129
|
+
} else {
|
|
1130
|
+
children = $[1];
|
|
1131
|
+
className = $[2];
|
|
1132
|
+
containerProps = $[3];
|
|
1133
|
+
render = $[4];
|
|
1134
|
+
}
|
|
1135
|
+
let t1;
|
|
1136
|
+
if ($[5] !== className || $[6] !== containerProps || $[7] !== render) {
|
|
1137
|
+
t1 = {
|
|
1138
|
+
...containerProps,
|
|
1139
|
+
className,
|
|
1140
|
+
render
|
|
1141
|
+
};
|
|
1142
|
+
$[5] = className;
|
|
1143
|
+
$[6] = containerProps;
|
|
1144
|
+
$[7] = render;
|
|
1145
|
+
$[8] = t1;
|
|
1146
|
+
} else {
|
|
1147
|
+
t1 = $[8];
|
|
1148
|
+
}
|
|
1149
|
+
const t2 = t1;
|
|
1150
|
+
let t3;
|
|
1151
|
+
if ($[9] !== children || $[10] !== t2) {
|
|
1152
|
+
t3 = /* @__PURE__ */ jsx(listContainerSlot.Injector, { ...t2, children });
|
|
1153
|
+
$[9] = children;
|
|
1154
|
+
$[10] = t2;
|
|
1155
|
+
$[11] = t3;
|
|
1156
|
+
} else {
|
|
1157
|
+
t3 = $[11];
|
|
1158
|
+
}
|
|
1159
|
+
return t3;
|
|
1160
|
+
};
|
|
1161
|
+
const TabList2 = ({
|
|
1162
|
+
children,
|
|
1163
|
+
className,
|
|
1164
|
+
...props
|
|
1165
|
+
}) => {
|
|
1166
|
+
const {
|
|
1167
|
+
orientation = "horizontal",
|
|
1168
|
+
slots
|
|
1169
|
+
} = use(TabsContext);
|
|
1170
|
+
const scrollerRef = useRef(null);
|
|
1171
|
+
const isVertical = orientation === "vertical";
|
|
1172
|
+
const [listContainerProps, restProps] = listContainerSlot.useSlot(props);
|
|
1173
|
+
const scrollBy = useCallback((direction) => {
|
|
1174
|
+
const el = scrollerRef.current;
|
|
1175
|
+
if (!el) return;
|
|
1176
|
+
const size = isVertical ? el.clientHeight : el.clientWidth;
|
|
1177
|
+
const scrollSize = isVertical ? el.scrollHeight : el.scrollWidth;
|
|
1178
|
+
const maxScroll = Math.max(0, scrollSize - size);
|
|
1179
|
+
const isRTL = !isVertical && getComputedStyle(el).direction === "rtl";
|
|
1180
|
+
const delta = direction * size * 0.8 * (isRTL ? -1 : 1);
|
|
1181
|
+
const current = isVertical ? el.scrollTop : el.scrollLeft;
|
|
1182
|
+
const next = Math.min(isRTL ? 0 : maxScroll, Math.max(isRTL ? -maxScroll : 0, current + delta));
|
|
1183
|
+
if (next === current) return;
|
|
1184
|
+
el.scrollTo({
|
|
1185
|
+
behavior: "smooth",
|
|
1186
|
+
[isVertical ? "top" : "left"]: next
|
|
1187
|
+
});
|
|
1188
|
+
}, [isVertical]);
|
|
1189
|
+
if (!listContainerProps) {
|
|
1190
|
+
return /* @__PURE__ */ jsx($b4f18e3395fe64d7$export$e51a686c67fdaa2d, { ...restProps, className: composeTwRenderProps(className, slots?.tabList()), "data-slot": "tabs-list", children });
|
|
1191
|
+
}
|
|
1192
|
+
const {
|
|
1193
|
+
className: containerClassName,
|
|
1194
|
+
render: containerRender,
|
|
1195
|
+
...containerRest
|
|
1196
|
+
} = listContainerProps;
|
|
1197
|
+
return /* @__PURE__ */ jsx($b4f18e3395fe64d7$export$e51a686c67fdaa2d, { ...restProps, className: composeTwRenderProps(className, slots?.tabList()), "data-slot": "tabs-list", render: (renderProps) => {
|
|
1198
|
+
const {
|
|
1199
|
+
children: listChildren,
|
|
1200
|
+
className: listClassName,
|
|
1201
|
+
ref: listRef,
|
|
1202
|
+
...listRest
|
|
1203
|
+
} = renderProps;
|
|
1204
|
+
return /* @__PURE__ */ jsxs(dom.div, { className: composeSlotClassName(slots?.tabListContainer, containerClassName), "data-slot": "tabs-list-container", render: containerRender, ...containerRest, children: [
|
|
1205
|
+
/* @__PURE__ */ jsx(ScrollShadow, { ref: scrollerRef, hideScrollBar: true, className: composeSlotClassName(slots?.scroller), orientation, size: 64, children: /* @__PURE__ */ jsx("div", { ...listRest, ref: listRef, className: listClassName, children: listChildren }) }),
|
|
1206
|
+
/* @__PURE__ */ jsx("button", { "aria-label": isVertical ? "Scroll tabs up" : "Scroll tabs left", className: composeSlotClassName(slots?.scrollPrev), tabIndex: -1, type: "button", onClick: () => scrollBy(-1), children: isVertical ? /* @__PURE__ */ jsx(IconChevronUp, {}) : /* @__PURE__ */ jsx(IconChevronLeft, {}) }),
|
|
1207
|
+
/* @__PURE__ */ jsx("button", { "aria-label": isVertical ? "Scroll tabs down" : "Scroll tabs right", className: composeSlotClassName(slots?.scrollNext), tabIndex: -1, type: "button", onClick: () => scrollBy(1), children: isVertical ? /* @__PURE__ */ jsx(IconChevronDown, {}) : /* @__PURE__ */ jsx(IconChevronRight, {}) })
|
|
1208
|
+
] });
|
|
1209
|
+
}, children });
|
|
1210
|
+
};
|
|
1211
|
+
const Tab = (t0) => {
|
|
1212
|
+
const $ = c(11);
|
|
1213
|
+
let children;
|
|
1214
|
+
let className;
|
|
1215
|
+
let props;
|
|
1216
|
+
if ($[0] !== t0) {
|
|
1217
|
+
({
|
|
1218
|
+
children,
|
|
1219
|
+
className,
|
|
1220
|
+
...props
|
|
1221
|
+
} = t0);
|
|
1222
|
+
$[0] = t0;
|
|
1223
|
+
$[1] = children;
|
|
1224
|
+
$[2] = className;
|
|
1225
|
+
$[3] = props;
|
|
1226
|
+
} else {
|
|
1227
|
+
children = $[1];
|
|
1228
|
+
className = $[2];
|
|
1229
|
+
props = $[3];
|
|
1230
|
+
}
|
|
1231
|
+
const {
|
|
1232
|
+
slots
|
|
1233
|
+
} = use(TabsContext);
|
|
1234
|
+
let t1;
|
|
1235
|
+
if ($[4] !== className || $[5] !== slots) {
|
|
1236
|
+
t1 = composeTwRenderProps(className, slots?.tab());
|
|
1237
|
+
$[4] = className;
|
|
1238
|
+
$[5] = slots;
|
|
1239
|
+
$[6] = t1;
|
|
1240
|
+
} else {
|
|
1241
|
+
t1 = $[6];
|
|
1242
|
+
}
|
|
1243
|
+
let t2;
|
|
1244
|
+
if ($[7] !== children || $[8] !== props || $[9] !== t1) {
|
|
1245
|
+
t2 = /* @__PURE__ */ jsx($b4f18e3395fe64d7$export$3e41faf802a29e71, { ...props, className: t1, "data-slot": "tabs-tab", children });
|
|
1246
|
+
$[7] = children;
|
|
1247
|
+
$[8] = props;
|
|
1248
|
+
$[9] = t1;
|
|
1249
|
+
$[10] = t2;
|
|
1250
|
+
} else {
|
|
1251
|
+
t2 = $[10];
|
|
1252
|
+
}
|
|
1253
|
+
return t2;
|
|
1254
|
+
};
|
|
1255
|
+
const TabIndicator = (t0) => {
|
|
1256
|
+
const $ = c(9);
|
|
1257
|
+
let className;
|
|
1258
|
+
let props;
|
|
1259
|
+
if ($[0] !== t0) {
|
|
1260
|
+
({
|
|
1261
|
+
className,
|
|
1262
|
+
...props
|
|
1263
|
+
} = t0);
|
|
1264
|
+
$[0] = t0;
|
|
1265
|
+
$[1] = className;
|
|
1266
|
+
$[2] = props;
|
|
1267
|
+
} else {
|
|
1268
|
+
className = $[1];
|
|
1269
|
+
props = $[2];
|
|
1270
|
+
}
|
|
1271
|
+
const {
|
|
1272
|
+
slots
|
|
1273
|
+
} = use(TabsContext);
|
|
1274
|
+
const t1 = slots?.tabIndicator;
|
|
1275
|
+
let t2;
|
|
1276
|
+
if ($[3] !== className || $[4] !== t1) {
|
|
1277
|
+
t2 = composeSlotClassName(t1, className);
|
|
1278
|
+
$[3] = className;
|
|
1279
|
+
$[4] = t1;
|
|
1280
|
+
$[5] = t2;
|
|
1281
|
+
} else {
|
|
1282
|
+
t2 = $[5];
|
|
1283
|
+
}
|
|
1284
|
+
let t3;
|
|
1285
|
+
if ($[6] !== props || $[7] !== t2) {
|
|
1286
|
+
t3 = /* @__PURE__ */ jsx($91fe5e721c7f36c1$export$17f80983afe4e444, { className: t2, "data-slot": "tabs-indicator", ...props });
|
|
1287
|
+
$[6] = props;
|
|
1288
|
+
$[7] = t2;
|
|
1289
|
+
$[8] = t3;
|
|
1290
|
+
} else {
|
|
1291
|
+
t3 = $[8];
|
|
1292
|
+
}
|
|
1293
|
+
return t3;
|
|
1294
|
+
};
|
|
1295
|
+
const TabPanel2 = (t0) => {
|
|
1296
|
+
const $ = c(11);
|
|
1297
|
+
let children;
|
|
1298
|
+
let className;
|
|
1299
|
+
let props;
|
|
1300
|
+
if ($[0] !== t0) {
|
|
1301
|
+
({
|
|
1302
|
+
children,
|
|
1303
|
+
className,
|
|
1304
|
+
...props
|
|
1305
|
+
} = t0);
|
|
1306
|
+
$[0] = t0;
|
|
1307
|
+
$[1] = children;
|
|
1308
|
+
$[2] = className;
|
|
1309
|
+
$[3] = props;
|
|
1310
|
+
} else {
|
|
1311
|
+
children = $[1];
|
|
1312
|
+
className = $[2];
|
|
1313
|
+
props = $[3];
|
|
1314
|
+
}
|
|
1315
|
+
const {
|
|
1316
|
+
slots
|
|
1317
|
+
} = use(TabsContext);
|
|
1318
|
+
let t1;
|
|
1319
|
+
if ($[4] !== className || $[5] !== slots) {
|
|
1320
|
+
t1 = composeTwRenderProps(className, slots?.tabPanel());
|
|
1321
|
+
$[4] = className;
|
|
1322
|
+
$[5] = slots;
|
|
1323
|
+
$[6] = t1;
|
|
1324
|
+
} else {
|
|
1325
|
+
t1 = $[6];
|
|
1326
|
+
}
|
|
1327
|
+
let t2;
|
|
1328
|
+
if ($[7] !== children || $[8] !== props || $[9] !== t1) {
|
|
1329
|
+
t2 = /* @__PURE__ */ jsx($b4f18e3395fe64d7$export$3d96ec278d3efce4, { ...props, className: t1, "data-slot": "tabs-panel", children });
|
|
1330
|
+
$[7] = children;
|
|
1331
|
+
$[8] = props;
|
|
1332
|
+
$[9] = t1;
|
|
1333
|
+
$[10] = t2;
|
|
1334
|
+
} else {
|
|
1335
|
+
t2 = $[10];
|
|
1336
|
+
}
|
|
1337
|
+
return t2;
|
|
1338
|
+
};
|
|
1339
|
+
const TabSeparator = (t0) => {
|
|
1340
|
+
const $ = c(9);
|
|
1341
|
+
let className;
|
|
1342
|
+
let props;
|
|
1343
|
+
if ($[0] !== t0) {
|
|
1344
|
+
({
|
|
1345
|
+
className,
|
|
1346
|
+
...props
|
|
1347
|
+
} = t0);
|
|
1348
|
+
$[0] = t0;
|
|
1349
|
+
$[1] = className;
|
|
1350
|
+
$[2] = props;
|
|
1351
|
+
} else {
|
|
1352
|
+
className = $[1];
|
|
1353
|
+
props = $[2];
|
|
1354
|
+
}
|
|
1355
|
+
const {
|
|
1356
|
+
slots
|
|
1357
|
+
} = use(TabsContext);
|
|
1358
|
+
const t1 = slots?.separator;
|
|
1359
|
+
let t2;
|
|
1360
|
+
if ($[3] !== className || $[4] !== t1) {
|
|
1361
|
+
t2 = composeSlotClassName(t1, className);
|
|
1362
|
+
$[3] = className;
|
|
1363
|
+
$[4] = t1;
|
|
1364
|
+
$[5] = t2;
|
|
1365
|
+
} else {
|
|
1366
|
+
t2 = $[5];
|
|
1367
|
+
}
|
|
1368
|
+
const t3 = props;
|
|
1369
|
+
let t4;
|
|
1370
|
+
if ($[6] !== t2 || $[7] !== t3) {
|
|
1371
|
+
t4 = /* @__PURE__ */ jsx(dom.span, { "aria-hidden": "true", className: t2, "data-slot": "tabs-separator", ...t3 });
|
|
1372
|
+
$[6] = t2;
|
|
1373
|
+
$[7] = t3;
|
|
1374
|
+
$[8] = t4;
|
|
1375
|
+
} else {
|
|
1376
|
+
t4 = $[8];
|
|
1377
|
+
}
|
|
1378
|
+
return t4;
|
|
1379
|
+
};
|
|
1380
|
+
const Tabs2 = Object.assign(TabsRoot, {
|
|
1381
|
+
Root: TabsRoot,
|
|
1382
|
+
ListContainer: TabListContainer,
|
|
1383
|
+
List: TabList2,
|
|
1384
|
+
Tab,
|
|
1385
|
+
Indicator: TabIndicator,
|
|
1386
|
+
Separator: TabSeparator,
|
|
1387
|
+
Panel: TabPanel2
|
|
1388
|
+
});
|
|
1389
|
+
export {
|
|
1390
|
+
Tab,
|
|
1391
|
+
TabIndicator,
|
|
1392
|
+
TabList2 as TabList,
|
|
1393
|
+
TabListContainer,
|
|
1394
|
+
TabPanel2 as TabPanel,
|
|
1395
|
+
TabSeparator,
|
|
1396
|
+
Tabs2 as Tabs,
|
|
1397
|
+
TabsRoot,
|
|
1398
|
+
tabsVariants
|
|
1399
|
+
};
|
|
1400
|
+
//# sourceMappingURL=index.es.js.map
|