@tet/tet-components 1.3.60-staging → 1.3.61-staging

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 (89) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tet-accordion.cjs.entry.js +1 -1
  3. package/dist/cjs/tet-carousel.cjs.entry.js +31 -3
  4. package/dist/cjs/tet-colors.cjs.entry.js +49 -5
  5. package/dist/cjs/tet-compare-card_4.cjs.entry.js +1 -1
  6. package/dist/cjs/tet-components.cjs.js +1 -1
  7. package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
  8. package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
  9. package/dist/cjs/tet-grid.cjs.entry.js +1 -1
  10. package/dist/cjs/tet-layout.cjs.entry.js +1 -1
  11. package/dist/cjs/tet-link.cjs.entry.js +1 -1
  12. package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
  13. package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
  14. package/dist/cjs/tet-tooltip.cjs.entry.js +1 -1
  15. package/dist/collection/components/advanced/cards/tet-compare-card/tet-compare-card.css +2302 -444
  16. package/dist/collection/components/basic/carousel/tet-carousel/tet-carousel.js +31 -3
  17. package/dist/collection/components/simple/lists/tet-text-list/tet-text-list.css +2302 -444
  18. package/dist/collection/components/simple/structural/tet-accordion/tet-accordion.css +10 -2
  19. package/dist/collection/components/simple/text-blocks/tet-tooltip/tet-tooltip.css +2 -0
  20. package/dist/collection/docs/styling/colors/tet-colors.css +3343 -369
  21. package/dist/collection/docs/styling/colors/tet-colors.js +67 -5
  22. package/dist/collection/docs/styling/font-weight/tet-font-weight.js +1 -1
  23. package/dist/collection/docs/styling/fonts/tet-fonts.js +1 -1
  24. package/dist/collection/docs/styling/layout/tet-layout.js +1 -1
  25. package/dist/collection/docs/styling/link/tet-link.js +1 -1
  26. package/dist/collection/docs/styling/spacing/tet-spacing.js +1 -1
  27. package/dist/collection/docs/styling/tet-grid/tet-grid.js +1 -1
  28. package/dist/components/{p-58d6ee45.js → p-0ef2258c.js} +1 -1
  29. package/dist/components/{p-4b882f63.js → p-b0d11744.js} +1 -1
  30. package/dist/components/p-cae66197.js +684 -0
  31. package/dist/components/{p-b3833a5f.js → p-df261aa4.js} +1 -1
  32. package/dist/components/p-fa04538f.js +137 -0
  33. package/dist/components/tet-accordion.js +1 -1
  34. package/dist/components/tet-address-offers-view.js +2 -2
  35. package/dist/components/tet-address-offers.js +1 -1
  36. package/dist/components/tet-business-compare-card.js +1 -1
  37. package/dist/components/tet-carousel.js +31 -3
  38. package/dist/components/tet-colors.js +51 -6
  39. package/dist/components/tet-compare-card.js +1 -1
  40. package/dist/components/tet-compare-cards-tab.js +2 -2
  41. package/dist/components/tet-compare-cards.js +1 -1
  42. package/dist/components/tet-font-weight.js +1 -1
  43. package/dist/components/tet-fonts.js +1 -1
  44. package/dist/components/tet-grid.js +1 -1
  45. package/dist/components/tet-layout.js +1 -1
  46. package/dist/components/tet-link.js +1 -1
  47. package/dist/components/tet-referral.js +1 -1
  48. package/dist/components/tet-spacing.js +1 -1
  49. package/dist/components/tet-table.js +1 -1
  50. package/dist/components/tet-text-list.js +1 -1
  51. package/dist/components/tet-tooltip.js +1 -1
  52. package/dist/esm/loader.js +1 -1
  53. package/dist/esm/tet-accordion.entry.js +1 -1
  54. package/dist/esm/tet-carousel.entry.js +31 -3
  55. package/dist/esm/tet-colors.entry.js +49 -5
  56. package/dist/esm/tet-compare-card_4.entry.js +1 -1
  57. package/dist/esm/tet-components.js +1 -1
  58. package/dist/esm/tet-font-weight.entry.js +1 -1
  59. package/dist/esm/tet-fonts.entry.js +1 -1
  60. package/dist/esm/tet-grid.entry.js +1 -1
  61. package/dist/esm/tet-layout.entry.js +1 -1
  62. package/dist/esm/tet-link.entry.js +1 -1
  63. package/dist/esm/tet-spacing.entry.js +1 -1
  64. package/dist/esm/tet-text-list.entry.js +1 -1
  65. package/dist/esm/tet-tooltip.entry.js +1 -1
  66. package/dist/tet-components/p-0b0b4360.entry.js +1 -0
  67. package/dist/tet-components/{p-518dee7b.entry.js → p-0f6ba6c1.entry.js} +1 -1
  68. package/dist/tet-components/{p-3900e7d6.entry.js → p-54b5a319.entry.js} +1 -1
  69. package/dist/tet-components/{p-3e7960d4.entry.js → p-73215222.entry.js} +1 -1
  70. package/dist/tet-components/{p-40c6b11a.entry.js → p-82743de6.entry.js} +1 -1
  71. package/dist/tet-components/p-86db3c7a.entry.js +1 -0
  72. package/dist/tet-components/{p-a38bea92.entry.js → p-9c52f023.entry.js} +1 -1
  73. package/dist/tet-components/{p-3d4d4083.entry.js → p-a96ff929.entry.js} +1 -1
  74. package/dist/tet-components/p-db6ecf32.entry.js +1 -0
  75. package/dist/tet-components/p-eaf32e3e.entry.js +1 -0
  76. package/dist/tet-components/{p-b7b0d312.entry.js → p-ebf42125.entry.js} +1 -1
  77. package/dist/tet-components/{p-d196ce32.entry.js → p-fe10ce17.entry.js} +1 -1
  78. package/dist/tet-components/tet-components.css +2 -2
  79. package/dist/tet-components/tet-components.esm.js +1 -1
  80. package/dist/types/components/basic/carousel/tet-carousel/tet-carousel.d.ts +2 -0
  81. package/dist/types/components.d.ts +10 -2
  82. package/dist/types/docs/styling/colors/tet-colors.d.ts +8 -1
  83. package/package.json +1 -1
  84. package/dist/components/p-4ae2b483.js +0 -684
  85. package/dist/components/p-6b072042.js +0 -137
  86. package/dist/tet-components/p-16f62174.entry.js +0 -1
  87. package/dist/tet-components/p-26e82491.entry.js +0 -1
  88. package/dist/tet-components/p-31d0e24f.entry.js +0 -1
  89. package/dist/tet-components/p-3950ee21.entry.js +0 -1
