@vonage/vivid 4.14.0 → 4.14.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.
Files changed (218) hide show
  1. package/custom-elements.json +152 -197
  2. package/lib/divider/divider.d.ts +1 -1
  3. package/lib/divider/divider.template.d.ts +1 -1
  4. package/lib/elevation/elevation.d.ts +1 -0
  5. package/lib/radio/radio.form-associated.d.ts +2 -0
  6. package/lib/tabs/tabs.d.ts +0 -5
  7. package/lib/text-anchor/text-anchor.d.ts +2 -2
  8. package/lib/tree-item/tree-item.d.ts +2 -2
  9. package/lib/tree-view/tree-view.d.ts +2 -2
  10. package/package.json +1 -1
  11. package/shared/affix.cjs +8 -8
  12. package/shared/affix.js +2 -2
  13. package/shared/anchor.cjs +10 -10
  14. package/shared/anchor.js +1 -1
  15. package/shared/anchored.cjs +6 -6
  16. package/shared/anchored.js +1 -1
  17. package/shared/apply-mixins.cjs +3 -3
  18. package/shared/apply-mixins.js +1 -1
  19. package/shared/apply-mixins2.cjs +3 -3
  20. package/shared/apply-mixins2.js +1 -1
  21. package/shared/applyMixinsWithObservables.cjs +3 -3
  22. package/shared/applyMixinsWithObservables.js +1 -1
  23. package/shared/aria-global.cjs +20 -20
  24. package/shared/aria-global.js +1 -1
  25. package/shared/base-progress.cjs +7 -8
  26. package/shared/base-progress.js +2 -3
  27. package/shared/breadcrumb-item.cjs +2 -3
  28. package/shared/breadcrumb-item.js +1 -2
  29. package/shared/button.cjs +10 -11
  30. package/shared/button.js +1 -2
  31. package/shared/calendar-event.cjs +7 -8
  32. package/shared/calendar-event.js +1 -2
  33. package/shared/children.cjs +2 -2
  34. package/shared/children.js +1 -1
  35. package/shared/definition.cjs +14 -15
  36. package/shared/definition.js +2 -3
  37. package/shared/definition10.cjs +5 -6
  38. package/shared/definition10.js +1 -2
  39. package/shared/definition11.cjs +29 -29
  40. package/shared/definition11.js +2 -2
  41. package/shared/definition12.cjs +6 -6
  42. package/shared/definition12.js +1 -1
  43. package/shared/definition13.cjs +13 -14
  44. package/shared/definition13.js +1 -2
  45. package/shared/definition14.cjs +23 -24
  46. package/shared/definition14.js +1 -2
  47. package/shared/definition15.cjs +15 -16
  48. package/shared/definition15.js +1 -2
  49. package/shared/definition16.cjs +21 -21
  50. package/shared/definition16.js +5 -5
  51. package/shared/definition17.cjs +62 -61
  52. package/shared/definition17.js +10 -9
  53. package/shared/definition18.cjs +4 -4
  54. package/shared/definition18.js +1 -1
  55. package/shared/definition19.cjs +12 -12
  56. package/shared/definition19.js +1 -1
  57. package/shared/definition2.cjs +6 -7
  58. package/shared/definition2.js +1 -2
  59. package/shared/definition20.cjs +20 -21
  60. package/shared/definition20.js +1 -2
  61. package/shared/definition21.cjs +27 -28
  62. package/shared/definition21.js +3 -4
  63. package/shared/definition22.cjs +7 -7
  64. package/shared/definition22.js +3 -3
  65. package/shared/definition23.cjs +10 -11
  66. package/shared/definition23.js +1 -2
  67. package/shared/definition24.cjs +8 -8
  68. package/shared/definition24.js +3 -3
  69. package/shared/definition25.cjs +13 -14
  70. package/shared/definition25.js +1 -2
  71. package/shared/definition26.cjs +5 -6
  72. package/shared/definition26.js +1 -2
  73. package/shared/definition27.cjs +12 -13
  74. package/shared/definition27.js +2 -3
  75. package/shared/definition28.cjs +9 -10
  76. package/shared/definition28.js +2 -3
  77. package/shared/definition29.cjs +44 -45
  78. package/shared/definition29.js +3 -4
  79. package/shared/definition3.cjs +8 -9
  80. package/shared/definition3.js +1 -2
  81. package/shared/definition30.cjs +9 -10
  82. package/shared/definition30.js +2 -3
  83. package/shared/definition31.cjs +5 -5
  84. package/shared/definition31.js +2 -2
  85. package/shared/definition32.cjs +3 -4
  86. package/shared/definition32.js +1 -2
  87. package/shared/definition33.cjs +6 -7
  88. package/shared/definition33.js +2 -3
  89. package/shared/definition34.cjs +112 -45
  90. package/shared/definition34.js +73 -6
  91. package/shared/definition35.cjs +9 -209
  92. package/shared/definition35.js +4 -202
  93. package/shared/definition36.cjs +15 -16
  94. package/shared/definition36.js +1 -2
  95. package/shared/definition37.cjs +9 -9
  96. package/shared/definition37.js +1 -1
  97. package/shared/definition38.cjs +10 -10
  98. package/shared/definition38.js +1 -1
  99. package/shared/definition39.cjs +12 -13
  100. package/shared/definition39.js +1 -2
  101. package/shared/definition4.cjs +19 -20
  102. package/shared/definition4.js +2 -3
  103. package/shared/definition40.cjs +61 -13
  104. package/shared/definition40.js +52 -4
  105. package/shared/definition41.cjs +29 -30
  106. package/shared/definition41.js +1 -2
  107. package/shared/definition42.cjs +52 -53
  108. package/shared/definition42.js +3 -4
  109. package/shared/definition43.cjs +40 -40
  110. package/shared/definition43.js +6 -6
  111. package/shared/definition44.cjs +14 -15
  112. package/shared/definition44.js +1 -2
  113. package/shared/definition45.cjs +9 -10
  114. package/shared/definition45.js +1 -2
  115. package/shared/definition46.cjs +26 -27
  116. package/shared/definition46.js +1 -2
  117. package/shared/definition47.cjs +17 -18
  118. package/shared/definition47.js +2 -3
  119. package/shared/definition48.cjs +9 -10
  120. package/shared/definition48.js +1 -2
  121. package/shared/definition49.cjs +3 -4
  122. package/shared/definition49.js +1 -2
  123. package/shared/definition5.cjs +30 -31
  124. package/shared/definition5.js +1 -2
  125. package/shared/definition50.cjs +12 -13
  126. package/shared/definition50.js +2 -3
  127. package/shared/definition51.cjs +109 -72
  128. package/shared/definition51.js +78 -41
  129. package/shared/definition52.cjs +4 -5
  130. package/shared/definition52.js +1 -2
  131. package/shared/definition53.cjs +15 -16
  132. package/shared/definition53.js +2 -3
  133. package/shared/definition54.cjs +20 -21
  134. package/shared/definition54.js +1 -2
  135. package/shared/definition55.cjs +5 -5
  136. package/shared/definition55.js +1 -1
  137. package/shared/definition56.cjs +18 -19
  138. package/shared/definition56.js +1 -2
  139. package/shared/definition57.cjs +10 -11
  140. package/shared/definition57.js +1 -2
  141. package/shared/definition58.cjs +7 -8
  142. package/shared/definition58.js +1 -2
  143. package/shared/definition59.cjs +16 -17
  144. package/shared/definition59.js +3 -4
  145. package/shared/definition6.cjs +11 -12
  146. package/shared/definition6.js +1 -2
  147. package/shared/definition60.cjs +9 -10
  148. package/shared/definition60.js +2 -3
  149. package/shared/definition61.cjs +27 -30
  150. package/shared/definition61.js +17 -20
  151. package/shared/definition62.cjs +12 -9
  152. package/shared/definition62.js +8 -5
  153. package/shared/definition63.cjs +13 -14
  154. package/shared/definition63.js +1 -2
  155. package/shared/definition7.cjs +9 -10
  156. package/shared/definition7.js +2 -3
  157. package/shared/definition8.cjs +14 -15
  158. package/shared/definition8.js +2 -3
  159. package/shared/definition9.cjs +7 -7
  160. package/shared/definition9.js +1 -1
  161. package/shared/form-associated.cjs +14 -14
  162. package/shared/form-associated.js +1 -1
  163. package/shared/form-associated2.cjs +10 -10
  164. package/shared/form-associated2.js +1 -1
  165. package/shared/form-elements.cjs +13 -13
  166. package/shared/form-elements.js +1 -1
  167. package/shared/foundation/progress/base-progress.d.ts +2 -2
  168. package/shared/foundation-element.cjs +11 -11
  169. package/shared/foundation-element.js +1 -1
  170. package/shared/key-codes2.cjs +0 -56
  171. package/shared/key-codes2.js +1 -53
  172. package/shared/listbox.cjs +15 -16
  173. package/shared/listbox.js +2 -3
  174. package/shared/localized.cjs +2 -2
  175. package/shared/localized.js +1 -1
  176. package/shared/option.cjs +205 -0
  177. package/shared/option.js +202 -0
  178. package/shared/presentationDate.cjs +42 -43
  179. package/shared/presentationDate.js +1 -2
  180. package/shared/ref.cjs +2 -2
  181. package/shared/ref.js +1 -1
  182. package/shared/repeat.cjs +15 -15
  183. package/shared/repeat.js +1 -1
  184. package/shared/slider.template.cjs +4 -4
  185. package/shared/slider.template.js +1 -1
  186. package/shared/slotted.cjs +4 -4
  187. package/shared/slotted.js +1 -1
  188. package/shared/start-end.cjs +52 -0
  189. package/shared/start-end.js +50 -0
  190. package/shared/text-anchor.cjs +5 -6
  191. package/shared/text-anchor.js +3 -4
  192. package/shared/text-anchor.template.cjs +2 -2
  193. package/shared/text-anchor.template.js +1 -1
  194. package/shared/text-field2.cjs +23 -24
  195. package/shared/text-field2.js +2 -3
  196. package/shared/vivid-element.cjs +2610 -2
  197. package/shared/vivid-element.js +2591 -2
  198. package/styles/core/all.css +40 -1
  199. package/styles/core/theme.css +40 -1
  200. package/styles/core/typography.css +1 -1
  201. package/styles/tokens/theme-dark.css +25 -4
  202. package/styles/tokens/theme-light.css +25 -4
  203. package/styles/tokens/vivid-2-compat.css +1 -1
  204. package/text-anchor/index.cjs +3 -3
  205. package/text-anchor/index.js +1 -1
  206. package/lib/listbox/definition.d.ts +0 -2
  207. package/lib/listbox/listbox.d.ts +0 -14
  208. package/lib/listbox/listbox.template.d.ts +0 -2
  209. package/listbox/index.cjs +0 -54
  210. package/listbox/index.js +0 -52
  211. package/shared/aria-global2.cjs +0 -75
  212. package/shared/aria-global2.js +0 -73
  213. package/shared/defineVividComponent.cjs +0 -2612
  214. package/shared/defineVividComponent.js +0 -2592
  215. package/shared/listbox2.cjs +0 -1268
  216. package/shared/listbox2.js +0 -1265
  217. package/shared/strings2.cjs +0 -37
  218. package/shared/strings2.js +0 -33
