@vonage/vivid 4.14.0 → 4.14.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.
Files changed (207) hide show
  1. package/custom-elements.json +130 -23
  2. package/lib/elevation/elevation.d.ts +1 -0
  3. package/lib/radio/radio.form-associated.d.ts +2 -0
  4. package/lib/tabs/tabs.d.ts +0 -5
  5. package/lib/text-anchor/text-anchor.d.ts +2 -2
  6. package/lib/tree-item/tree-item.d.ts +2 -2
  7. package/lib/tree-view/tree-view.d.ts +2 -2
  8. package/listbox/index.cjs +4 -4
  9. package/listbox/index.js +1 -1
  10. package/package.json +1 -1
  11. package/shared/affix.cjs +8 -8
  12. package/shared/affix.js +1 -1
  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/aria-global2.cjs +40 -40
  26. package/shared/aria-global2.js +2 -2
  27. package/shared/base-progress.cjs +7 -8
  28. package/shared/base-progress.js +2 -3
  29. package/shared/breadcrumb-item.cjs +2 -3
  30. package/shared/breadcrumb-item.js +1 -2
  31. package/shared/button.cjs +10 -11
  32. package/shared/button.js +1 -2
  33. package/shared/calendar-event.cjs +7 -8
  34. package/shared/calendar-event.js +1 -2
  35. package/shared/children.cjs +2 -2
  36. package/shared/children.js +1 -1
  37. package/shared/definition.cjs +14 -15
  38. package/shared/definition.js +1 -2
  39. package/shared/definition10.cjs +5 -6
  40. package/shared/definition10.js +1 -2
  41. package/shared/definition11.cjs +29 -29
  42. package/shared/definition11.js +1 -1
  43. package/shared/definition12.cjs +6 -6
  44. package/shared/definition12.js +1 -1
  45. package/shared/definition13.cjs +13 -14
  46. package/shared/definition13.js +1 -2
  47. package/shared/definition14.cjs +23 -24
  48. package/shared/definition14.js +1 -2
  49. package/shared/definition15.cjs +15 -16
  50. package/shared/definition15.js +1 -2
  51. package/shared/definition16.cjs +20 -19
  52. package/shared/definition16.js +3 -2
  53. package/shared/definition17.cjs +53 -54
  54. package/shared/definition17.js +1 -2
  55. package/shared/definition18.cjs +4 -4
  56. package/shared/definition18.js +1 -1
  57. package/shared/definition19.cjs +12 -12
  58. package/shared/definition19.js +1 -1
  59. package/shared/definition2.cjs +6 -7
  60. package/shared/definition2.js +1 -2
  61. package/shared/definition20.cjs +20 -21
  62. package/shared/definition20.js +1 -2
  63. package/shared/definition21.cjs +27 -28
  64. package/shared/definition21.js +3 -4
  65. package/shared/definition22.cjs +5 -6
  66. package/shared/definition22.js +1 -2
  67. package/shared/definition23.cjs +10 -11
  68. package/shared/definition23.js +1 -2
  69. package/shared/definition24.cjs +8 -8
  70. package/shared/definition24.js +2 -2
  71. package/shared/definition25.cjs +13 -14
  72. package/shared/definition25.js +1 -2
  73. package/shared/definition26.cjs +5 -6
  74. package/shared/definition26.js +1 -2
  75. package/shared/definition27.cjs +11 -12
  76. package/shared/definition27.js +1 -2
  77. package/shared/definition28.cjs +9 -10
  78. package/shared/definition28.js +2 -3
  79. package/shared/definition29.cjs +44 -45
  80. package/shared/definition29.js +2 -3
  81. package/shared/definition3.cjs +8 -9
  82. package/shared/definition3.js +1 -2
  83. package/shared/definition30.cjs +9 -10
  84. package/shared/definition30.js +1 -2
  85. package/shared/definition31.cjs +5 -5
  86. package/shared/definition31.js +1 -1
  87. package/shared/definition32.cjs +3 -4
  88. package/shared/definition32.js +1 -2
  89. package/shared/definition33.cjs +6 -7
  90. package/shared/definition33.js +1 -2
  91. package/shared/definition34.cjs +50 -52
  92. package/shared/definition34.js +2 -4
  93. package/shared/definition35.cjs +24 -25
  94. package/shared/definition35.js +1 -2
  95. package/shared/definition36.cjs +15 -16
  96. package/shared/definition36.js +1 -2
  97. package/shared/definition37.cjs +9 -9
  98. package/shared/definition37.js +1 -1
  99. package/shared/definition38.cjs +10 -10
  100. package/shared/definition38.js +1 -1
  101. package/shared/definition39.cjs +12 -13
  102. package/shared/definition39.js +1 -2
  103. package/shared/definition4.cjs +19 -20
  104. package/shared/definition4.js +1 -2
  105. package/shared/definition40.cjs +61 -13
  106. package/shared/definition40.js +52 -4
  107. package/shared/definition41.cjs +29 -30
  108. package/shared/definition41.js +1 -2
  109. package/shared/definition42.cjs +53 -54
  110. package/shared/definition42.js +2 -3
  111. package/shared/definition43.cjs +31 -31
  112. package/shared/definition43.js +1 -1
  113. package/shared/definition44.cjs +14 -15
  114. package/shared/definition44.js +1 -2
  115. package/shared/definition45.cjs +9 -10
  116. package/shared/definition45.js +1 -2
  117. package/shared/definition46.cjs +26 -27
  118. package/shared/definition46.js +1 -2
  119. package/shared/definition47.cjs +17 -18
  120. package/shared/definition47.js +1 -2
  121. package/shared/definition48.cjs +9 -10
  122. package/shared/definition48.js +1 -2
  123. package/shared/definition49.cjs +3 -4
  124. package/shared/definition49.js +1 -2
  125. package/shared/definition5.cjs +30 -31
  126. package/shared/definition5.js +1 -2
  127. package/shared/definition50.cjs +12 -13
  128. package/shared/definition50.js +1 -2
  129. package/shared/definition51.cjs +87 -72
  130. package/shared/definition51.js +56 -41
  131. package/shared/definition52.cjs +4 -5
  132. package/shared/definition52.js +1 -2
  133. package/shared/definition53.cjs +15 -16
  134. package/shared/definition53.js +1 -2
  135. package/shared/definition54.cjs +20 -21
  136. package/shared/definition54.js +1 -2
  137. package/shared/definition55.cjs +5 -5
  138. package/shared/definition55.js +1 -1
  139. package/shared/definition56.cjs +18 -19
  140. package/shared/definition56.js +1 -2
  141. package/shared/definition57.cjs +10 -11
  142. package/shared/definition57.js +1 -2
  143. package/shared/definition58.cjs +7 -8
  144. package/shared/definition58.js +1 -2
  145. package/shared/definition59.cjs +16 -17
  146. package/shared/definition59.js +2 -3
  147. package/shared/definition6.cjs +11 -12
  148. package/shared/definition6.js +1 -2
  149. package/shared/definition60.cjs +9 -10
  150. package/shared/definition60.js +2 -3
  151. package/shared/definition61.cjs +27 -30
  152. package/shared/definition61.js +17 -20
  153. package/shared/definition62.cjs +12 -9
  154. package/shared/definition62.js +8 -5
  155. package/shared/definition63.cjs +13 -14
  156. package/shared/definition63.js +1 -2
  157. package/shared/definition7.cjs +9 -10
  158. package/shared/definition7.js +1 -2
  159. package/shared/definition8.cjs +14 -15
  160. package/shared/definition8.js +1 -2
  161. package/shared/definition9.cjs +7 -7
  162. package/shared/definition9.js +1 -1
  163. package/shared/form-associated.cjs +14 -14
  164. package/shared/form-associated.js +1 -1
  165. package/shared/form-associated2.cjs +10 -10
  166. package/shared/form-associated2.js +1 -1
  167. package/shared/form-elements.cjs +13 -13
  168. package/shared/form-elements.js +1 -1
  169. package/shared/foundation/progress/base-progress.d.ts +2 -2
  170. package/shared/key-codes2.cjs +1416 -3
  171. package/shared/key-codes2.js +1413 -2
  172. package/shared/listbox.cjs +12 -13
  173. package/shared/listbox.js +1 -2
  174. package/shared/listbox2.cjs +59 -60
  175. package/shared/listbox2.js +2 -3
  176. package/shared/localized.cjs +2 -2
  177. package/shared/localized.js +1 -1
  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/text-anchor.cjs +5 -6
  189. package/shared/text-anchor.js +2 -3
  190. package/shared/text-anchor.template.cjs +2 -2
  191. package/shared/text-anchor.template.js +1 -1
  192. package/shared/text-field2.cjs +23 -24
  193. package/shared/text-field2.js +1 -2
  194. package/shared/vivid-element.cjs +2610 -2
  195. package/shared/vivid-element.js +2591 -2
  196. package/styles/core/all.css +40 -1
  197. package/styles/core/theme.css +40 -1
  198. package/styles/core/typography.css +1 -1
  199. package/styles/tokens/theme-dark.css +25 -4
  200. package/styles/tokens/theme-light.css +25 -4
  201. package/styles/tokens/vivid-2-compat.css +1 -1
  202. package/text-anchor/index.cjs +3 -3
  203. package/text-anchor/index.js +1 -1
  204. package/shared/defineVividComponent.cjs +0 -2612
  205. package/shared/defineVividComponent.js +0 -2592
  206. package/shared/foundation-element.cjs +0 -1417
  207. package/shared/foundation-element.js +0 -1414