@@ -1,6 +1,8 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  export class TetCarousel {
3
3
  constructor() {
4
+ this.draggedAnchor = null;
5
+ this.dragMoved = false;
4
6
  this.trackElement = null;
5
7
  this.dragStartX = 0;
6
8
  this.dragOffset = 0;
@@ -27,16 +29,30 @@ export class TetCarousel {
27
29
  this.dragOffset = -(idx * window.innerWidth);
28
30
  };
29
31
  this.onPointerDown = (e) => {
32
+ e.preventDefault();
33
+ e.stopPropagation();
34
+ e.stopImmediatePropagation();
30
35
  this.isDragging = true;
31
36
  this.dragStartX = e.screenX;
37
+ this.dragMoved = false;
32
38
  document.body.style.userSelect = 'none';
33
39
  document.addEventListener('pointermove', this.onPointerMove);
34
40
  document.addEventListener('pointerup', this.onPointerUp);
41
+ let el = e.target;
42
+ this.draggedAnchor = null;
43
+ while (el) {
44
+ if (el.tagName === 'A') {
45
+ this.draggedAnchor = el;
46
+ break;
47
+ }
48
+ el = el.parentElement;
49
+ }
35
50
  };
36
51
  this.onPointerMove = (e) => {
37
52
  var _a, _b, _c;
38
53
  if (!this.isDragging)
39
54
  return;
55
+ this.dragMoved = true;
40
56
  const delta = e.screenX - this.dragStartX;
41
57
  let _dragOffset = this.dragOffset;
42
58
  _dragOffset += delta;
@@ -57,13 +73,25 @@ export class TetCarousel {
57
73
  this.trackElement.style.transform = `translateX(${this.dragOffset}px)`;
58
74
  }
59
75
  };
60
- this.onPointerUp = () => {
76
+ this.onPointerUp = (e) => {
77
+ e.preventDefault();
78
+ e.stopPropagation();
79
+ e.stopImmediatePropagation();
61
80
  if (!this.isDragging)
62
81
  return;
63
82
  this.isDragging = false;
64
83
  document.body.style.userSelect = '';
65
84
  document.removeEventListener('pointermove', this.onPointerMove);
66
85
  document.removeEventListener('pointerup', this.onPointerUp);
86
+ if (this.draggedAnchor && this.dragMoved) {
87
+ const preventClick = (ev) => {
88
+ var _a;
89
+ ev.preventDefault();
90
+ ev.stopPropagation();
91
+ (_a = this.draggedAnchor) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', preventClick, true);
92
+ };
93
+ this.draggedAnchor.addEventListener('click', preventClick, true);
94
+ }
67
95
  };
68
96
  this.activeIndex = 0;
69
97
  this.screenCount = 0;
@@ -110,10 +138,10 @@ export class TetCarousel {
110
138
  window.removeEventListener('resize', this.getScreenCount.bind(this));
111
139
  }
112
140
  render() {
113
- return (h(Host, { key: '6e5cfccec6e90056ba1e57138ee21aabb74202cc' }, h("div", { key: 'e626de146f4fc7a16f10b1ad2baef47d3f386abd', class: { 'tet-carousel': true, [`${this.theme}`]: true }, ref: (el) => (this.container = el), part: "carousel" }, h("div", { key: '6100942899ef46c8702d2ba8310d857bd490c38d', class: "tet-carousel__container" }, h("div", { key: 'c944da1c30a264215b4f5644e422b0ef120a1d92', class: "tet-carousel__track", ref: (el) => (this.trackElement = el), style: {
141
+ return (h(Host, { key: '82455d2dfb8240a27e0e1b11dd68faad64ddfce3' }, h("div", { key: '96c8f171564ba89c9ec4a1d27040bf76d0e8c839', class: { 'tet-carousel': true, [`${this.theme}`]: true }, ref: (el) => (this.container = el), part: "carousel" }, h("div", { key: '14306d6b91013f12d914493b2e134a883841e689', class: "tet-carousel__container" }, h("div", { key: '3b3ab56bf32a4b696db69d05ace95314068c908b', class: "tet-carousel__track", ref: (el) => (this.trackElement = el), style: {
114
142
  transform: `translateX(${this.dragOffset}px)`,
115
143
  transition: this.isDragging ? 'none' : `transform ${this.transitionDuration}ms ${this.transitionTiming}`
116
- }, onPointerDown: this.onPointerDown, onMouseMove: this.onPointerMove, onPointerUp: this.onPointerUp, onMouseLeave: this.onPointerUp }, h("slot", { key: '3d02121d844f2afc87943f54d68f79ef8166d665' }))), h("div", { key: 'b58afd0fb79b1053e81ef8d93043f6821900ee18', class: "tet-carousel__controls" }, this.showButtons && (h("div", { key: 'f8d5860fe97855458150168e623c4e274ea02e12', class: "tet-carousel__buttons tet-carousel__buttons--mobile" }, h("tet-button", { key: '455f9ec9ff0cf2d7796904d0a0aa0a007fc1b382', class: "tet-carousel__btn", theme: this.theme === 'light' ? 'dark' : 'light', "icon-name": this.buttonIconLeft, "icon-mode": true, onClick: this.handlePrev, "aria-label": "Previous", disabled: this.screenCount <= 1 || this.activeIndex === 0 }))), this.showDots && (h("div", { key: 'a7721ecb513e207dbb56a46056dc0e97b64df874', class: "tet-carousel__dots" }, Array.from({ length: this.screenCount }).map((_, idx) => (h("span", { class: `tet-carousel__dot${idx === this.activeIndex ? ' active' : ''}`, key: idx, onClick: () => this.handleDotClick(idx) }))))), this.showButtons && (h("div", { key: 'ecf5f7626031d97b3a7e8b7cd4faa132a233a346', class: "tet-carousel__buttons " }, h("tet-button", { key: '84a5ac3c5f5c273cd800d57ccde3607972306f2b', class: "tet-carousel__buttons--desktop tet-carousel__btn ", theme: this.theme === 'light' ? 'dark' : 'light', "icon-name": this.buttonIconLeft, "icon-mode": true, onClick: this.handlePrev, "aria-label": "Previous", disabled: this.screenCount <= 1 || this.activeIndex === 0 }), h("tet-button", { key: 'b0941cdc9b7f0f731d9336bfb09482cc399a0fd6', class: "tet-carousel__btn", theme: this.theme === 'light' ? 'dark' : 'light', "icon-name": this.buttonIconRight, "icon-mode": true, onClick: this.handleNext, "aria-label": "Next", disabled: this.screenCount <= 1 || this.activeIndex === this.screenCount - 1 })))))));
144
+ }, onPointerDown: this.onPointerDown, onMouseMove: this.onPointerMove, onPointerUp: this.onPointerUp, onMouseLeave: this.onPointerUp }, h("slot", { key: '783ef1e0e5c558d698dd8591516d0cc4d613d890' }))), h("div", { key: '1fec30c7e26abc29218753da2c774c1736747b6b', class: "tet-carousel__controls" }, this.showButtons && (h("div", { key: '5d0e4c0dd7190384f8c96ff3aaed94db90e7d663', class: "tet-carousel__buttons tet-carousel__buttons--mobile" }, h("tet-button", { key: '8a065ab58157140a87ba884254d7f3f5afe72c71', class: "tet-carousel__btn", theme: this.theme === 'light' ? 'dark' : 'light', "icon-name": this.buttonIconLeft, "icon-mode": true, onClick: this.handlePrev, "aria-label": "Previous", disabled: this.screenCount <= 1 || this.activeIndex === 0 }))), this.showDots && (h("div", { key: '9c6231e50f7c469254eeaba757a07fd4169d4dc2', class: "tet-carousel__dots" }, Array.from({ length: this.screenCount }).map((_, idx) => (h("span", { class: `tet-carousel__dot${idx === this.activeIndex ? ' active' : ''}`, key: idx, onClick: () => this.handleDotClick(idx) }))))), this.showButtons && (h("div", { key: 'aeb93d78f058d96f4e16253624b7cef6512ec167', class: "tet-carousel__buttons " }, h("tet-button", { key: '5bab8de73d3033df20101a810f89895d47f64fd5', class: "tet-carousel__buttons--desktop tet-carousel__btn ", theme: this.theme === 'light' ? 'dark' : 'light', "icon-name": this.buttonIconLeft, "icon-mode": true, onClick: this.handlePrev, "aria-label": "Previous", disabled: this.screenCount <= 1 || this.activeIndex === 0 }), h("tet-button", { key: 'f624005ca2aeda63dd730162d9a0b1538ceef561', class: "tet-carousel__btn", theme: this.theme === 'light' ? 'dark' : 'light', "icon-name": this.buttonIconRight, "icon-mode": true, onClick: this.handleNext, "aria-label": "Next", disabled: this.screenCount <= 1 || this.activeIndex === this.screenCount - 1 })))))));
117
145
  }
118
146
  static get is() { return "tet-carousel"; }
119
147
  static get encapsulation() { return "shadow"; }