@@ -1,12 +1,11 @@
1
1
  import { t as tabDefinition } from './definition50.js';
2
2
  import { t as tabPanelDefinition } from './definition49.js';
3
- import { a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './defineVividComponent.js';
3
+ import { a as attr, o as observable, V as VividElement, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
4
4
  import { i as keyArrowRight$1, h as keyArrowLeft$1, f as keyArrowDown$1, e as keyArrowUp$1, d as keyEnd$1, g as keyHome$1 } from './key-codes.js';
5
- import { V as VividElement } from './vivid-element.js';
6
5
  import { _ as __decorate, F as FoundationElement } from './foundation-element.js';
7
- import { S as StartEnd, a as keyArrowRight, b as keyArrowLeft, c as keyArrowDown, d as keyArrowUp, e as keyEnd, f as keyHome } from './key-codes2.js';
6
+ import { S as StartEnd } from './start-end.js';
8
7
  import { a as applyMixins } from './apply-mixins2.js';
9
- import { u as uniqueId, l as limit } from './strings2.js';
8
+ import { a as keyArrowRight, b as keyArrowLeft, c as keyArrowDown, d as keyArrowUp, e as keyEnd, f as keyHome } from './key-codes2.js';
10
9
  import { u as uniqueId$1 } from './strings.js';
11
10
  import { l as limit$1 } from './numbers.js';
12
11
  import { r as ref } from './ref.js';
@@ -14,6 +13,27 @@ import { s as slotted } from './slotted.js';
14
13
  import { w as when } from './when.js';
15
14
  import { c as classNames } from './class-names.js';
16
15
 
16
+ /**
17
+ * This method keeps a given value within the bounds of a min and max value. If the value
18
+ * is larger than the max, the minimum value will be returned. If the value is smaller than the minimum,
19
+ * the maximum will be returned. Otherwise, the value is returned un-changed.
20
+ */
21
+ /**
22
+ * Ensures that a value is between a min and max value. If value is lower than min, min will be returned.
23
+ * If value is greater than max, max will be returned.
24
+ */
25
+ function limit(min, max, value) {
26
+ return Math.min(Math.max(value, min), max);
27
+ }
28
+
29
+ let uniqueIdCounter = 0;
30
+ /**
31
+ * Generates a unique ID based on incrementing a counter.
32
+ */
33
+ function uniqueId(prefix = "") {
34
+ return `${prefix}${uniqueIdCounter++}`;
35
+ }
36
+
17
37
  /**
18
38
  * The orientation of the {@link @microsoft/fast-foundation#(Tabs:class)} component
19
39
  * @public
@@ -402,6 +422,11 @@ class Tabs extends VividElement {
402
422
  super(...arguments);
403
423
  // eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
404
424
  this.orientation = TabsOrientation.horizontal;
425
+ this.#isLastTabSelectedAfterRemove = (oldValue, newValue, isTab = true) => {
426
+ return oldValue.length > newValue.length && this.activetab.id === oldValue[oldValue.length - 1].getAttribute(
427
+ isTab ? "id" : "aria-labelledby"
428
+ );
429
+ };
405
430
  // eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
406
431
  this.activeindicator = true;
407
432
  this.showActiveIndicator = true;
@@ -424,10 +449,10 @@ class Tabs extends VividElement {
424
449
  this.setTabs = () => {
425
450
  const gridHorizontalProperty = "gridColumn";
426
451
  const gridVerticalProperty = "gridRow";
427
- const gridProperty = this.isHorizontal() ? gridHorizontalProperty : gridVerticalProperty;
452
+ const gridProperty = this.#isHorizontal() ? gridHorizontalProperty : gridVerticalProperty;
428
453
  this.activeTabIndex = this.getActiveIndex();
429
454
  this.showActiveIndicator = false;
430
- if (this.isHorizontal()) {
455
+ if (this.#isHorizontal()) {
431
456
  this.tablist.style.setProperty(
432
457
  "grid-template-columns",
433
458
  `repeat(${this.tabs.length}, var(${TABLIST_COLUMN}))`
@@ -447,7 +472,7 @@ class Tabs extends VividElement {
447
472
  tab.setAttribute("aria-selected", isActiveTab ? "true" : "false");
448
473
  tab.setAttribute("aria-controls", tabpanelId);
449
474
  tab.addEventListener("click", this.handleTabClick);
450
- tab.addEventListener("keydown", this.handleTabKeyDown);
475
+ tab.addEventListener("keydown", this.#handleTabKeyDown);
451
476
  tab.setAttribute("tabindex", isActiveTab ? "0" : "-1");
452
477
  if (isActiveTab) {
453
478
  this.activetab = tab;
@@ -457,7 +482,7 @@ class Tabs extends VividElement {
457
482
  tab.style[gridHorizontalProperty] = "";
458
483
  tab.style[gridVerticalProperty] = "";
459
484
  tab.style[gridProperty] = `${index + 1}`;
460
- !this.isHorizontal() ? tab.classList.add("vertical") : tab.classList.remove("vertical");
485
+ !this.#isHorizontal() ? tab.classList.add("vertical") : tab.classList.remove("vertical");
461
486
  });
462
487
  };
463
488
  this.setTabPanels = () => {
@@ -477,8 +502,11 @@ class Tabs extends VividElement {
477
502
  this.setComponent();
478
503
  }
479
504
  };
480
- this.handleTabKeyDown = (event) => {
481
- if (this.isHorizontal()) {
505
+ this.#isHorizontal = () => {
506
+ return this.orientation === TabsOrientation.horizontal;
507
+ };
508
+ this.#handleTabKeyDown = (event) => {
509
+ if (this.#isHorizontal()) {
482
510
  switch (event.key) {
483
511
  case keyArrowLeft$1:
484
512
  event.preventDefault();
@@ -518,7 +546,7 @@ class Tabs extends VividElement {
518
546
  this.adjustBackward = (_) => {
519
547
  this.#moveToNextTab(-1);
520
548
  };
521
- this.moveToTabByIndex = (group, index) => {
549
+ this.#moveToTabByIndex = (group, index) => {
522
550
  const tab = group[index];
523
551
  this.activetab = tab;
524
552
  this.prevActiveTabIndex = this.activeTabIndex;
@@ -536,9 +564,9 @@ class Tabs extends VividElement {
536
564
  if (this.$fastController.isConnected) {
537
565
  this.setTabs();
538
566
  this.setTabPanels();
539
- this.handleActiveIndicatorPosition();
567
+ this.#handleActiveIndicatorPosition();
540
568
  }
541
- this.patchIndicatorStyleTransition();
569
+ this.#patchIndicatorStyleTransition();
542
570
  if (!this.activeIndicatorRef) return;
543
571
  if (this.orientation === TabsOrientation.vertical) {
544
572
  this.activeIndicatorRef.style.removeProperty(ACTIVE_TAB_WIDTH);
@@ -554,38 +582,43 @@ class Tabs extends VividElement {
554
582
  );
555
583
  this.setTabs();
556
584
  this.setTabPanels();
557
- this.handleActiveIndicatorPosition();
585
+ this.#handleActiveIndicatorPosition();
558
586
  }
559
- this.patchIndicatorStyleTransition();
587
+ this.#patchIndicatorStyleTransition();
560
588
  this.#updateTabsConnotation();
561
589
  this.#scrollToIndex(this.activeTabIndex);
562
590
  }
591
+ #isLastTabSelectedAfterRemove;
563
592
  /**
564
593
  * @internal
565
594
  */
566
- tabsChanged() {
595
+ tabsChanged(oldValue, newValue) {
567
596
  if (this.$fastController.isConnected && this.tabs.length <= this.tabpanels.length) {
568
597
  this.tabIds = this.getTabIds();
569
598
  this.tabpanelIds = this.getTabPanelIds();
570
599
  this.setTabs();
571
600
  this.setTabPanels();
572
- this.handleActiveIndicatorPosition();
601
+ this.#handleActiveIndicatorPosition(
602
+ !this.#isLastTabSelectedAfterRemove(oldValue, newValue)
603
+ );
573
604
  }
574
- this.patchIndicatorStyleTransition();
605
+ this.#patchIndicatorStyleTransition();
575
606
  this.#updateScrollStatus();
576
607
  }
577
608
  /**
578
609
  * @internal
579
610
  */
580
- tabpanelsChanged() {
611
+ tabpanelsChanged(oldValue, newValue) {
581
612
  if (this.$fastController.isConnected && this.tabpanels.length <= this.tabs.length) {
582
613
  this.tabIds = this.getTabIds();
583
614
  this.tabpanelIds = this.getTabPanelIds();
584
615
  this.setTabs();
585
616
  this.setTabPanels();
586
- this.handleActiveIndicatorPosition();
617
+ this.#handleActiveIndicatorPosition(
618
+ !this.#isLastTabSelectedAfterRemove(oldValue, newValue, false)
619
+ );
587
620
  }
588
- this.patchIndicatorStyleTransition();
621
+ this.#patchIndicatorStyleTransition();
589
622
  }
590
623
  getActiveIndex() {
591
624
  const id = this.activeid;
@@ -612,9 +645,8 @@ class Tabs extends VividElement {
612
645
  this.change();
613
646
  }
614
647
  }
615
- isHorizontal() {
616
- return this.orientation === TabsOrientation.horizontal;
617
- }
648
+ #isHorizontal;
649
+ #handleTabKeyDown;
618
650
  /**
619
651
  * The adjust method for FASTTabs
620
652
  * @public
@@ -631,7 +663,7 @@ class Tabs extends VividElement {
631
663
  );
632
664
  const nextIndex = this.tabs.indexOf(focusableTabs[nextTabIndex]);
633
665
  if (nextIndex > -1) {
634
- this.moveToTabByIndex(this.tabs, nextIndex);
666
+ this.#moveToTabByIndex(this.tabs, nextIndex);
635
667
  }
636
668
  }
637
669
  #moveToNextTab(direction) {
@@ -639,11 +671,12 @@ class Tabs extends VividElement {
639
671
  for (let offset = 1; offset < this.tabs.length; offset++) {
640
672
  const index = (activeIndex + direction * offset + this.tabs.length) % this.tabs.length;
641
673
  if (this.isFocusableElement(this.tabs[index])) {
642
- this.moveToTabByIndex(this.tabs, index);
674
+ this.#moveToTabByIndex(this.tabs, index);
643
675
  break;
644
676
  }
645
677
  }
646
678
  }
679
+ #moveToTabByIndex;
647
680
  focusTab() {
648
681
  this.tabs[this.activeTabIndex].focus();
649
682
  }
@@ -656,13 +689,13 @@ class Tabs extends VividElement {
656
689
  #updateScrollStatus() {
657
690
  this.tablist.parentElement.dispatchEvent(new Event("scroll"));
658
691
  }
659
- /**
660
- * @internal
661
- */
662
- patchIndicatorStyleTransition() {
663
- if (!this.activetab || !this.activeIndicatorRef) return;
664
- if (this.orientation === TabsOrientation.vertical || !this.showActiveIndicator)
692
+ get #shouldMoveIndicator() {
693
+ return !(!this.activetab || !this.activeIndicatorRef || this.orientation === TabsOrientation.vertical || !this.showActiveIndicator);
694
+ }
695
+ #patchIndicatorStyleTransition() {
696
+ if (!this.#shouldMoveIndicator) {
665
697
  return;
698
+ }
666
699
  const width = this.activetab.getBoundingClientRect().width;
667
700
  this.activeIndicatorRef.style.setProperty(ACTIVE_TAB_WIDTH, `${width}px`);
668
701
  }
@@ -675,7 +708,7 @@ class Tabs extends VividElement {
675
708
  const scrollWrapper = this.tablist.parentElement;
676
709
  this.#resizeObserver = new ResizeObserver(() => {
677
710
  this.#updateScrollStatus();
678
- this.patchIndicatorStyleTransition();
711
+ this.#patchIndicatorStyleTransition();
679
712
  });