@@ -1,10 +1,8 @@
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
- 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';
5
+ import { _ as __decorate, S as StartEnd, F as FoundationElement, a as keyArrowRight, b as keyArrowLeft, c as keyArrowDown, d as keyArrowUp, e as keyEnd, f as keyHome } from './key-codes2.js';
8
6
  import { a as applyMixins } from './apply-mixins2.js';
9
7
  import { u as uniqueId, l as limit } from './strings2.js';
10
8
  import { u as uniqueId$1 } from './strings.js';
@@ -402,6 +400,11 @@ class Tabs extends VividElement {
402
400
  super(...arguments);
403
401
  // eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
404
402
  this.orientation = TabsOrientation.horizontal;
403
+ this.#isLastTabSelectedAfterRemove = (oldValue, newValue, isTab = true) => {
404
+ return oldValue.length > newValue.length && this.activetab.id === oldValue[oldValue.length - 1].getAttribute(
405
+ isTab ? "id" : "aria-labelledby"
406
+ );
407
+ };
405
408
  // eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
406
409
  this.activeindicator = true;
407
410
  this.showActiveIndicator = true;
@@ -424,10 +427,10 @@ class Tabs extends VividElement {
424
427
  this.setTabs = () => {
425
428
  const gridHorizontalProperty = "gridColumn";
426
429
  const gridVerticalProperty = "gridRow";
427
- const gridProperty = this.isHorizontal() ? gridHorizontalProperty : gridVerticalProperty;
430
+ const gridProperty = this.#isHorizontal() ? gridHorizontalProperty : gridVerticalProperty;
428
431
  this.activeTabIndex = this.getActiveIndex();
429
432
  this.showActiveIndicator = false;
430
- if (this.isHorizontal()) {
433
+ if (this.#isHorizontal()) {
431
434
  this.tablist.style.setProperty(
432
435
  "grid-template-columns",
433
436
  `repeat(${this.tabs.length}, var(${TABLIST_COLUMN}))`
@@ -447,7 +450,7 @@ class Tabs extends VividElement {
447
450
  tab.setAttribute("aria-selected", isActiveTab ? "true" : "false");
448
451
  tab.setAttribute("aria-controls", tabpanelId);
449
452
  tab.addEventListener("click", this.handleTabClick);
450
- tab.addEventListener("keydown", this.handleTabKeyDown);
453
+ tab.addEventListener("keydown", this.#handleTabKeyDown);
451
454
  tab.setAttribute("tabindex", isActiveTab ? "0" : "-1");
452
455
  if (isActiveTab) {
453
456
  this.activetab = tab;
@@ -457,7 +460,7 @@ class Tabs extends VividElement {
457
460
  tab.style[gridHorizontalProperty] = "";
458
461
  tab.style[gridVerticalProperty] = "";
459
462
  tab.style[gridProperty] = `${index + 1}`;
460
- !this.isHorizontal() ? tab.classList.add("vertical") : tab.classList.remove("vertical");
463
+ !this.#isHorizontal() ? tab.classList.add("vertical") : tab.classList.remove("vertical");
461
464
  });
462
465
  };
463
466
  this.setTabPanels = () => {
@@ -477,8 +480,11 @@ class Tabs extends VividElement {
477
480
  this.setComponent();
478
481
  }
479
482
  };
480
- this.handleTabKeyDown = (event) => {
481
- if (this.isHorizontal()) {
483
+ this.#isHorizontal = () => {
484
+ return this.orientation === TabsOrientation.horizontal;
485
+ };
486
+ this.#handleTabKeyDown = (event) => {
487
+ if (this.#isHorizontal()) {
482
488
  switch (event.key) {
483
489
  case keyArrowLeft$1:
484
490
  event.preventDefault();
@@ -518,7 +524,7 @@ class Tabs extends VividElement {
518
524
  this.adjustBackward = (_) => {
519
525
  this.#moveToNextTab(-1);
520
526
  };
521
- this.moveToTabByIndex = (group, index) => {
527
+ this.#moveToTabByIndex = (group, index) => {
522
528
  const tab = group[index];
523
529
  this.activetab = tab;
524
530
  this.prevActiveTabIndex = this.activeTabIndex;
@@ -536,9 +542,9 @@ class Tabs extends VividElement {
536
542
  if (this.$fastController.isConnected) {
537
543
  this.setTabs();
538
544
  this.setTabPanels();
539
- this.handleActiveIndicatorPosition();
545
+ this.#handleActiveIndicatorPosition();
540
546
  }
541
- this.patchIndicatorStyleTransition();
547
+ this.#patchIndicatorStyleTransition();
542
548
  if (!this.activeIndicatorRef) return;
543
549
  if (this.orientation === TabsOrientation.vertical) {
544
550
  this.activeIndicatorRef.style.removeProperty(ACTIVE_TAB_WIDTH);
@@ -554,38 +560,43 @@ class Tabs extends VividElement {
554
560
  );
555
561
  this.setTabs();
556
562
  this.setTabPanels();
557
- this.handleActiveIndicatorPosition();
563
+ this.#handleActiveIndicatorPosition();
558
564
  }
559
- this.patchIndicatorStyleTransition();
565
+ this.#patchIndicatorStyleTransition();
560
566
  this.#updateTabsConnotation();
561
567
  this.#scrollToIndex(this.activeTabIndex);
562
568
  }
569
+ #isLastTabSelectedAfterRemove;
563
570
  /**
564
571
  * @internal
565
572
  */
566
- tabsChanged() {
573
+ tabsChanged(oldValue, newValue) {
567
574
  if (this.$fastController.isConnected && this.tabs.length <= this.tabpanels.length) {
568
575
  this.tabIds = this.getTabIds();
569
576
  this.tabpanelIds = this.getTabPanelIds();
570
577
  this.setTabs();
571
578
  this.setTabPanels();
572
- this.handleActiveIndicatorPosition();
579
+ this.#handleActiveIndicatorPosition(
580
+ !this.#isLastTabSelectedAfterRemove(oldValue, newValue)
581
+ );
573
582
  }
574
- this.patchIndicatorStyleTransition();
583
+ this.#patchIndicatorStyleTransition();
575
584
  this.#updateScrollStatus();
576
585
  }
577
586
  /**
578
587
  * @internal
579
588
  */
580
- tabpanelsChanged() {
589
+ tabpanelsChanged(oldValue, newValue) {
581
590
  if (this.$fastController.isConnected && this.tabpanels.length <= this.tabs.length) {
582
591
  this.tabIds = this.getTabIds();
583
592
  this.tabpanelIds = this.getTabPanelIds();
584
593
  this.setTabs();
585
594
  this.setTabPanels();
586
- this.handleActiveIndicatorPosition();
595
+ this.#handleActiveIndicatorPosition(
596
+ !this.#isLastTabSelectedAfterRemove(oldValue, newValue, false)
597
+ );
587
598
  }
588
- this.patchIndicatorStyleTransition();
599
+ this.#patchIndicatorStyleTransition();
589
600
  }
590
601
  getActiveIndex() {
591
602
  const id = this.activeid;
@@ -612,9 +623,8 @@ class Tabs extends VividElement {
612
623
  this.change();
613
624
  }
614
625
  }
615
- isHorizontal() {
616
- return this.orientation === TabsOrientation.horizontal;
617
- }
626
+ #isHorizontal;
627
+ #handleTabKeyDown;
618
628
  /**
619
629
  * The adjust method for FASTTabs
620
630
  * @public
@@ -631,7 +641,7 @@ class Tabs extends VividElement {
631
641
  );
632
642
  const nextIndex = this.tabs.indexOf(focusableTabs[nextTabIndex]);
633
643
  if (nextIndex > -1) {
634
- this.moveToTabByIndex(this.tabs, nextIndex);
644
+ this.#moveToTabByIndex(this.tabs, nextIndex);
635
645
  }
636
646
  }
637
647
  #moveToNextTab(direction) {
@@ -639,11 +649,12 @@ class Tabs extends VividElement {
639
649
  for (let offset = 1; offset < this.tabs.length; offset++) {
640
650
  const index = (activeIndex + direction * offset + this.tabs.length) % this.tabs.length;
641
651
  if (this.isFocusableElement(this.tabs[index])) {
642
- this.moveToTabByIndex(this.tabs, index);
652
+ this.#moveToTabByIndex(this.tabs, index);
643
653
  break;
644
654
  }
645
655
  }
646
656
  }
657
+ #moveToTabByIndex;
647
658
  focusTab() {
648
659
  this.tabs[this.activeTabIndex].focus();
649
660
  }
@@ -656,13 +667,13 @@ class Tabs extends VividElement {
656
667
  #updateScrollStatus() {
657
668
  this.tablist.parentElement.dispatchEvent(new Event("scroll"));
658
669
  }
659
- /**
660
- * @internal
661
- */
662
- patchIndicatorStyleTransition() {
663
- if (!this.activetab || !this.activeIndicatorRef) return;
664
- if (this.orientation === TabsOrientation.vertical || !this.showActiveIndicator)
670
+ get #shouldMoveIndicator() {
671
+ return !(!this.activetab || !this.activeIndicatorRef || this.orientation === TabsOrientation.vertical || !this.showActiveIndicator);
672
+ }
673
+ #patchIndicatorStyleTransition() {
674
+ if (!this.#shouldMoveIndicator) {
665
675
  return;
676
+ }
666
677
  const width = this.activetab.getBoundingClientRect().width;
667
678
  this.activeIndicatorRef.style.setProperty(ACTIVE_TAB_WIDTH, `${width}px`);
668
679
  }
@@ -675,7 +686,7 @@ class Tabs extends VividElement {
675
686
  const scrollWrapper = this.tablist.parentElement;
676
687
  this.#resizeObserver = new ResizeObserver(() => {
677
688
  this.#updateScrollStatus();
678
- this.patchIndicatorStyleTransition();
689
+ this.#patchIndicatorStyleTransition();
679
690
  });
680
691
  this.#resizeObserver.observe(scrollWrapper);
681
692
  }
@@ -721,18 +732,18 @@ class Tabs extends VividElement {
721
732
  this.#tabListWrapper.scrollTo({ top, left, behavior: "smooth" });
722
733
  }
723
734
  #getGridProperty() {
724
- return this.isHorizontal() ? "gridColumn" : "gridRow";
735
+ return this.#isHorizontal() ? "gridColumn" : "gridRow";
725
736
  }
726
737
  #getTranslateProperty() {
727
- return this.isHorizontal() ? "translateX" : "translateY";
738
+ return this.#isHorizontal() ? "translateX" : "translateY";
728
739
  }
729
- handleActiveIndicatorPosition() {
740
+ #handleActiveIndicatorPosition(animate = true) {
730
741
  if (this.showActiveIndicator && this.activeindicator) {
731
- this.animateActiveIndicator();
742
+ this.#animateActiveIndicator(animate);
732
743
  }
733
744
  }
734
- animateActiveIndicator() {
735
- const offsetProperty = this.isHorizontal() ? "offsetLeft" : "offsetTop";
745
+ #animateActiveIndicator(animate) {
746
+ const offsetProperty = this.#isHorizontal() ? "offsetLeft" : "offsetTop";
736
747
  const currentOffset = this.activeIndicatorRef[offsetProperty];
737
748
  const currentGridValue = this.activeIndicatorRef.style[this.#getGridProperty()];
738
749
  this.activeIndicatorRef.style[this.#getGridProperty()] = `${this.activeTabIndex + 1}`;
@@ -740,7 +751,11 @@ class Tabs extends VividElement {
740
751
  this.activeIndicatorRef.style[this.#getGridProperty()] = currentGridValue;
741
752
  const relativeOffset = targetOffset - currentOffset;
742
753
  this.activeIndicatorRef.style.transform = `${this.#getTranslateProperty()}(${relativeOffset}px)`;
743
- this.activeIndicatorRef.classList.add("activeIndicatorTransition");
754
+ if (animate) {
755
+ this.activeIndicatorRef.classList.add("activeIndicatorTransition");
756
+ } else {
757
+ this.activeIndicatorRef.classList.remove("activeIndicatorTransition");
758
+ }
744
759
  }
745
760
  /**
746
761
  * @internal
@@ -827,7 +842,7 @@ function addEndShadow(scrollShadow, scrollWrapper) {
827
842
  );
828
843
  }
829
844
  function setShadowWhenScrollTabs(_, { event }) {
830
- const scrollWrapper = event.target;
845
+ const scrollWrapper = event.currentTarget;
831
846
  const scrollShadow = scrollWrapper.parentElement;
832
847
  if (setNoScrollState(scrollShadow, scrollWrapper)) {
833
848
  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
4
  import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
5
- import { V as VividElement } from './vivid-element.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';