@strands.gg/accui 2.9.6 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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$G = {
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$G, toDisplayString(_ctx.loadingMessage), 1)) : createCommentVNode("", true)
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$F = {
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$A = ["d"];
96
- const _hoisted_6$u = { class: "alert-text-container" };
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$F, [
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$A)
149
+ }, null, 8, _hoisted_5$B)
150
150
  ]))
151
151
  ]),
152
- createElementVNode("div", _hoisted_6$u, [
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$E = ["stroke-width"];
200
- const _hoisted_5$z = ["stroke-width"];
201
- const _hoisted_6$t = ["width", "height"];
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$E),
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$z)
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$t))
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$D = {
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$D, [
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 = { class: "ui-card-content" };
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,30 @@ 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", {}, void 0, true)
840
+ _ctx.$slots["header"] || _ctx.title || _ctx.subtitle ? (openBlock(), createElementBlock("div", _hoisted_1$O, [
841
+ renderSlot(_ctx.$slots, "header", {}, () => [
842
+ _ctx.title || _ctx.$slots["title"] || _ctx.subtitle || _ctx.$slots["subtitle"] ? (openBlock(), createElementBlock("div", _hoisted_2$I, [
843
+ _ctx.title || _ctx.$slots["title"] ? renderSlot(_ctx.$slots, "title", { key: 0 }, () => [
844
+ _ctx.title ? (openBlock(), createElementBlock("h2", _hoisted_3$F, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
845
+ ], true) : createCommentVNode("", true),
846
+ _ctx.subtitle || _ctx.$slots["subtitle"] ? renderSlot(_ctx.$slots, "subtitle", { key: 1 }, () => [
847
+ _ctx.subtitle ? (openBlock(), createElementBlock("p", _hoisted_4$D, toDisplayString(_ctx.subtitle), 1)) : createCommentVNode("", true)
848
+ ], true) : createCommentVNode("", true)
849
+ ])) : createCommentVNode("", true),
850
+ renderSlot(_ctx.$slots, "actions", {}, void 0, true)
851
+ ], true)
828
852
  ])) : createCommentVNode("", true),
829
- createElementVNode("div", _hoisted_2$I, [
853
+ createElementVNode("div", _hoisted_5$z, [
830
854
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
831
855
  ]),
832
- _ctx.$slots["footer"] ? (openBlock(), createElementBlock("div", _hoisted_3$F, [
856
+ _ctx.$slots["footer"] ? (openBlock(), createElementBlock("div", _hoisted_6$t, [
833
857
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
834
858
  ])) : createCommentVNode("", true)
835
859
  ], 2);
836
860
  };
837
861
  }
838
862
  });
839
- const StrandsUiCard = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-261f3012"]]);
863
+ const StrandsUiCard = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-cc3144c9"]]);
840
864
  /**
841
865
  * @license lucide-vue-next v0.542.0 - ISC
842
866
  *
@@ -1922,6 +1946,15 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1922
1946
  const dropdownRef = ref();
1923
1947
  const searchInputRef = ref();
1924
1948
  const dropdownId = computed(() => `dropdown-${props.inputId || Math.random().toString(36).substr(2, 9)}`);
1949
+ const teleportTarget = computed(() => {
1950
+ if (selectTriggerRef.value) {
1951
+ const modalContainer = selectTriggerRef.value.closest('[role="dialog"][aria-modal="true"]');
1952
+ if (modalContainer) {
1953
+ return modalContainer;
1954
+ }
1955
+ }
1956
+ return "body";
1957
+ });
1925
1958
  const dropdownState = ref({
1926
1959
  isOpen: false,
1927
1960
  searchQuery: "",
@@ -2220,7 +2253,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2220
2253
  renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
2221
2254
  ])) : createCommentVNode("", true)
2222
2255
  ], 2),
2223
- (openBlock(), createBlock(Teleport, { to: "body" }, [
2256
+ (openBlock(), createBlock(Teleport, { to: teleportTarget.value }, [
2224
2257
  dropdownState.value.isOpen ? (openBlock(), createElementBlock("div", {
2225
2258
  key: 0,
2226
2259
  ref_key: "dropdownRef",
@@ -2280,12 +2313,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2280
2313
  }), 128))
2281
2314
  ], 4)
2282
2315
  ], 46, _hoisted_7$q)) : createCommentVNode("", true)
2283
- ]))
2316
+ ], 8, ["to"]))
2284
2317
  ], 64);
2285
2318
  };
2286
2319
  }
2287
2320
  });
2288
- const UiInputSelect = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-8fc867ab"]]);
2321
+ const UiInputSelect = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-8591f0ad"]]);
2289
2322
  const _hoisted_1$K = { class: "input-leading-icon" };
2290
2323
  const _hoisted_2$E = ["src"];
2291
2324
  const _hoisted_3$B = ["id", "accept", "multiple", "disabled", "required"];
@@ -2587,6 +2620,13 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2587
2620
  },
2588
2621
  emits: ["update:modelValue"],
2589
2622
  setup(__props, { emit: __emit }) {
2623
+ const isDevToolsOpen = () => {
2624
+ try {
2625
+ return window.outerHeight - window.innerHeight > 160 || window.outerWidth - window.innerWidth > 160;
2626
+ } catch {
2627
+ return false;
2628
+ }
2629
+ };
2590
2630
  const props = __props;
2591
2631
  const emit = __emit;
2592
2632
  const slots = useSlots();
@@ -2613,195 +2653,226 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2613
2653
  let currentTabIndex = -1;
2614
2654
  let isAnimating = false;
2615
2655
  const calculateUnderlineDimensions = (tabElement, containerElement) => {
2616
- const tabRect = tabElement.getBoundingClientRect();
2617
- const containerRect = containerElement.getBoundingClientRect();
2618
- const computedStyle = getComputedStyle(containerElement);
2619
- const underlineThickness = parseFloat(computedStyle.getPropertyValue("--underline-thickness") || "5");
2620
- let actualPadding = 5;
2621
- if (props.size === "sm") {
2622
- actualPadding = 4;
2623
- } else if (props.size === "lg") {
2624
- actualPadding = 6;
2625
- }
2626
- const containerHeight = containerRect.height;
2627
- if (props.orientation === "vertical") {
2628
- const tabTop = tabRect.top - containerRect.top;
2629
- const tabHeight = tabRect.height;
2656
+ if (isDevToolsOpen()) {
2630
2657
  return {
2631
- height: tabHeight - actualPadding * 4,
2632
- // More padding for shorter underline
2633
- top: tabTop + actualPadding * 2,
2634
- // Better centering with more offset
2635
- width: underlineThickness,
2636
- // Use dynamic thickness
2637
- left: actualPadding - underlineThickness / 2
2638
- // Position at container left edge
2658
+ width: 100,
2659
+ left: 0,
2660
+ height: 3,
2661
+ top: 0
2639
2662
  };
2640
- } else {
2641
- const tabLeft = tabRect.left - containerRect.left;
2642
- const tabWidth = tabRect.width;
2643
- if (props.underlineWidth === "full") {
2663
+ }
2664
+ try {
2665
+ const tabRect = tabElement.getBoundingClientRect();
2666
+ const containerRect = containerElement.getBoundingClientRect();
2667
+ const computedStyle = getComputedStyle(containerElement);
2668
+ const underlineThickness = parseFloat(computedStyle.getPropertyValue("--underline-thickness") || "5");
2669
+ let actualPadding = 5;
2670
+ if (props.size === "sm") {
2671
+ actualPadding = 4;
2672
+ } else if (props.size === "lg") {
2673
+ actualPadding = 6;
2674
+ }
2675
+ const containerHeight = containerRect.height;
2676
+ if (props.orientation === "vertical") {
2677
+ const tabTop = tabRect.top - containerRect.top;
2678
+ const tabHeight = tabRect.height;
2679
+ return {
2680
+ height: tabHeight - actualPadding * 4,
2681
+ // More padding for shorter underline
2682
+ top: tabTop + actualPadding * 2,
2683
+ // Better centering with more offset
2684
+ width: underlineThickness,
2685
+ // Use dynamic thickness
2686
+ left: actualPadding - underlineThickness / 2
2687
+ // Position at container left edge
2688
+ };
2689
+ } else {
2690
+ const tabLeft = tabRect.left - containerRect.left;
2691
+ const tabWidth = tabRect.width;
2692
+ if (props.underlineWidth === "full") {
2693
+ return {
2694
+ width: tabWidth - 30,
2695
+ // Fixed 15px margin on each side for horizontal tabs
2696
+ left: tabLeft + 15,
2697
+ height: underlineThickness,
2698
+ top: containerHeight - actualPadding - underlineThickness / 2
2699
+ // Position near bottom of container
2700
+ };
2701
+ }
2702
+ let underlineWidth;
2703
+ if (props.underlineWidth.endsWith("%")) {
2704
+ const percentage = parseFloat(props.underlineWidth) / 100;
2705
+ underlineWidth = tabWidth * percentage;
2706
+ } else if (props.underlineWidth.endsWith("px")) {
2707
+ underlineWidth = parseFloat(props.underlineWidth);
2708
+ } else if (props.underlineWidth.endsWith("rem")) {
2709
+ const remValue = parseFloat(props.underlineWidth);
2710
+ const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
2711
+ underlineWidth = remValue * fontSize;
2712
+ } else {
2713
+ underlineWidth = parseFloat(props.underlineWidth) || tabWidth;
2714
+ }
2715
+ const offset = (tabWidth - underlineWidth) / 2;
2644
2716
  return {
2645
- width: tabWidth - 30,
2646
- // Fixed 15px margin on each side for horizontal tabs
2647
- left: tabLeft + 15,
2717
+ width: underlineWidth,
2718
+ left: tabLeft + offset,
2648
2719
  height: underlineThickness,
2649
2720
  top: containerHeight - actualPadding - underlineThickness / 2
2650
2721
  // Position near bottom of container
2651
2722
  };
2652
2723
  }
2653
- let underlineWidth;
2654
- if (props.underlineWidth.endsWith("%")) {
2655
- const percentage = parseFloat(props.underlineWidth) / 100;
2656
- underlineWidth = tabWidth * percentage;
2657
- } else if (props.underlineWidth.endsWith("px")) {
2658
- underlineWidth = parseFloat(props.underlineWidth);
2659
- } else if (props.underlineWidth.endsWith("rem")) {
2660
- const remValue = parseFloat(props.underlineWidth);
2661
- const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
2662
- underlineWidth = remValue * fontSize;
2663
- } else {
2664
- underlineWidth = parseFloat(props.underlineWidth) || tabWidth;
2665
- }
2666
- const offset = (tabWidth - underlineWidth) / 2;
2724
+ } catch (error) {
2725
+ console.warn("Tab dimension calculation failed, using fallback values:", error);
2667
2726
  return {
2668
- width: underlineWidth,
2669
- left: tabLeft + offset,
2670
- height: underlineThickness,
2671
- top: containerHeight - actualPadding - underlineThickness / 2
2672
- // Position near bottom of container
2727
+ width: 100,
2728
+ left: 0,
2729
+ height: 3,
2730
+ top: 0
2673
2731
  };
2674
2732
  }
2675
2733
  };
2676
2734
  const handleTabClick = async (value, index) => {
2677
2735
  if (isAnimating) return;
2678
2736
  emit("update:modelValue", value);
2737
+ if (isDevToolsOpen()) {
2738
+ currentTabIndex = index;
2739
+ return;
2740
+ }
2679
2741
  await nextTick();
2680
2742
  animateUnderlineStretch(index);
2681
2743
  };
2682
2744
  const animateUnderlineStretch = async (newIndex) => {
2745
+ if (isDevToolsOpen()) {
2746
+ currentTabIndex = newIndex;
2747
+ return;
2748
+ }
2683
2749
  if (!tabButtons.value[newIndex] || newIndex === currentTabIndex) return;
2684
2750
  isAnimating = true;
2685
2751
  const newTab = tabButtons.value[newIndex];
2686
2752
  const container = newTab.parentElement;
2687
2753
  if (!container) return;
2688
2754
  const newDimensions = calculateUnderlineDimensions(newTab, container);
2689
- const newTabRect = newTab.getBoundingClientRect();
2690
- const containerRect = container.getBoundingClientRect();
2691
- let newTabPos, newTabSize;
2692
- if (props.orientation === "vertical") {
2693
- newTabPos = newTabRect.top - containerRect.top;
2694
- newTabSize = newTabRect.height;
2695
- } else {
2696
- newTabPos = newTabRect.left - containerRect.left;
2697
- newTabSize = newTabRect.width;
2698
- }
2699
- if (currentTabIndex === -1) {
2755
+ try {
2756
+ const newTabRect = newTab.getBoundingClientRect();
2757
+ const containerRect = container.getBoundingClientRect();
2758
+ let newTabPos, newTabSize;
2700
2759
  if (props.orientation === "vertical") {
2701
- underlineStyle.value = {
2702
- height: `${newDimensions.height}px`,
2703
- top: `${newDimensions.top}px`,
2704
- width: `${newDimensions.width}px`,
2705
- left: `${newDimensions.left}px`,
2706
- opacity: "1"
2707
- };
2708
- backgroundStyle.value = {
2709
- height: `${newTabSize}px`,
2710
- top: `${newTabPos}px`,
2711
- width: `${newTabRect.width}px`,
2712
- left: "0",
2713
- opacity: "1"
2714
- };
2760
+ newTabPos = newTabRect.top - containerRect.top;
2761
+ newTabSize = newTabRect.height;
2715
2762
  } else {
2716
- underlineStyle.value = {
2717
- width: `${newDimensions.width}px`,
2718
- left: `${newDimensions.left}px`,
2719
- height: `${newDimensions.height}px`,
2720
- top: `${newDimensions.top}px`,
2721
- opacity: "1"
2722
- };
2723
- backgroundStyle.value = {
2724
- width: `${newTabSize}px`,
2725
- left: `${newTabPos}px`,
2726
- height: "100%",
2727
- top: "0",
2728
- opacity: "1"
2729
- };
2763
+ newTabPos = newTabRect.left - containerRect.left;
2764
+ newTabSize = newTabRect.width;
2730
2765
  }
2731
- currentTabIndex = newIndex;
2732
- isAnimating = false;
2733
- return;
2734
- }
2735
- const currentTab = tabButtons.value[currentTabIndex];
2736
- calculateUnderlineDimensions(currentTab, container);
2737
- currentTab.getBoundingClientRect();
2738
- const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2739
- if (prefersReducedMotion) {
2740
- underlineStyle.value = {
2741
- width: `${newDimensions.width || 0}px`,
2742
- left: `${newDimensions.left || 0}px`,
2743
- height: `${newDimensions.height || 7}px`,
2744
- top: `${newDimensions.top}px`,
2745
- opacity: "1"
2746
- };
2747
- if (props.orientation === "vertical") {
2748
- backgroundStyle.value = {
2749
- height: `${newTabSize}px`,
2750
- top: `${newTabPos}px`,
2751
- width: "100%",
2752
- left: "0",
2753
- opacity: "1"
2754
- };
2755
- } else {
2756
- backgroundStyle.value = {
2757
- width: `${newTabSize}px`,
2758
- left: `${newTabPos}px`,
2759
- height: "100%",
2760
- top: "0",
2761
- opacity: "1"
2762
- };
2766
+ if (currentTabIndex === -1) {
2767
+ if (props.orientation === "vertical") {
2768
+ underlineStyle.value = {
2769
+ height: `${newDimensions.height}px`,
2770
+ top: `${newDimensions.top}px`,
2771
+ width: `${newDimensions.width}px`,
2772
+ left: `${newDimensions.left}px`,
2773
+ opacity: "1"
2774
+ };
2775
+ backgroundStyle.value = {
2776
+ height: `${newTabSize}px`,
2777
+ top: `${newTabPos}px`,
2778
+ width: `${newTabRect.width}px`,
2779
+ left: "0",
2780
+ opacity: "1"
2781
+ };
2782
+ } else {
2783
+ underlineStyle.value = {
2784
+ width: `${newDimensions.width}px`,
2785
+ left: `${newDimensions.left}px`,
2786
+ height: `${newDimensions.height}px`,
2787
+ top: `${newDimensions.top}px`,
2788
+ opacity: "1"
2789
+ };
2790
+ backgroundStyle.value = {
2791
+ width: `${newTabSize}px`,
2792
+ left: `${newTabPos}px`,
2793
+ height: "100%",
2794
+ top: "0",
2795
+ opacity: "1"
2796
+ };
2797
+ }
2798
+ currentTabIndex = newIndex;
2799
+ isAnimating = false;
2800
+ return;
2763
2801
  }
2764
- currentTabIndex = newIndex;
2765
- isAnimating = false;
2766
- return;
2767
- }
2768
- requestAnimationFrame(() => {
2769
- if (props.orientation === "vertical") {
2770
- underlineStyle.value = {
2771
- height: `${newDimensions.height}px`,
2772
- top: `${newDimensions.top}px`,
2773
- width: `${newDimensions.width || 7}px`,
2774
- left: `${newDimensions.left}px`,
2775
- opacity: "1"
2776
- };
2777
- backgroundStyle.value = {
2778
- height: `${newTabSize}px`,
2779
- top: `${newTabPos}px`,
2780
- width: "100%",
2781
- left: "0",
2782
- opacity: "1"
2783
- };
2784
- } else {
2802
+ const currentTab = tabButtons.value[currentTabIndex];
2803
+ calculateUnderlineDimensions(currentTab, container);
2804
+ currentTab.getBoundingClientRect();
2805
+ const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2806
+ if (prefersReducedMotion) {
2785
2807
  underlineStyle.value = {
2786
- width: `${newDimensions.width}px`,
2787
- left: `${newDimensions.left}px`,
2808
+ width: `${newDimensions.width || 0}px`,
2809
+ left: `${newDimensions.left || 0}px`,
2788
2810
  height: `${newDimensions.height || 7}px`,
2789
2811
  top: `${newDimensions.top}px`,
2790
2812
  opacity: "1"
2791
2813
  };
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
- setTimeout(() => {
2814
+ if (props.orientation === "vertical") {
2815
+ backgroundStyle.value = {
2816
+ height: `${newTabSize}px`,
2817
+ top: `${newTabPos}px`,
2818
+ width: "100%",
2819
+ left: "0",
2820
+ opacity: "1"
2821
+ };
2822
+ } else {
2823
+ backgroundStyle.value = {
2824
+ width: `${newTabSize}px`,
2825
+ left: `${newTabPos}px`,
2826
+ height: "100%",
2827
+ top: "0",
2828
+ opacity: "1"
2829
+ };
2830
+ }
2831
+ currentTabIndex = newIndex;
2802
2832
  isAnimating = false;
2803
- }, 200);
2804
- });
2833
+ return;
2834
+ }
2835
+ requestAnimationFrame(() => {
2836
+ if (props.orientation === "vertical") {
2837
+ underlineStyle.value = {
2838
+ height: `${newDimensions.height}px`,
2839
+ top: `${newDimensions.top}px`,
2840
+ width: `${newDimensions.width || 7}px`,
2841
+ left: `${newDimensions.left}px`,
2842
+ opacity: "1"
2843
+ };
2844
+ backgroundStyle.value = {
2845
+ height: `${newTabSize}px`,
2846
+ top: `${newTabPos}px`,
2847
+ width: "100%",
2848
+ left: "0",
2849
+ opacity: "1"
2850
+ };
2851
+ } else {
2852
+ underlineStyle.value = {
2853
+ width: `${newDimensions.width}px`,
2854
+ left: `${newDimensions.left}px`,
2855
+ height: `${newDimensions.height || 7}px`,
2856
+ top: `${newDimensions.top}px`,
2857
+ opacity: "1"
2858
+ };
2859
+ backgroundStyle.value = {
2860
+ width: `${newTabSize}px`,
2861
+ left: `${newTabPos}px`,
2862
+ height: "100%",
2863
+ top: "0",
2864
+ opacity: "1"
2865
+ };
2866
+ }
2867
+ currentTabIndex = newIndex;
2868
+ setTimeout(() => {
2869
+ isAnimating = false;
2870
+ }, 200);
2871
+ });
2872
+ } catch (error) {
2873
+ console.warn("Tab animation calculation failed:", error);
2874
+ isAnimating = false;
2875
+ }
2805
2876
  };
2806
2877
  let resizeTimeout = null;
2807
2878
  const handleResize = () => {
@@ -2867,6 +2938,10 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2867
2938
  };
2868
2939
  onMounted(async () => {
2869
2940
  await nextTick();
2941
+ if (isDevToolsOpen()) {
2942
+ enableTransitions.value = true;
2943
+ return;
2944
+ }
2870
2945
  const activeIndex = props.tabs.findIndex((tab) => tab.value === props.modelValue);
2871
2946
  if (activeIndex !== -1) {
2872
2947
  animateUnderlineStretch(activeIndex);
@@ -2886,6 +2961,9 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2886
2961
  const { modelValue } = toRefs(props);
2887
2962
  watch(modelValue, async () => {
2888
2963
  await nextTick();
2964
+ if (isDevToolsOpen()) {
2965
+ return;
2966
+ }
2889
2967
  const activeIndex = props.tabs.findIndex((tab) => tab.value === props.modelValue);
2890
2968
  if (activeIndex !== -1) {
2891
2969
  animateUnderlineStretch(activeIndex);
@@ -2962,7 +3040,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2962
3040
  };
2963
3041
  }
2964
3042
  });
2965
- const StrandsUiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-edff91a5"]]);
3043
+ const StrandsUiTabs = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-8e8f1aec"]]);
2966
3044
  const _hoisted_1$I = {
2967
3045
  key: 0,
2968
3046
  class: "ui-divider-text"
@@ -27393,7 +27471,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
27393
27471
  };
27394
27472
  }
27395
27473
  });
27396
- const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-afd09625"]]);
27474
+ const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-ba1f9d90"]]);
27397
27475
  const tailwindColors = {
27398
27476
  "#000000": {
27399
27477
  label: "Black"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strands.gg/accui",
3
- "version": "2.9.6",
3
+ "version": "2.10.1",
4
4
  "description": "Strands Authentication UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",