680
713
  this.#resizeObserver.observe(scrollWrapper);
681
714
  }
@@ -721,18 +754,18 @@ class Tabs extends VividElement {
721
754
  this.#tabListWrapper.scrollTo({ top, left, behavior: "smooth" });
722
755
  }
723
756
  #getGridProperty() {
724
- return this.isHorizontal() ? "gridColumn" : "gridRow";
757
+ return this.#isHorizontal() ? "gridColumn" : "gridRow";
725
758
  }
726
759
  #getTranslateProperty() {
727
- return this.isHorizontal() ? "translateX" : "translateY";
760
+ return this.#isHorizontal() ? "translateX" : "translateY";
728
761
  }
729
- handleActiveIndicatorPosition() {
762
+ #handleActiveIndicatorPosition(animate = true) {
730
763
  if (this.showActiveIndicator && this.activeindicator) {
731
- this.animateActiveIndicator();
764
+ this.#animateActiveIndicator(animate);
732
765
  }
733
766
  }
734
- animateActiveIndicator() {
735
- const offsetProperty = this.isHorizontal() ? "offsetLeft" : "offsetTop";
767
+ #animateActiveIndicator(animate) {
768
+ const offsetProperty = this.#isHorizontal() ? "offsetLeft" : "offsetTop";
736
769
  const currentOffset = this.activeIndicatorRef[offsetProperty];
737
770
  const currentGridValue = this.activeIndicatorRef.style[this.#getGridProperty()];
738
771
  this.activeIndicatorRef.style[this.#getGridProperty()] = `${this.activeTabIndex + 1}`;
@@ -740,7 +773,11 @@ class Tabs extends VividElement {
740
773
  this.activeIndicatorRef.style[this.#getGridProperty()] = currentGridValue;
741
774
  const relativeOffset = targetOffset - currentOffset;
742
775
  this.activeIndicatorRef.style.transform = `${this.#getTranslateProperty()}(${relativeOffset}px)`;
743
- this.activeIndicatorRef.classList.add("activeIndicatorTransition");
776
+ if (animate) {
777
+ this.activeIndicatorRef.classList.add("activeIndicatorTransition");
778
+ } else {
779
+ this.activeIndicatorRef.classList.remove("activeIndicatorTransition");
780
+ }
744
781
  }
745
782
  /**
746
783
  * @internal
@@ -827,7 +864,7 @@ function addEndShadow(scrollShadow, scrollWrapper) {
827
864
  );
828
865
  }
829
866
  function setShadowWhenScrollTabs(_, { event }) {
830
- const scrollWrapper = event.target;
867
+ const scrollWrapper = event.currentTarget;
831
868
  const scrollShadow = scrollWrapper.parentElement;
832
869
  if (setNoScrollState(scrollShadow, scrollWrapper)) {
833
870
  return;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const defineVividComponent = require('./defineVividComponent.cjs');
4
3
  const vividElement = require('./vivid-element.cjs');
5
4
  const classNames = require('./class-names.cjs');
6
5
 
@@ -22,11 +21,11 @@ class TagGroup extends vividElement.VividElement {
22
21
  }
23
22
  }
24
23
  __decorateClass([
25
- defineVividComponent.attr({ attribute: "aria-label" })
24
+ vividElement.attr({ attribute: "aria-label" })
26
25
  ], TagGroup.prototype, "ariaLabel");
27
26
 
28
27
  const getClasses = (_) => classNames.classNames("base");
29
- const TagGroupTemplate = defineVividComponent.html`
28
+ const TagGroupTemplate = vividElement.html`
30
29
  <div
31
30
  class="${getClasses}"
32
31
  role="listbox"
@@ -37,7 +36,7 @@ const TagGroupTemplate = defineVividComponent.html`
37
36
  </div>
38
37
  `;
39
38
 
40
- const tagGroupDefinition = defineVividComponent.defineVividComponent(
39
+ const tagGroupDefinition = vividElement.defineVividComponent(
41
40
  "tag-group",
42
41
  TagGroup,
43
42
  TagGroupTemplate,
@@ -46,7 +45,7 @@ const tagGroupDefinition = defineVividComponent.defineVividComponent(
46
45
  styles
47
46
  }
48
47
  );
49
- const registerTagGroup = defineVividComponent.createRegisterFunction(tagGroupDefinition);
48
+ const registerTagGroup = vividElement.createRegisterFunction(tagGroupDefinition);
50
49
 
51
50
  exports.registerTagGroup = registerTagGroup;
52
51
  exports.tagGroupDefinition = tagGroupDefinition;
@@ -1,5 +1,4 @@
1
- import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './defineVividComponent.js';
2
- import { V as VividElement } from './vivid-element.js';
1
+ import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
3
2
  import { c as classNames } from './class-names.js';
4
3
 
5
4
  const styles = ".base{display:flex;flex-wrap:wrap;gap:8px}";
@@ -1,10 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  const definition = require('./definition27.cjs');
4
- const defineVividComponent = require('./defineVividComponent.cjs');
4
+ const vividElement = require('./vivid-element.cjs');
5
5
  const applyMixins = require('./apply-mixins.cjs');
6
6
  const affix = require('./affix.cjs');
7
- const vividElement = require('./vivid-element.cjs');
8
7
  const when = require('./when.cjs');
9
8
  const classNames = require('./class-names.cjs');
10
9
 
@@ -54,28 +53,28 @@ class Tag extends vividElement.VividElement {
54
53
  }
55
54
  }
56
55
  __decorateClass([
57
- defineVividComponent.attr
56
+ vividElement.attr
58
57
  ], Tag.prototype, "connotation");
59
58
  __decorateClass([
60
- defineVividComponent.attr
59
+ vividElement.attr
61
60
  ], Tag.prototype, "shape");
62
61
  __decorateClass([
63
- defineVividComponent.attr
62
+ vividElement.attr
64
63
  ], Tag.prototype, "appearance");
65
64
  __decorateClass([
66
- defineVividComponent.attr
65
+ vividElement.attr
67
66
  ], Tag.prototype, "label");
68
67
  __decorateClass([
69
- defineVividComponent.attr({ mode: "boolean" })
68
+ vividElement.attr({ mode: "boolean" })
70
69
  ], Tag.prototype, "removable");
71
70
  __decorateClass([
72
- defineVividComponent.attr({ mode: "boolean" })
71
+ vividElement.attr({ mode: "boolean" })
73
72
  ], Tag.prototype, "disabled");
74
73
  __decorateClass([
75
- defineVividComponent.attr({ mode: "boolean" })
74
+ vividElement.attr({ mode: "boolean" })
76
75
  ], Tag.prototype, "selectable");
77
76
  __decorateClass([
78
- defineVividComponent.attr({ mode: "boolean" })
77
+ vividElement.attr({ mode: "boolean" })
79
78
  ], Tag.prototype, "selected");
80
79
  applyMixins.applyMixins(Tag, affix.AffixIcon);
81
80
 
@@ -100,7 +99,7 @@ const getClasses = ({
100
99
  [`shape-${shape}`, Boolean(shape)]
101
100
  );
102
101
  function renderDismissButton(iconTag) {
103
- return defineVividComponent.html`
102
+ return vividElement.html`
104
103
  <span
105
104
  aria-hidden="true"
106
105
  class="dismiss-button"
@@ -111,7 +110,7 @@ function renderDismissButton(iconTag) {
111
110
  const tagTemplate = (context) => {
112
111
  const affixIconTemplate = affix.affixIconTemplateFactory(context);
113
112
  const iconTag = context.tagFor(definition.Icon);
114
- return defineVividComponent.html` <span
113
+ return vividElement.html` <span
115
114
  class="${getClasses}"
116
115
  role="option"
117
116
  aria-disabled="${(x) => x.disabled}"
@@ -123,17 +122,17 @@ const tagTemplate = (context) => {
123
122
  ${(x) => affixIconTemplate(x.icon, affix.IconWrapper.Slot)}
124
123
  ${when.when(
125
124
  (x) => x.label,
126
- (x) => defineVividComponent.html`<span class="label">${x.label}</span>`
125
+ (x) => vividElement.html`<span class="label">${x.label}</span>`
127
126
  )}
128
127
  ${when.when((x) => x.removable && !x.selectable, renderDismissButton(iconTag))}
129
128
  ${when.when(
130
129
  (x) => x.selectable && x.selected,
131
- defineVividComponent.html`<${iconTag} class="selectable-icon" name="check-circle-solid"></${iconTag}>`
130
+ vividElement.html`<${iconTag} class="selectable-icon" name="check-circle-solid"></${iconTag}>`
132
131
  )}
133
132
  </span>`;
134
133
  };
135
134
 
136
- const tagDefinition = defineVividComponent.defineVividComponent(
135
+ const tagDefinition = vividElement.defineVividComponent(
137
136
  "tag",
138
137
  Tag,
139
138
  tagTemplate,
@@ -145,7 +144,7 @@ const tagDefinition = defineVividComponent.defineVividComponent(
145
144
  }
146
145
  }
147
146
  );
148
- const registerTag = defineVividComponent.createRegisterFunction(tagDefinition);
147
+ const registerTag = vividElement.createRegisterFunction(tagDefinition);
149
148
 
150
149
  exports.registerTag = registerTag;
151
150
  exports.tagDefinition = tagDefinition;
@@ -1,8 +1,7 @@
1
1
  import { I as Icon, i as iconDefinition } from './definition27.js';
2
- import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './defineVividComponent.js';
2
+ import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
3
3
  import { a as applyMixins } from './apply-mixins.js';
4
- import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
5
- import { V as VividElement } from './vivid-element.js';
4
+ import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
6
5
  import { w as when } from './when.js';
7
6
  import { c as classNames } from './class-names.js';
8
7
 
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const definition = require('./definition27.cjs');
4
- const defineVividComponent = require('./defineVividComponent.cjs');
4
+ const vividElement = require('./vivid-element.cjs');
5
5
  const textField = require('./text-field2.cjs');
6
6
  const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
7
7
  const formAssociated = require('./form-associated.cjs');
8
- const vividElement = require('./vivid-element.cjs');
9
8
  const formElements = require('./form-elements.cjs');
10
9
  const when = require('./when.cjs');
11
10
  const ref = require('./ref.cjs');
@@ -157,55 +156,55 @@ let TextArea = class extends FormAssociatedTextArea {
157
156
  _reflectToTextArea = new WeakMap();
158
157
  // @ts-expect-error Type is incorrectly non-optional
159
158
  __decorateClass([
160
- defineVividComponent.attr({ mode: "boolean" })
159
+ vividElement.attr({ mode: "boolean" })
161
160
  ], TextArea.prototype, "readOnly", 2);
162
161
  __decorateClass([
163
- defineVividComponent.attr
162
+ vividElement.attr
164
163
  ], TextArea.prototype, "resize", 2);
165
164
  // @ts-expect-error Type is incorrectly non-optional
166
165
  __decorateClass([
167
- defineVividComponent.attr({ mode: "boolean" })
166
+ vividElement.attr({ mode: "boolean" })
168
167
  ], TextArea.prototype, "autofocus", 2);
169
168
  // @ts-expect-error Type is incorrectly non-optional
170
169
  __decorateClass([
171
- defineVividComponent.attr({ attribute: "form" })
170
+ vividElement.attr({ attribute: "form" })
172
171
  ], TextArea.prototype, "formId", 2);
173
172
  // @ts-expect-error Type is incorrectly non-optional
174
173
  __decorateClass([
175
- defineVividComponent.attr
174
+ vividElement.attr
176
175
  ], TextArea.prototype, "list", 2);
177
176
  // @ts-expect-error Type is incorrectly non-optional
178
177
  __decorateClass([
179
- defineVividComponent.attr({ converter: defineVividComponent.nullableNumberConverter })
178
+ vividElement.attr({ converter: vividElement.nullableNumberConverter })
180
179
  ], TextArea.prototype, "maxlength", 2);
181
180
  // @ts-expect-error Type is incorrectly non-optional
182
181
  __decorateClass([
183
- defineVividComponent.attr({ converter: defineVividComponent.nullableNumberConverter })
182
+ vividElement.attr({ converter: vividElement.nullableNumberConverter })
184
183
  ], TextArea.prototype, "minlength", 2);
185
184
  // @ts-expect-error Type is incorrectly non-optional
186
185
  __decorateClass([
187
- defineVividComponent.attr
186
+ vividElement.attr
188
187
  ], TextArea.prototype, "name", 2);
189
188
  // @ts-expect-error Type is incorrectly non-optional
190
189
  __decorateClass([
191
- defineVividComponent.attr
190
+ vividElement.attr
192
191
  ], TextArea.prototype, "placeholder", 2);
193
192
  __decorateClass([
194
- defineVividComponent.attr({ converter: defineVividComponent.nullableNumberConverter, mode: "fromView" })
193
+ vividElement.attr({ converter: vividElement.nullableNumberConverter, mode: "fromView" })
195
194
  ], TextArea.prototype, "cols", 2);
196
195
  // @ts-expect-error Type is incorrectly non-optional
197
196
  __decorateClass([
198
- defineVividComponent.attr({ converter: defineVividComponent.nullableNumberConverter, mode: "fromView" })
197
+ vividElement.attr({ converter: vividElement.nullableNumberConverter, mode: "fromView" })
199
198
  ], TextArea.prototype, "rows", 2);
200
199
  // @ts-expect-error Type is incorrectly non-optional
201
200
  __decorateClass([
202
- defineVividComponent.attr({ mode: "boolean" })
201
+ vividElement.attr({ mode: "boolean" })
203
202
  ], TextArea.prototype, "spellcheck", 2);
204
203
  __decorateClass([
205
- defineVividComponent.observable
204
+ vividElement.observable
206
205
  ], TextArea.prototype, "defaultSlottedNodes", 2);
207
206
  __decorateClass([
208
- defineVividComponent.attr
207
+ vividElement.attr
209
208
  ], TextArea.prototype, "wrap", 2);
210
209
  TextArea = __decorateClass([
211
210
  formElements.errorText,
@@ -236,19 +235,19 @@ const getClasses = ({
236
235
  ["success", !!successText]
237
236
  );
238
237
  function renderLabel() {
239
- return defineVividComponent.html` <label for="control" class="label">
238
+ return vividElement.html` <label for="control" class="label">
240
239
  ${(x) => x.label}
241
240
  </label>`;
242
241
  }
243
242
  function renderCharCount() {
244
- return defineVividComponent.html`
243
+ return vividElement.html`
245
244
  <span class="char-count"
246
245
  >${(x) => x.value ? x.value.length : 0} / ${(x) => x.maxlength}</span
247
246
  >
248
247
  `;
249
248
  }
250
249
  const TextAreaTemplate = (context) => {
251
- return defineVividComponent.html`
250
+ return vividElement.html`
252
251
  <div class="${getClasses}">
253
252
  ${when.when((x) => x.charCount && x.maxlength, renderCharCount())}
254
253
  ${when.when((x) => x.label, renderLabel())}
@@ -292,7 +291,7 @@ const TextAreaTemplate = (context) => {
292
291
  `;
293
292
  };
294
293
 
295
- const textAreaDefinition = defineVividComponent.defineVividComponent(
294
+ const textAreaDefinition = vividElement.defineVividComponent(
296
295
  "text-area",
297
296
  TextArea,
298
297
  TextAreaTemplate,
@@ -304,7 +303,7 @@ const textAreaDefinition = defineVividComponent.defineVividComponent(
304
303
  }
305
304
  }
306
305
  );
307
- const registerTextArea = defineVividComponent.createRegisterFunction(textAreaDefinition);
306
+ const registerTextArea = vividElement.createRegisterFunction(textAreaDefinition);
308
307
 
309
308
  exports.registerTextArea = registerTextArea;
310
309
  exports.textAreaDefinition = textAreaDefinition;
@@ -1,9 +1,8 @@
1
1
  import { i as iconDefinition } from './definition27.js';
2
- import { a as attr, n as nullableNumberConverter, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './defineVividComponent.js';
2
+ import { V as VividElement, a as attr, n as nullableNumberConverter, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
3
3
  import { R as Reflector, D as DelegatesARIATextbox } from './text-field2.js';
4
4
  import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
5
5
  import { F as FormAssociated } from './form-associated.js';
6
- import { V as VividElement } from './vivid-element.js';
7
6
  import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, g as getFeedbackTemplate } from './form-elements.js';
8
7
  import { w as when } from './when.js';
9
8
  import { r as ref } from './ref.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const definition = require('./definition27.cjs');
4
- const defineVividComponent = require('./defineVividComponent.cjs');
4
+ const vividElement = require('./vivid-element.cjs');
5
5
  const textField$1 = require('./text-field2.cjs');
6
6
  const textField = require('./text-field.cjs');
7
7
  const affix = require('./affix.cjs');
@@ -41,7 +41,7 @@ const getStateClasses = ({
41
41
  [`size-${scale}`, Boolean(scale)]
42
42
  );
43
43
  function renderCharCount() {
44
- return defineVividComponent.html`
44
+ return vividElement.html`
45
45
  <span class="char-count"
46
46
  >${(x) => x.value ? x.value.length : 0} / ${(x) => x.maxlength}</span
47
47
  >
@@ -49,7 +49,7 @@ function renderCharCount() {
49
49
  }
50
50
  const TextfieldTemplate = (context) => {
51
51
  const affixIconTemplate = affix.affixIconTemplateFactory(context);
52
- return defineVividComponent.html` <div class="base ${getStateClasses}">
52
+ return vividElement.html` <div class="base ${getStateClasses}">
53
53
  ${when.when((x) => x.charCount && x.maxlength, renderCharCount())}
54
54
  <slot class="label" name="_label"></slot>
55
55
  <div class="fieldset">
@@ -76,7 +76,7 @@ const TextfieldTemplate = (context) => {
76
76
  <slot name="_mirrored-helper-text"></slot>`;
77
77
  };
78
78
 
79
- const textFieldDefinition = defineVividComponent.defineVividComponent(
79
+ const textFieldDefinition = vividElement.defineVividComponent(
80
80
  "text-field",
81
81
  textField$1.TextField,
82
82
  TextfieldTemplate,
@@ -88,7 +88,7 @@ const textFieldDefinition = defineVividComponent.defineVividComponent(
88
88
  }
89
89
  }
90
90
  );
91
- const registerTextField = defineVividComponent.createRegisterFunction(textFieldDefinition);
91
+ const registerTextField = vividElement.createRegisterFunction(textFieldDefinition);
92
92
 
93
93
  exports.registerTextField = registerTextField;
94
94
  exports.textFieldDefinition = textFieldDefinition;
@@ -1,5 +1,5 @@
1
1
  import { i as iconDefinition } from './definition27.js';
2
- import { h as html, d as defineVividComponent, f as createRegisterFunction } from './defineVividComponent.js';
2
+ import { h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
3
3
  import { T as TextField } from './text-field2.js';
4
4
  import { s as styles } from './text-field.js';
5
5
  import { a as affixIconTemplateFactory } from './affix.js';