@strands.gg/accui 2.10.0 → 2.10.2
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/accui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +249 -178
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8,7 +8,7 @@ const _hoisted_2$M = {
|
|
|
8
8
|
class: "ui-app-loading-overlay"
|
|
9
9
|
};
|
|
10
10
|
const _hoisted_3$J = { class: "ui-app-loading-content" };
|
|
11
|
-
const _hoisted_4$
|
|
11
|
+
const _hoisted_4$H = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "ui-app-loading-message"
|
|
14
14
|
};
|
|
@@ -67,7 +67,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
isGlobalLoading.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, [
|
|
68
68
|
createElementVNode("div", _hoisted_3$J, [
|
|
69
69
|
_cache[1] || (_cache[1] = createElementVNode("div", { class: "ui-app-loading-spinner" }, null, -1)),
|
|
70
|
-
_ctx.loadingMessage ? (openBlock(), createElementBlock("p", _hoisted_4$
|
|
70
|
+
_ctx.loadingMessage ? (openBlock(), createElementBlock("p", _hoisted_4$H, toDisplayString(_ctx.loadingMessage), 1)) : createCommentVNode("", true)
|
|
71
71
|
])
|
|
72
72
|
])) : createCommentVNode("", true)
|
|
73
73
|
]))
|
|
@@ -86,14 +86,14 @@ const UiApp = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-f
|
|
|
86
86
|
const _hoisted_1$T = { class: "accui-component-scope" };
|
|
87
87
|
const _hoisted_2$L = { class: "alert-content" };
|
|
88
88
|
const _hoisted_3$I = { class: "alert-icon-container" };
|
|
89
|
-
const _hoisted_4$
|
|
89
|
+
const _hoisted_4$G = {
|
|
90
90
|
class: "alert-main-icon",
|
|
91
91
|
fill: "currentColor",
|
|
92
92
|
viewBox: "0 0 20 20",
|
|
93
93
|
"aria-hidden": "true"
|
|
94
94
|
};
|
|
95
|
-
const _hoisted_5$
|
|
96
|
-
const _hoisted_6$
|
|
95
|
+
const _hoisted_5$B = ["d"];
|
|
96
|
+
const _hoisted_6$v = { class: "alert-text-container" };
|
|
97
97
|
const _hoisted_7$s = {
|
|
98
98
|
key: 0,
|
|
99
99
|
class: "alert-dismiss-container"
|
|
@@ -141,15 +141,15 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
141
141
|
}, [
|
|
142
142
|
createElementVNode("div", _hoisted_2$L, [
|
|
143
143
|
createElementVNode("div", _hoisted_3$I, [
|
|
144
|
-
(openBlock(), createElementBlock("svg", _hoisted_4$
|
|
144
|
+
(openBlock(), createElementBlock("svg", _hoisted_4$G, [
|
|
145
145
|
createElementVNode("path", {
|
|
146
146
|
"fill-rule": "evenodd",
|
|
147
147
|
d: iconPath.value,
|
|
148
148
|
"clip-rule": "evenodd"
|
|
149
|
-
}, null, 8, _hoisted_5$
|
|
149
|
+
}, null, 8, _hoisted_5$B)
|
|
150
150
|
]))
|
|
151
151
|
]),
|
|
152
|
-
createElementVNode("div", _hoisted_6$
|
|
152
|
+
createElementVNode("div", _hoisted_6$v, [
|
|
153
153
|
_ctx.title ? (openBlock(), createElementBlock("h3", {
|
|
154
154
|
key: 0,
|
|
155
155
|
class: normalizeClass(titleClasses.value)
|
|
@@ -196,9 +196,9 @@ const _hoisted_1$S = {
|
|
|
196
196
|
};
|
|
197
197
|
const _hoisted_2$K = ["width", "height"];
|
|
198
198
|
const _hoisted_3$H = ["d"];
|
|
199
|
-
const _hoisted_4$
|
|
200
|
-
const _hoisted_5$
|
|
201
|
-
const _hoisted_6$
|
|
199
|
+
const _hoisted_4$F = ["stroke-width"];
|
|
200
|
+
const _hoisted_5$A = ["stroke-width"];
|
|
201
|
+
const _hoisted_6$u = ["width", "height"];
|
|
202
202
|
const _hoisted_7$r = {
|
|
203
203
|
key: 3,
|
|
204
204
|
class: "loader-text"
|
|
@@ -257,7 +257,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
257
257
|
"stroke-width": _ctx.weight,
|
|
258
258
|
"stroke-linecap": "round",
|
|
259
259
|
"stroke-linejoin": "round"
|
|
260
|
-
}, null, 8, _hoisted_4$
|
|
260
|
+
}, null, 8, _hoisted_4$F),
|
|
261
261
|
createElementVNode("use", {
|
|
262
262
|
href: "#logo-path",
|
|
263
263
|
fill: "none",
|
|
@@ -266,7 +266,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
266
266
|
"stroke-linecap": "round",
|
|
267
267
|
"stroke-linejoin": "round",
|
|
268
268
|
class: "loader-animated-path"
|
|
269
|
-
}, null, 8, _hoisted_5$
|
|
269
|
+
}, null, 8, _hoisted_5$A)
|
|
270
270
|
], 8, _hoisted_2$K))
|
|
271
271
|
])) : _ctx.variant === "circle" ? (openBlock(), createElementBlock("div", {
|
|
272
272
|
key: 1,
|
|
@@ -288,7 +288,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
288
288
|
"stroke-linecap": "round",
|
|
289
289
|
class: "loader-circle-path"
|
|
290
290
|
}, null, -1)
|
|
291
|
-
])], 8, _hoisted_6$
|
|
291
|
+
])], 8, _hoisted_6$u))
|
|
292
292
|
], 4)) : _ctx.variant === "bar" ? (openBlock(), createElementBlock("div", {
|
|
293
293
|
key: 2,
|
|
294
294
|
class: "loader-bar",
|
|
@@ -316,7 +316,7 @@ const _hoisted_3$G = {
|
|
|
316
316
|
key: 0,
|
|
317
317
|
class: "leading-icon"
|
|
318
318
|
};
|
|
319
|
-
const _hoisted_4$
|
|
319
|
+
const _hoisted_4$E = {
|
|
320
320
|
key: 1,
|
|
321
321
|
class: "trailing-icon"
|
|
322
322
|
};
|
|
@@ -380,7 +380,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
380
380
|
])) : createCommentVNode("", true),
|
|
381
381
|
renderSlot(_ctx.$slots, "icon", {}, void 0, true),
|
|
382
382
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
383
|
-
hasTrailingIconSlot.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
383
|
+
hasTrailingIconSlot.value ? (openBlock(), createElementBlock("span", _hoisted_4$E, [
|
|
384
384
|
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
|
|
385
385
|
])) : createCommentVNode("", true)
|
|
386
386
|
], 64))
|
|
@@ -795,8 +795,20 @@ const _hoisted_1$O = {
|
|
|
795
795
|
key: 0,
|
|
796
796
|
class: "ui-card-header"
|
|
797
797
|
};
|
|
798
|
-
const _hoisted_2$I = {
|
|
798
|
+
const _hoisted_2$I = {
|
|
799
|
+
key: 0,
|
|
800
|
+
class: "ui-card-title-wrapper"
|
|
801
|
+
};
|
|
799
802
|
const _hoisted_3$F = {
|
|
803
|
+
key: 0,
|
|
804
|
+
class: "ui-card-title"
|
|
805
|
+
};
|
|
806
|
+
const _hoisted_4$D = {
|
|
807
|
+
key: 0,
|
|
808
|
+
class: "ui-card-subtitle"
|
|
809
|
+
};
|
|
810
|
+
const _hoisted_5$z = { class: "ui-card-content" };
|
|
811
|
+
const _hoisted_6$t = {
|
|
800
812
|
key: 1,
|
|
801
813
|
class: "ui-card-footer"
|
|
802
814
|
};
|
|
@@ -809,7 +821,9 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
809
821
|
variant: { default: "default" },
|
|
810
822
|
padding: { default: "md" },
|
|
811
823
|
shadow: { default: "sm" },
|
|
812
|
-
color: { default: "default" }
|
|
824
|
+
color: { default: "default" },
|
|
825
|
+
title: {},
|
|
826
|
+
subtitle: {}
|
|
813
827
|
},
|
|
814
828
|
setup(__props) {
|
|
815
829
|
const attrs = useAttrs();
|
|
@@ -823,20 +837,32 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
823
837
|
unref(attrs)["class"]
|
|
824
838
|
]])
|
|
825
839
|
}, [
|
|
826
|
-
_ctx.$slots["header"] ? (openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
827
|
-
renderSlot(_ctx.$slots, "header", {},
|
|
840
|
+
_ctx.$slots["header"] || _ctx.title || _ctx.subtitle || _ctx.$slots["leading-icon"] || _ctx.$slots["trailing-icon"] ? (openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
841
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
842
|
+
renderSlot(_ctx.$slots, "leading-icon", {}, void 0, true),
|
|
843
|
+
_ctx.title || _ctx.$slots["title"] || _ctx.subtitle || _ctx.$slots["subtitle"] ? (openBlock(), createElementBlock("div", _hoisted_2$I, [
|
|
844
|
+
_ctx.title || _ctx.$slots["title"] ? renderSlot(_ctx.$slots, "title", { key: 0 }, () => [
|
|
845
|
+
_ctx.title ? (openBlock(), createElementBlock("h2", _hoisted_3$F, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
|
|
846
|
+
], true) : createCommentVNode("", true),
|
|
847
|
+
_ctx.subtitle || _ctx.$slots["subtitle"] ? renderSlot(_ctx.$slots, "subtitle", { key: 1 }, () => [
|
|
848
|
+
_ctx.subtitle ? (openBlock(), createElementBlock("p", _hoisted_4$D, toDisplayString(_ctx.subtitle), 1)) : createCommentVNode("", true)
|
|
849
|
+
], true) : createCommentVNode("", true)
|
|
850
|
+
])) : createCommentVNode("", true),
|
|
851
|
+
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true),
|
|
852
|
+
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
853
|
+
], true)
|
|
828
854
|
])) : createCommentVNode("", true),
|
|
829
|
-
createElementVNode("div",
|
|
855
|
+
createElementVNode("div", _hoisted_5$z, [
|
|
830
856
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
831
857
|
]),
|
|
832
|
-
_ctx.$slots["footer"] ? (openBlock(), createElementBlock("div",
|
|
858
|
+
_ctx.$slots["footer"] ? (openBlock(), createElementBlock("div", _hoisted_6$t, [
|
|
833
859
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
834
860
|
])) : createCommentVNode("", true)
|
|
835
861
|
], 2);
|
|
836
862
|
};
|
|
837
863
|
}
|
|
838
864
|
});
|
|
839
|
-
const StrandsUiCard = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-
|
|
865
|
+
const StrandsUiCard = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-d53b5273"]]);
|
|
840
866
|
/**
|
|
841
867
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
842
868
|
*
|
|
@@ -2596,6 +2622,13 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
2596
2622
|
},
|
|
2597
2623
|
emits: ["update:modelValue"],
|
|
2598
2624
|
setup(__props, { emit: __emit }) {
|
|
2625
|
+
const isDevToolsOpen = () => {
|
|
2626
|
+
try {
|
|
2627
|
+
return window.outerHeight - window.innerHeight > 160 || window.outerWidth - window.innerWidth > 160;
|
|
2628
|
+
} catch {
|
|
2629
|
+
return false;
|
|
2630
|
+
}
|
|
2631
|
+
};
|
|
2599
2632
|
const props = __props;
|
|
2600
2633
|
const emit = __emit;
|
|
2601
2634
|
const slots = useSlots();
|
|
@@ -2622,195 +2655,226 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
2622
2655
|
let currentTabIndex = -1;
|
|
2623
2656
|
let isAnimating = false;
|
|
2624
2657
|
const calculateUnderlineDimensions = (tabElement, containerElement) => {
|
|
2625
|
-
|
|
2626
|
-
const containerRect = containerElement.getBoundingClientRect();
|
|
2627
|
-
const computedStyle = getComputedStyle(containerElement);
|
|
2628
|
-
const underlineThickness = parseFloat(computedStyle.getPropertyValue("--underline-thickness") || "5");
|
|
2629
|
-
let actualPadding = 5;
|
|
2630
|
-
if (props.size === "sm") {
|
|
2631
|
-
actualPadding = 4;
|
|
2632
|
-
} else if (props.size === "lg") {
|
|
2633
|
-
actualPadding = 6;
|
|
2634
|
-
}
|
|
2635
|
-
const containerHeight = containerRect.height;
|
|
2636
|
-
if (props.orientation === "vertical") {
|
|
2637
|
-
const tabTop = tabRect.top - containerRect.top;
|
|
2638
|
-
const tabHeight = tabRect.height;
|
|
2658
|
+
if (isDevToolsOpen()) {
|
|
2639
2659
|
return {
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
width: underlineThickness,
|
|
2645
|
-
// Use dynamic thickness
|
|
2646
|
-
left: actualPadding - underlineThickness / 2
|
|
2647
|
-
// Position at container left edge
|
|
2660
|
+
width: 100,
|
|
2661
|
+
left: 0,
|
|
2662
|
+
height: 3,
|
|
2663
|
+
top: 0
|
|
2648
2664
|
};
|
|
2649
|
-
}
|
|
2650
|
-
|
|
2651
|
-
const
|
|
2652
|
-
|
|
2665
|
+
}
|
|
2666
|
+
try {
|
|
2667
|
+
const tabRect = tabElement.getBoundingClientRect();
|
|
2668
|
+
const containerRect = containerElement.getBoundingClientRect();
|
|
2669
|
+
const computedStyle = getComputedStyle(containerElement);
|
|
2670
|
+
const underlineThickness = parseFloat(computedStyle.getPropertyValue("--underline-thickness") || "5");
|
|
2671
|
+
let actualPadding = 5;
|
|
2672
|
+
if (props.size === "sm") {
|
|
2673
|
+
actualPadding = 4;
|
|
2674
|
+
} else if (props.size === "lg") {
|
|
2675
|
+
actualPadding = 6;
|
|
2676
|
+
}
|
|
2677
|
+
const containerHeight = containerRect.height;
|
|
2678
|
+
if (props.orientation === "vertical") {
|
|
2679
|
+
const tabTop = tabRect.top - containerRect.top;
|
|
2680
|
+
const tabHeight = tabRect.height;
|
|
2653
2681
|
return {
|
|
2654
|
-
|
|
2655
|
-
//
|
|
2656
|
-
|
|
2682
|
+
height: tabHeight - actualPadding * 4,
|
|
2683
|
+
// More padding for shorter underline
|
|
2684
|
+
top: tabTop + actualPadding * 2,
|
|
2685
|
+
// Better centering with more offset
|
|
2686
|
+
width: underlineThickness,
|
|
2687
|
+
// Use dynamic thickness
|
|
2688
|
+
left: actualPadding - underlineThickness / 2
|
|
2689
|
+
// Position at container left edge
|
|
2690
|
+
};
|
|
2691
|
+
} else {
|
|
2692
|
+
const tabLeft = tabRect.left - containerRect.left;
|
|
2693
|
+
const tabWidth = tabRect.width;
|
|
2694
|
+
if (props.underlineWidth === "full") {
|
|
2695
|
+
return {
|
|
2696
|
+
width: tabWidth - 30,
|
|
2697
|
+
// Fixed 15px margin on each side for horizontal tabs
|
|
2698
|
+
left: tabLeft + 15,
|
|
2699
|
+
height: underlineThickness,
|
|
2700
|
+
top: containerHeight - actualPadding - underlineThickness / 2
|
|
2701
|
+
// Position near bottom of container
|
|
2702
|
+
};
|
|
2703
|
+
}
|
|
2704
|
+
let underlineWidth;
|
|
2705
|
+
if (props.underlineWidth.endsWith("%")) {
|
|
2706
|
+
const percentage = parseFloat(props.underlineWidth) / 100;
|
|
2707
|
+
underlineWidth = tabWidth * percentage;
|
|
2708
|
+
} else if (props.underlineWidth.endsWith("px")) {
|
|
2709
|
+
underlineWidth = parseFloat(props.underlineWidth);
|
|
2710
|
+
} else if (props.underlineWidth.endsWith("rem")) {
|
|
2711
|
+
const remValue = parseFloat(props.underlineWidth);
|
|
2712
|
+
const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
2713
|
+
underlineWidth = remValue * fontSize;
|
|
2714
|
+
} else {
|
|
2715
|
+
underlineWidth = parseFloat(props.underlineWidth) || tabWidth;
|
|
2716
|
+
}
|
|
2717
|
+
const offset = (tabWidth - underlineWidth) / 2;
|
|
2718
|
+
return {
|
|
2719
|
+
width: underlineWidth,
|
|
2720
|
+
left: tabLeft + offset,
|
|
2657
2721
|
height: underlineThickness,
|
|
2658
2722
|
top: containerHeight - actualPadding - underlineThickness / 2
|
|
2659
2723
|
// Position near bottom of container
|
|
2660
2724
|
};
|
|
2661
2725
|
}
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
const percentage = parseFloat(props.underlineWidth) / 100;
|
|
2665
|
-
underlineWidth = tabWidth * percentage;
|
|
2666
|
-
} else if (props.underlineWidth.endsWith("px")) {
|
|
2667
|
-
underlineWidth = parseFloat(props.underlineWidth);
|
|
2668
|
-
} else if (props.underlineWidth.endsWith("rem")) {
|
|
2669
|
-
const remValue = parseFloat(props.underlineWidth);
|
|
2670
|
-
const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
2671
|
-
underlineWidth = remValue * fontSize;
|
|
2672
|
-
} else {
|
|
2673
|
-
underlineWidth = parseFloat(props.underlineWidth) || tabWidth;
|
|
2674
|
-
}
|
|
2675
|
-
const offset = (tabWidth - underlineWidth) / 2;
|
|
2726
|
+
} catch (error) {
|
|
2727
|
+
console.warn("Tab dimension calculation failed, using fallback values:", error);
|
|
2676
2728
|
return {
|
|
2677
|
-
width:
|
|
2678
|
-
left:
|
|
2679
|
-
height:
|
|
2680
|
-
top:
|
|
2681
|
-
// Position near bottom of container
|
|
2729
|
+
width: 100,
|
|
2730
|
+
left: 0,
|
|
2731
|
+
height: 3,
|
|
2732
|
+
top: 0
|
|
2682
2733
|
};
|
|
2683
2734
|
}
|
|
2684
2735
|
};
|
|
2685
2736
|
const handleTabClick = async (value, index) => {
|
|
2686
2737
|
if (isAnimating) return;
|
|
2687
2738
|
emit("update:modelValue", value);
|
|
2739
|
+
if (isDevToolsOpen()) {
|
|
2740
|
+
currentTabIndex = index;
|
|
2741
|
+
return;
|
|
2742
|
+
}
|
|
2688
2743
|
await nextTick();
|
|
2689
2744
|
animateUnderlineStretch(index);
|
|
2690
2745
|
};
|
|
2691
2746
|
const animateUnderlineStretch = async (newIndex) => {
|
|
2747
|
+
if (isDevToolsOpen()) {
|
|
2748
|
+
currentTabIndex = newIndex;
|
|
2749
|
+
return;
|
|
2750
|
+
}
|
|
2692
2751
|
if (!tabButtons.value[newIndex] || newIndex === currentTabIndex) return;
|
|
2693
2752
|
isAnimating = true;
|
|
2694
2753
|
const newTab = tabButtons.value[newIndex];
|
|
2695
2754
|
const container = newTab.parentElement;
|
|
2696
2755
|
if (!container) return;
|
|
2697
2756
|
const newDimensions = calculateUnderlineDimensions(newTab, container);
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
newTabPos = newTabRect.top - containerRect.top;
|
|
2703
|
-
newTabSize = newTabRect.height;
|
|
2704
|
-
} else {
|
|
2705
|
-
newTabPos = newTabRect.left - containerRect.left;
|
|
2706
|
-
newTabSize = newTabRect.width;
|
|
2707
|
-
}
|
|
2708
|
-
if (currentTabIndex === -1) {
|
|
2757
|
+
try {
|
|
2758
|
+
const newTabRect = newTab.getBoundingClientRect();
|
|
2759
|
+
const containerRect = container.getBoundingClientRect();
|
|
2760
|
+
let newTabPos, newTabSize;
|
|
2709
2761
|
if (props.orientation === "vertical") {
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
top: `${newDimensions.top}px`,
|
|
2713
|
-
width: `${newDimensions.width}px`,
|
|
2714
|
-
left: `${newDimensions.left}px`,
|
|
2715
|
-
opacity: "1"
|
|
2716
|
-
};
|
|
2717
|
-
backgroundStyle.value = {
|
|
2718
|
-
height: `${newTabSize}px`,
|
|
2719
|
-
top: `${newTabPos}px`,
|
|
2720
|
-
width: `${newTabRect.width}px`,
|
|
2721
|
-
left: "0",
|
|
2722
|
-
opacity: "1"
|
|
2723
|
-
};
|
|
2762
|
+
newTabPos = newTabRect.top - containerRect.top;
|
|
2763
|
+
newTabSize = newTabRect.height;
|
|
2724
2764
|
} else {
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
left: `${newDimensions.left}px`,
|
|
2728
|
-
height: `${newDimensions.height}px`,
|
|
2729
|
-
top: `${newDimensions.top}px`,
|
|
2730
|
-
opacity: "1"
|
|
2731
|
-
};
|
|
2732
|
-
backgroundStyle.value = {
|
|
2733
|
-
width: `${newTabSize}px`,
|
|
2734
|
-
left: `${newTabPos}px`,
|
|
2735
|
-
height: "100%",
|
|
2736
|
-
top: "0",
|
|
2737
|
-
opacity: "1"
|
|
2738
|
-
};
|
|
2765
|
+
newTabPos = newTabRect.left - containerRect.left;
|
|
2766
|
+
newTabSize = newTabRect.width;
|
|
2739
2767
|
}
|
|
2740
|
-
currentTabIndex
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
}
|
|
2768
|
+
if (currentTabIndex === -1) {
|
|
2769
|
+
if (props.orientation === "vertical") {
|
|
2770
|
+
underlineStyle.value = {
|
|
2771
|
+
height: `${newDimensions.height}px`,
|
|
2772
|
+
top: `${newDimensions.top}px`,
|
|
2773
|
+
width: `${newDimensions.width}px`,
|
|
2774
|
+
left: `${newDimensions.left}px`,
|
|
2775
|
+
opacity: "1"
|
|
2776
|
+
};
|
|
2777
|
+
backgroundStyle.value = {
|
|
2778
|
+
height: `${newTabSize}px`,
|
|
2779
|
+
top: `${newTabPos}px`,
|
|
2780
|
+
width: `${newTabRect.width}px`,
|
|
2781
|
+
left: "0",
|
|
2782
|
+
opacity: "1"
|
|
2783
|
+
};
|
|
2784
|
+
} else {
|
|
2785
|
+
underlineStyle.value = {
|
|
2786
|
+
width: `${newDimensions.width}px`,
|
|
2787
|
+
left: `${newDimensions.left}px`,
|
|
2788
|
+
height: `${newDimensions.height}px`,
|
|
2789
|
+
top: `${newDimensions.top}px`,
|
|
2790
|
+
opacity: "1"
|
|
2791
|
+
};
|
|
2792
|
+
backgroundStyle.value = {
|
|
2793
|
+
width: `${newTabSize}px`,
|
|
2794
|
+
left: `${newTabPos}px`,
|
|
2795
|
+
height: "100%",
|
|
2796
|
+
top: "0",
|
|
2797
|
+
opacity: "1"
|
|
2798
|
+
};
|
|
2799
|
+
}
|
|
2800
|
+
currentTabIndex = newIndex;
|
|
2801
|
+
isAnimating = false;
|
|
2802
|
+
return;
|
|
2772
2803
|
}
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
if (props.orientation === "vertical") {
|
|
2804
|
+
const currentTab = tabButtons.value[currentTabIndex];
|
|
2805
|
+
calculateUnderlineDimensions(currentTab, container);
|
|
2806
|
+
currentTab.getBoundingClientRect();
|
|
2807
|
+
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2808
|
+
if (prefersReducedMotion) {
|
|
2779
2809
|
underlineStyle.value = {
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
width: `${newDimensions.width || 7}px`,
|
|
2783
|
-
left: `${newDimensions.left}px`,
|
|
2784
|
-
opacity: "1"
|
|
2785
|
-
};
|
|
2786
|
-
backgroundStyle.value = {
|
|
2787
|
-
height: `${newTabSize}px`,
|
|
2788
|
-
top: `${newTabPos}px`,
|
|
2789
|
-
width: "100%",
|
|
2790
|
-
left: "0",
|
|
2791
|
-
opacity: "1"
|
|
2792
|
-
};
|
|
2793
|
-
} else {
|
|
2794
|
-
underlineStyle.value = {
|
|
2795
|
-
width: `${newDimensions.width}px`,
|
|
2796
|
-
left: `${newDimensions.left}px`,
|
|
2810
|
+
width: `${newDimensions.width || 0}px`,
|
|
2811
|
+
left: `${newDimensions.left || 0}px`,
|
|
2797
2812
|
height: `${newDimensions.height || 7}px`,
|
|
2798
2813
|
top: `${newDimensions.top}px`,
|
|
2799
2814
|
opacity: "1"
|
|
2800
2815
|
};
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2816
|
+
if (props.orientation === "vertical") {
|
|
2817
|
+
backgroundStyle.value = {
|
|
2818
|
+
height: `${newTabSize}px`,
|
|
2819
|
+
top: `${newTabPos}px`,
|
|
2820
|
+
width: "100%",
|
|
2821
|
+
left: "0",
|
|
2822
|
+
opacity: "1"
|
|
2823
|
+
};
|
|
2824
|
+
} else {
|
|
2825
|
+
backgroundStyle.value = {
|
|
2826
|
+
width: `${newTabSize}px`,
|
|
2827
|
+
left: `${newTabPos}px`,
|
|
2828
|
+
height: "100%",
|
|
2829
|
+
top: "0",
|
|
2830
|
+
opacity: "1"
|
|
2831
|
+
};
|
|
2832
|
+
}
|
|
2833
|
+
currentTabIndex = newIndex;
|
|
2811
2834
|
isAnimating = false;
|
|
2812
|
-
|
|
2813
|
-
|
|
2835
|
+
return;
|
|
2836
|
+
}
|
|
2837
|
+
requestAnimationFrame(() => {
|
|
2838
|
+
if (props.orientation === "vertical") {
|
|
2839
|
+
underlineStyle.value = {
|
|
2840
|
+
height: `${newDimensions.height}px`,
|
|
2841
|
+
top: `${newDimensions.top}px`,
|
|
2842
|
+
width: `${newDimensions.width || 7}px`,
|
|
2843
|
+
left: `${newDimensions.left}px`,
|
|
2844
|
+
opacity: "1"
|
|
2845
|
+
};
|
|
2846
|
+
backgroundStyle.value = {
|
|
2847
|
+
height: `${newTabSize}px`,
|
|
2848
|
+
top: `${newTabPos}px`,
|
|
2849
|
+
width: "100%",
|
|
2850
|
+
left: "0",
|
|
2851
|
+
opacity: "1"
|
|
2852
|
+
};
|
|
2853
|
+
} else {
|
|
2854
|
+
underlineStyle.value = {
|
|
2855
|
+
width: `${newDimensions.width}px`,
|
|
2856
|
+
left: `${newDimensions.left}px`,
|
|
2857
|
+
height: `${newDimensions.height || 7}px`,
|
|
2858
|
+
top: `${newDimensions.top}px`,
|
|
2859
|
+
opacity: "1"
|
|
2860
|
+
};
|
|
2861
|
+
backgroundStyle.value = {
|
|
2862
|
+
width: `${newTabSize}px`,
|
|
2863
|
+
left: `${newTabPos}px`,
|
|
2864
|
+
height: "100%",
|
|
2865
|
+
top: "0",
|
|
2866
|
+
opacity: "1"
|
|
2867
|
+
};
|
|
2868
|
+
}
|
|
2869
|
+
currentTabIndex = newIndex;
|
|
2870
|
+
setTimeout(() => {
|
|
2871
|
+
isAnimating = false;
|
|
2872
|
+
}, 200);
|
|
2873
|
+
});
|
|
2874
|
+
} catch (error) {
|
|
2875
|
+
console.warn("Tab animation calculation failed:", error);
|
|
2876
|
+
isAnimating = false;
|
|
2877
|
+
}
|
|
2814
2878
|
};
|
|
2815
2879
|
let resizeTimeout = null;
|
|
2816
2880
|
const handleResize = () => {
|
|
@@ -2876,6 +2940,10 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
2876
2940
|
};
|
|
2877
2941
|
onMounted(async () => {
|
|
2878
2942
|
await nextTick();
|
|
2943
|
+
if (isDevToolsOpen()) {
|
|
2944
|
+
enableTransitions.value = true;
|
|
2945
|
+
return;
|
|
2946
|
+
}
|
|
2879
2947
|
const activeIndex = props.tabs.findIndex((tab) => tab.value === props.modelValue);
|
|
2880
2948
|
if (activeIndex !== -1) {
|
|
2881
2949
|
animateUnderlineStretch(activeIndex);
|
|
@@ -2895,6 +2963,9 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
2895
2963
|
const { modelValue } = toRefs(props);
|
|
2896
2964
|
watch(modelValue, async () => {
|
|
2897
2965
|
await nextTick();
|
|
2966
|
+
if (isDevToolsOpen()) {
|
|
2967
|
+
return;
|
|
2968
|
+
}
|
|
2898
2969
|
const activeIndex = props.tabs.findIndex((tab) => tab.value === props.modelValue);
|
|
2899
2970
|
if (activeIndex !== -1) {
|
|
2900
2971
|
animateUnderlineStretch(activeIndex);
|
|
@@ -2971,7 +3042,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
2971
3042
|
};
|
|
2972
3043
|
}
|
|
2973
3044
|
});
|
|
2974
|
-
const StrandsUiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-
|
|
3045
|
+
const StrandsUiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-8e8f1aec"]]);
|
|
2975
3046
|
const _hoisted_1$I = {
|
|
2976
3047
|
key: 0,
|
|
2977
3048
|
class: "ui-divider-text"
|