@tet/tet-components 1.3.8-testing → 1.3.9-testing

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 (63) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tet-card-list.cjs.entry.js +36 -4
  3. package/dist/cjs/tet-compare-card_4.cjs.entry.js +1 -1
  4. package/dist/cjs/tet-components.cjs.js +1 -1
  5. package/dist/cjs/tet-news-card-list.cjs.entry.js +3 -3
  6. package/dist/cjs/tet-table.cjs.entry.js +10 -5
  7. package/dist/cjs/tet-tag_2.cjs.entry.js +6 -5
  8. package/dist/collection/components/advanced/cards/tet-card-list/test/tet-card-list.spec.js +10 -10
  9. package/dist/collection/components/advanced/cards/tet-card-list/tet-card-list.js +36 -4
  10. package/dist/collection/components/advanced/cards/tet-compare-card/test/tet-compare-card.spec.js +2 -2
  11. package/dist/collection/components/advanced/cards/tet-compare-card/tet-compare-card.js +1 -1
  12. package/dist/collection/components/basic/buttons/tet-tag/tet-tag.css +46 -38
  13. package/dist/collection/components/basic/buttons/tet-tag/tet-tag.js +4 -4
  14. package/dist/collection/components/basic/buttons/tet-tag-group/test/tet-tag-group.spec.js +48 -2
  15. package/dist/collection/components/basic/buttons/tet-tag-group/tet-tag-group.js +21 -2
  16. package/dist/collection/components/simple/lists/tet-news-card-list/test/tet-news-card-list.spec.js +29 -23
  17. package/dist/collection/components/simple/lists/tet-news-card-list/tet-news-card-list.css +8 -0
  18. package/dist/collection/components/simple/lists/tet-news-card-list/tet-news-card-list.js +2 -2
  19. package/dist/collection/components/simple/tables-and-graphs/tet-table/test/tet-table.spec.js +10 -10
  20. package/dist/collection/components/simple/tables-and-graphs/tet-table/tet-table.css +43 -16
  21. package/dist/collection/components/simple/tables-and-graphs/tet-table/tet-table.js +27 -4
  22. package/dist/components/{p-c6812132.js → p-33b10a5d.js} +6 -4
  23. package/dist/components/{p-071523e3.js → p-57a9e15d.js} +36 -4
  24. package/dist/components/{p-0ee15c92.js → p-810b312b.js} +2 -2
  25. package/dist/components/{p-68476e70.js → p-82bac3af.js} +1 -1
  26. package/dist/components/{p-0fabceac.js → p-90cbcf3c.js} +3 -3
  27. package/dist/components/{p-7373af03.js → p-a694a158.js} +1 -1
  28. package/dist/components/{p-7538b8c7.js → p-df435ffa.js} +1 -1
  29. package/dist/components/tet-address-offers-filters.js +1 -1
  30. package/dist/components/tet-address-offers-view.js +5 -5
  31. package/dist/components/tet-address-offers.js +1 -1
  32. package/dist/components/tet-card-list.js +1 -1
  33. package/dist/components/tet-compare-card.js +1 -1
  34. package/dist/components/tet-compare-cards-tab.js +2 -2
  35. package/dist/components/tet-compare-cards.js +1 -1
  36. package/dist/components/tet-news-card-list.js +4 -4
  37. package/dist/components/tet-table.js +12 -6
  38. package/dist/components/tet-tag-group.js +1 -1
  39. package/dist/components/tet-tag.js +1 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/tet-card-list.entry.js +36 -4
  42. package/dist/esm/tet-compare-card_4.entry.js +1 -1
  43. package/dist/esm/tet-components.js +1 -1
  44. package/dist/esm/tet-news-card-list.entry.js +3 -3
  45. package/dist/esm/tet-table.entry.js +10 -5
  46. package/dist/esm/tet-tag_2.entry.js +6 -5
  47. package/dist/tet-components/p-2b127937.entry.js +1 -0
  48. package/dist/tet-components/p-3490c999.entry.js +1 -0
  49. package/dist/tet-components/p-81483d35.entry.js +1 -0
  50. package/dist/tet-components/p-c0a6c379.entry.js +1 -0
  51. package/dist/tet-components/p-e7b35dc9.entry.js +1 -0
  52. package/dist/tet-components/tet-components.esm.js +1 -1
  53. package/dist/types/components/advanced/cards/tet-card-list/tet-card-list.d.ts +16 -0
  54. package/dist/types/components/basic/buttons/tet-tag/tet-tag.d.ts +1 -1
  55. package/dist/types/components/basic/buttons/tet-tag-group/tet-tag-group.d.ts +2 -0
  56. package/dist/types/components/simple/tables-and-graphs/tet-table/tet-table.d.ts +2 -0
  57. package/dist/types/components.d.ts +18 -2
  58. package/package.json +1 -1
  59. package/dist/tet-components/p-250770f1.entry.js +0 -1
  60. package/dist/tet-components/p-500c1d15.entry.js +0 -1
  61. package/dist/tet-components/p-6dfafd83.entry.js +0 -1
  62. package/dist/tet-components/p-7d20a125.entry.js +0 -1
  63. package/dist/tet-components/p-9e358934.entry.js +0 -1
@@ -8,6 +8,10 @@ import { getConvertedPixels, InertiaScroll } from "../../../../services/utils/in
8
8
  */
9
9
  export class TetCardList {
10
10
  constructor() {
11
+ /**
12
+ * All child elements of the list.
13
+ */
14
+ this.allElements = [];
11
15
  /**
12
16
  * The arrays containing cloned content elements.
13
17
  */
@@ -297,6 +301,26 @@ export class TetCardList {
297
301
  }
298
302
  this.isScrolling = false;
299
303
  };
304
+ /**
305
+ * Handles the keyup event on the right control.
306
+ * If the key is "Enter" or "Space", will trigger navigation to the next card.
307
+ * @param e - The keyboard event object.
308
+ */
309
+ this.handleRightControlKeyUp = (e) => {
310
+ if (e.key === ' ' || e.key === 'Enter') {
311
+ this.handleRightControl();
312
+ }
313
+ };
314
+ /**
315
+ * Handles the keyup event on the left control.
316
+ * If the key is "Enter" or "Space", will trigger navigation to the previous card.
317
+ * @param e - The keyboard event object.
318
+ */
319
+ this.handleLeftControlKeyUp = (e) => {
320
+ if (e.key === ' ' || e.key === 'Enter') {
321
+ this.handleLeftControl();
322
+ }
323
+ };
300
324
  /**
301
325
  * Updates the visibility of the control element.
302
326
  */
@@ -426,6 +450,10 @@ export class TetCardList {
426
450
  this.setupScrollbar();
427
451
  }
428
452
  });
453
+ this.allElements = Array.from(this.element.children);
454
+ this.allElements.forEach((element) => {
455
+ element.setAttribute('tabindex', '0');
456
+ });
429
457
  if (this.withVirtualScroll) {
430
458
  this.setupVirtualScroll();
431
459
  }
@@ -518,6 +546,10 @@ export class TetCardList {
518
546
  // Calculate the new position of the first element and scroll to it.
519
547
  const firstElementPosition = firstOriginalElement.offsetLeft - currentPosition;
520
548
  this.inertialScroll.scrollTo({ left: firstElementPosition }, true);
549
+ const allClones = this.element.querySelectorAll('[data-clone-id]');
550
+ allClones.forEach((element) => {
551
+ element.removeAttribute('tabindex');
552
+ });
521
553
  }
522
554
  /**
523
555
  * Resets the content to its original state.
@@ -621,18 +653,18 @@ export class TetCardList {
621
653
  this.dimensions.element.width = elementRect.width;
622
654
  }
623
655
  render() {
624
- return (h(Host, { key: '9a3bfd406a9024f3c3a64e03ce51533966526f0c' }, h("div", { key: '485d7169056697e041178192e5d08d7fad0a1fac', class: {
656
+ return (h(Host, { key: '3ed05945ef1b1adb765d000ee12d06e60136a032' }, h("div", { key: '31679bf3b2bd5e1b60cdecf35ffe3a7d1d2a7ea3', class: {
625
657
  'tet-card-list__container': true,
626
658
  'tet-card-list--no-scroll': this.disableScroll,
627
- }, part: "card-list-container" }, h("span", { key: '6b8f1d28df13deffac6192afe43cc10885bf7944', class: {
659
+ }, part: "card-list-container" }, h("div", { key: '06b020ebc6de0aa682a1acf366723d8f7b9f5260', class: "tet-card-list__scroll-container" }, h("div", { key: '20bac34c3590f976f0952b9ef5dea49700b5a9cd', part: "card-list", ref: el => (this.scrollContainerRef = el) }, h("slot", { key: '0358b22b6fd6f493030e8fa73ff5b835a76e8fd7' }))), h("span", { key: '4c7f0549e7aa8ef2a72e1151e84a17184baf7080', class: {
628
660
  'tet-card-list__control': true,
629
661
  'tet-card-list__control--left': true,
630
662
  'tet-card-list__control--hidden': !this.controlVisibility.left,
631
- } }, h("tet-icon", { key: 'aa456090fd2072ef5e37abf10501419612d5e792', onPointerDown: this.handleControlPointerDown, onPointerUp: this.handleLeftControl, name: this.iconPrev && this.iconPrev !== '' ? this.iconPrev : 'chevron-left', class: "tet-card-list__control__icon" })), h("div", { key: '882763a8eca085783181dc43a20aa0a242a0c862', class: "tet-card-list__scroll-container" }, h("div", { key: '2d0486aa60f943878a83b1dfbb83a3aa65a4c94f', part: "card-list", ref: el => (this.scrollContainerRef = el) }, h("slot", { key: '3f9e19a06762b32fd6e25be9476fe8f8375ca184' }))), h("span", { key: '96e25307884364afcdca9c9628d1e8e953442531', class: {
663
+ } }, h("tet-icon", { key: '235dded58494cfb3bb4ef16d735bf4a333e7e627', onPointerDown: this.handleControlPointerDown, onPointerUp: this.handleLeftControl, onKeyUp: this.handleLeftControlKeyUp, name: this.iconPrev && this.iconPrev !== '' ? this.iconPrev : 'chevron-left', class: "tet-card-list__control__icon", tabIndex: 0 })), h("span", { key: '7025c1270f0d69ec4af61d10233bccfc0ad4799d', class: {
632
664
  'tet-card-list__control': true,
633
665
  'tet-card-list__control--right': true,
634
666
  'tet-card-list__control--hidden': !this.controlVisibility.right,
635
- } }, h("tet-icon", { key: '5d39adf9b9e4bb54189ba2caf6be29c4c970fd6a', onPointerDown: this.handleControlPointerDown, onPointerUp: this.handleRightControl, name: this.iconNext && this.iconNext !== '' ? this.iconNext : 'chevron-right', class: "tet-card-list__control__icon" })), h("div", { key: '841f29009fabb5b48048be6e1965f4a43004ffe0', class: { 'tet-card-list__scroll': true, 'tet-card-list--hidden': !this.withScrollbar } }, h("div", { key: 'd2a2b8c405c4a4413ea83ae60c99919ea8709a9f', class: "tet-card-list__scroll--thumb", ref: el => (this.scrollbarRef = el) })))));
667
+ } }, h("tet-icon", { key: '49d16d988aaef47b3d6400da6e3dc80f35c76487', onPointerDown: this.handleControlPointerDown, onPointerUp: this.handleRightControl, onKeyUp: this.handleRightControlKeyUp, name: this.iconNext && this.iconNext !== '' ? this.iconNext : 'chevron-right', class: "tet-card-list__control__icon", tabIndex: 0 })), h("div", { key: 'f9b94f3735c2ec14958003c5bde697f8a334bbff', class: { 'tet-card-list__scroll': true, 'tet-card-list--hidden': !this.withScrollbar } }, h("div", { key: 'b51c17625daaf192586174d24a71ea1be743592e', class: "tet-card-list__scroll--thumb", ref: el => (this.scrollbarRef = el) })))));
636
668
  }
637
669
  static get is() { return "tet-card-list"; }
638
670
  static get encapsulation() { return "shadow"; }
@@ -101,7 +101,7 @@ describe('tet-compare-card', () => {
101
101
  </div>
102
102
  </div>
103
103
  <div class="button-wrapper">
104
- <a target="_blank" href="https://tet.lv" data-form-link="https://tet.lv">
104
+ <a target="_blank" href="https://tet.lv" data-form-link="https://tet.lv" tabindex="-1">
105
105
  <div class="button">
106
106
  <tet-button class="tet-button" theme="light">Button</tet-button>
107
107
  <style>.tet-button {--button-width: 10rem;}</style>
@@ -198,7 +198,7 @@ describe('tet-compare-card', () => {
198
198
  </div>
199
199
  </div>
200
200
  <div class="button-wrapper">
201
- <a target="_blank" href="https://tet.lv" data-form-link="https://tet.lv">
201
+ <a target="_blank" href="https://tet.lv" data-form-link="https://tet.lv" tabindex="-1" >
202
202
  <div class="button">
203
203
  <tet-button class="tet-button" theme="light">Button</tet-button>
204
204
  <style>.tet-button {--button-width: 10rem;}</style>
@@ -220,7 +220,7 @@ export class TetCompareCard {
220
220
  'price-wrapper': true,
221
221
  'price-wrap': this.options.priceWrap,
222
222
  'price-flex-column': this.priceShownVertically
223
- } }, h("div", { class: "price-container" }, this.options.pricePrefix && h("div", { class: "price-prefix", innerHTML: this.options.pricePrefix }), h("div", { class: "new-price translation-none" }, parseFloat(this.options.price.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "currency" }, h("span", null, this.options.currency), h("div", { class: "price-info", innerHTML: this.options.priceInfo }))), this.options.oldPrice ? (h("div", { class: "old-price-container" }, h("div", { class: "old-price translation-none" }, parseFloat(this.options.oldPrice.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "old-currency" }, this.options.currency))) : (''))) : (''), this.showHelper ? (h("div", { class: "helper" }, this.options.term ? h("div", { class: "term" }, this.options.term) : '', this.options.termText ? h("div", { class: "term-text", innerHTML: this.options.termText }) : '', h("span", { innerHTML: this.options.helper }))) : (''), this.isNetflixCard && this.options.selectOptions !== undefined ? (h("div", { class: "select" }, h("tet-dropdown", { id: "dropdown", class: "cards-dropdown", theme: "light", "button-label": "", "label-logo": this.options.selectOptions[0].labelLogo, "label-right": this.options.selectOptions[0].labelRight, "label-right-color": this.options.selectOptions[0].labelRightColor, "close-on-selection": true, options: this.options.selectOptions, "flex-layout": true }))) : ('')), h("div", { class: "button-wrapper" }, this.options.giftModalAttribute ? (h("div", { class: "button", "data-form-link": this.options.link, innerHTML: this.options.giftModalAttribute })) : this.options.linkOpenBlank ? (h("a", { target: "_blank", href: this.options.link, "data-form-link": this.options.link }, h("div", { class: "button", innerHTML: this.options.button }))) : (h("a", { href: this.options.link, "data-form-link": this.options.link }, h("div", { class: "button", innerHTML: this.options.button }))), h("div", { class: "description-wrapper js-resize-divide-slot" }, h("slot", { name: "description-slot" })), this.options.secondaryLink && this.options.secondaryLinkText && (h("div", { class: {
223
+ } }, h("div", { class: "price-container" }, this.options.pricePrefix && h("div", { class: "price-prefix", innerHTML: this.options.pricePrefix }), h("div", { class: "new-price translation-none" }, parseFloat(this.options.price.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "currency" }, h("span", null, this.options.currency), h("div", { class: "price-info", innerHTML: this.options.priceInfo }))), this.options.oldPrice ? (h("div", { class: "old-price-container" }, h("div", { class: "old-price translation-none" }, parseFloat(this.options.oldPrice.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "old-currency" }, this.options.currency))) : (''))) : (''), this.showHelper ? (h("div", { class: "helper" }, this.options.term ? h("div", { class: "term" }, this.options.term) : '', this.options.termText ? h("div", { class: "term-text", innerHTML: this.options.termText }) : '', h("span", { innerHTML: this.options.helper }))) : (''), this.isNetflixCard && this.options.selectOptions !== undefined ? (h("div", { class: "select" }, h("tet-dropdown", { id: "dropdown", class: "cards-dropdown", theme: "light", "button-label": "", "label-logo": this.options.selectOptions[0].labelLogo, "label-right": this.options.selectOptions[0].labelRight, "label-right-color": this.options.selectOptions[0].labelRightColor, "close-on-selection": true, options: this.options.selectOptions, "flex-layout": true }))) : ('')), h("div", { class: "button-wrapper" }, this.options.giftModalAttribute ? (h("div", { class: "button", "data-form-link": this.options.link, innerHTML: this.options.giftModalAttribute })) : this.options.linkOpenBlank ? (h("a", { target: "_blank", href: this.options.link, "data-form-link": this.options.link, tabIndex: -1 }, h("div", { class: "button", innerHTML: this.options.button }))) : (h("a", { href: this.options.link, "data-form-link": this.options.link, tabIndex: -1 }, h("div", { class: "button", innerHTML: this.options.button }))), h("div", { class: "description-wrapper js-resize-divide-slot" }, h("slot", { name: "description-slot" })), this.options.secondaryLink && this.options.secondaryLinkText && (h("div", { class: {
224
224
  'secondary-link': true,
225
225
  [`${this.secondaryLinkPosition}`]: true
226
226
  } }, this.options.secondaryLinkOpenBlank ? (h("a", { target: "_blank", href: this.options.secondaryLink }, this.options.secondaryLinkText)) : (h("a", { href: this.options.secondaryLink }, this.options.secondaryLinkText)))))), this.cardScript ? h("link", { href: this.cardScript, rel: "stylesheet", type: "text/css" }) : '', h("tet-icon", { name: "check", class: "is-selected__icon" })));
@@ -352,14 +352,24 @@
352
352
 
353
353
  :host {
354
354
  /**
355
- * @prop --tag-text-color: The text color of the tag.
356
355
  * @prop --tag-background-color: The background color of the tag.
356
+ * @prop --tag-hover-background-color: The background color of the tag on hover.
357
+ * @prop --tag-active-background-color: The background color of the tag when active.
358
+ *
357
359
  * @prop --tag-border-color: The border color of the tag.
358
- */
360
+ * @prop --tag-active-border-color: The border color of the tag when active.
361
+ *
362
+ * @prop --tag-text-color: The text color of the tag.
363
+ * @prop --tag-active-text-color: The text color of the tag when active.
364
+ */
359
365
  display: inline-block;
360
- --tag-text-color: rgb(10, 11, 13);
361
366
  --tag-background-color: rgb(255, 255, 255);
367
+ --tag-hover-background-color: linear-gradient(rgba(88, 99, 116, 0.08), rgba(88, 99, 116, 0.08)), linear-gradient(rgb(255, 255, 255), rgb(255, 255, 255));
368
+ --tag-active-background-color: rgb(10, 11, 13);
362
369
  --tag-border-color: rgb(153, 160, 174);
370
+ --tag-active-border-color: rgb(10, 11, 13);
371
+ --tag-text-color: rgb(10, 11, 13);
372
+ --tag-active-text-color: rgb(255, 255, 255);
363
373
  }
364
374
 
365
375
  .tag {
@@ -375,51 +385,49 @@
375
385
  border-color: var(--tag-border-color);
376
386
  border: 0.0625rem solid var(--tag-border-color);
377
387
  }
378
- .tag--icon {
379
- padding: 0.375rem 0.625rem 0.365rem 0.75rem;
388
+ .tag:hover {
389
+ background: var(--tag-hover-background-color);
380
390
  }
381
- .tag.theme-classic {
382
- --tag-background-color: rgb(255, 255, 255);
383
- --tag-border-color: rgb(153, 160, 174);
384
- --tag-text-color: rgb(10, 11, 13);
391
+ .tag:active:not(:disabled), .tag.tag-active {
392
+ color: var(--tag-active-text-color);
393
+ background: var(--tag-active-background-color);
394
+ border-color: var(--tag-active-border-color);
385
395
  }
386
- .tag.theme-classic:hover {
387
- --tag-background-color: linear-gradient(rgba(88, 99, 116, 0.08), rgba(88, 99, 116, 0.08)), linear-gradient(rgb(255, 255, 255), rgb(255, 255, 255));
396
+ .tag:active:not(:disabled) .tag-icon, .tag.tag-active .tag-icon {
397
+ --icon-color: var(--tag-active-text-color);
388
398
  }
389
- .tag.theme-classic:active:not(:disabled), .tag.theme-classic.tag-active {
390
- --tag-background-color: rgb(10, 11, 13);
391
- --tag-text-color: rgb(255, 255, 255);
392
- --tag-border-color: rgb(10, 11, 13);
399
+ .tag--icon {
400
+ padding: 0.375rem 0.625rem 0.365rem 0.75rem;
401
+ }
402
+ .tag.theme-light {
403
+ --tag-background-color: var(--tc-layer-primary);
404
+ --tag-hover-background-color: var(--tc-button-primary-background-inverse-hover);
405
+ --tag-active-background-color: var(--tc-layer-inverse-primary);
406
+ --tag-border-color: var(--tc-border-secondary);
407
+ --tag-active-border-color: var(--tc-button-primary-background-default);
408
+ --tag-text-color: var(--tc-button-text-secondary);
409
+ --tag-active-text-color: var(--tc-button-text-primary);
410
+ }
411
+ .tag.theme-dark {
412
+ --tag-background-color: var(--tc-layer-primary-dark);
413
+ --tag-hover-background-color: var(--tc-button-primary-background-inverse-hover-dark);
414
+ --tag-active-background-color: var(--tc-layer-inverse-primary-dark);
415
+ --tag-border-color: var(--tc-border-secondary-dark);
416
+ --tag-active-border-color: var(--tc-button-primary-background-default-dark);
417
+ --tag-text-color: var(--tc-button-text-secondary-dark);
418
+ --tag-active-text-color: var(--tc-button-text-primary-dark);
393
419
  }
394
420
  .tag.theme-mint {
395
421
  --tag-background-color: rgb(35, 40, 46);
422
+ --tag-hover-background-color: linear-gradient(rgba(26, 213, 219, 0.08), rgba(26, 213, 219, 0.08)), linear-gradient(rgb(35, 40, 46), rgb(35, 40, 46));
423
+ --tag-active-background-color: rgb(26, 213, 219);
396
424
  --tag-border-color: rgb(26, 213, 219);
425
+ --tag-active-border-color: rgb(26, 213, 219);
397
426
  --tag-text-color: rgb(255, 255, 255);
398
- }
399
- .tag.theme-mint:hover {
400
- --tag-background-color: linear-gradient(rgba(26, 213, 219, 0.08), rgba(26, 213, 219, 0.08)), linear-gradient(rgb(35, 40, 46), rgb(35, 40, 46));
401
- }
402
- .tag.theme-mint:active:not(:disabled), .tag.theme-mint.tag-active {
403
- --tag-background-color: rgb(26, 213, 219);
404
- --tag-border-color: rgb(26, 213, 219);
405
- --tag-text-color: rgb(10, 11, 13);
406
- }
407
- .tag.theme-light {
408
- --tag-background-color: rgb(35, 40, 46);
409
- --tag-border-color: rgb(153, 160, 174);
410
- --tag-text-color: rgb(255, 255, 255);
411
- }
412
- .tag.theme-light:hover {
413
- --tag-background-color: linear-gradient(rgba(153, 160, 174, 0.12), rgba(153, 160, 174, 0.12)), linear-gradient(rgb(35, 40, 46), rgb(35, 40, 46));
414
- --tag-border-color: rgb(153, 160, 174);
415
- }
416
- .tag.theme-light:active:not(:disabled), .tag.theme-light.tag-active {
417
- --tag-background-color: rgb(255, 255, 255);
418
- --tag-border-color: rgb(255, 255, 255);
419
- --tag-text-color: rgb(10, 11, 13);
427
+ --tag-active-text-color: rgb(10, 11, 13);
420
428
  }
421
429
  .tag .tag-icon {
422
- display: flex;
423
430
  --icon-size: 1rem;
424
431
  --icon-color: var(--tag-text-color);
432
+ display: flex;
425
433
  }
@@ -19,12 +19,12 @@ export class TetTag {
19
19
  processTranslations('tet-components', this.language).then(() => forceUpdate(this));
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: '37839fc6dfac3373830f26fc2fb1783df930a864' }, h("button", { key: '75c330d21232666683f1fb59b370acb47bb89a50', class: {
22
+ return (h(Host, { key: 'eb5263cd80bbe3419b2490fd92bce14d00604537' }, h("button", { key: '55ae17a5a7e51bdea204d6c8828969baf6546b44', class: {
23
23
  tag: true,
24
24
  'tag-active': this.active,
25
25
  'tag--icon': this.showIcon,
26
26
  [`theme-${this.theme}`]: true,
27
- }, "aria-pressed": this.active.toString() }, this.tagTitle && h("p", { key: '538c527b6d288263148e612c969a1e0676ae385d', class: "tag-title" }, t(this.tagTitle)), this.count !== null && this.count !== undefined && h("span", { key: '415c10f4b7e6b3a550f7a41da097ff3cc6f526df', class: "tag-count" }, this.count), this.showIcon && h("tet-icon", { key: '432b17b2e44e16d957a02ce4d863c0c2376e02e2', class: "tag-icon", name: "close-circle", part: "icon-selected" }))));
27
+ }, "aria-pressed": this.active.toString() }, this.tagTitle && h("p", { key: '184ff8f2cbd2b96d34a6ff1ba9b1e5f739ed8834', class: "tag-title" }, t(this.tagTitle)), this.count !== null && this.count !== undefined && h("span", { key: '600c422682ce3e64321b13c638f09acb837146d7', class: "tag-count" }, this.count), this.showIcon && h("tet-icon", { key: '920ee69edabb85fd1ec53eae072794de7a6672d5', class: "tag-icon", name: "close-circle", part: "icon-selected" }))));
28
28
  }
29
29
  static get is() { return "tet-tag"; }
30
30
  static get encapsulation() { return "shadow"; }
@@ -96,8 +96,8 @@ export class TetTag {
96
96
  "type": "string",
97
97
  "mutable": false,
98
98
  "complexType": {
99
- "original": "'light' | 'mint' | 'classic'",
100
- "resolved": "\"classic\" | \"light\" | \"mint\"",
99
+ "original": "'light' | 'mint' | 'classic' | 'dark'",
100
+ "resolved": "\"classic\" | \"dark\" | \"light\" | \"mint\"",
101
101
  "references": {}
102
102
  },
103
103
  "required": false,
@@ -36,8 +36,54 @@ describe('tet-tag-group', () => {
36
36
  <tet-tag-group>
37
37
  <mock:shadow-root>
38
38
  <div class="tags">
39
- <tet-tag class="single-tag" language="lv" part="tag" tagTitle="MyTag" count="2"></tet-tag>
40
- <tet-tag class="single-tag" language="lv" part="tag" tagTitle="YourTag" count="4" active></tet-tag>
39
+ <tet-tag class="single-tag" language="lv" part="tag" tagTitle="MyTag" count="2" theme="classic"></tet-tag>
40
+ <tet-tag
41
+ class="single-tag"
42
+ language="lv"
43
+ part="tag"
44
+ tagTitle="YourTag"
45
+ count="4"
46
+ theme="classic"
47
+ active
48
+ ></tet-tag>
49
+ </div>
50
+ </mock:shadow-root>
51
+ </tet-tag-group>
52
+ `);
53
+ });
54
+ it('renders tags with dark theme', async () => {
55
+ const tags = [
56
+ {
57
+ title: 'HisTag',
58
+ count: 2,
59
+ active: false,
60
+ },
61
+ {
62
+ title: 'HerTag',
63
+ count: 4,
64
+ active: true,
65
+ showIcon: true,
66
+ },
67
+ ];
68
+ const page = await newSpecPage({
69
+ components: [TetTagGroup],
70
+ template: () => h("tet-tag-group", { tags: tags, theme: "dark" }),
71
+ });
72
+ expect(page.root).toEqualHtml(`
73
+ <tet-tag-group>
74
+ <mock:shadow-root>
75
+ <div class="tags">
76
+ <tet-tag class="single-tag" language="lv" part="tag" tagTitle="HisTag" count="2" theme="dark"></tet-tag>
77
+ <tet-tag
78
+ class="single-tag"
79
+ language="lv"
80
+ part="tag"
81
+ tagTitle="HerTag"
82
+ count="4"
83
+ theme="dark"
84
+ showIcon
85
+ active
86
+ ></tet-tag>
41
87
  </div>
42
88
  </mock:shadow-root>
43
89
  </tet-tag-group>
@@ -13,13 +13,14 @@ export class TetTagGroup {
13
13
  * @param tag
14
14
  */
15
15
  this.renderTag = (tag) => {
16
- return (h("tet-tag", { class: "single-tag", part: "tag", tagTitle: tag.title, count: tag.count, active: tag.active, showIcon: tag.showIcon, language: this.language, onClick: () => isFunction(tag.clickAction) ? tag.clickAction(tag) : null }));
16
+ return (h("tet-tag", { class: "single-tag", part: "tag", tagTitle: tag.title, count: tag.count, active: tag.active, showIcon: tag.showIcon, language: this.language, theme: this.theme, onClick: () => isFunction(tag.clickAction) ? tag.clickAction(tag) : null }));
17
17
  };
18
18
  this.language = 'lv';
19
19
  this.tags = [];
20
+ this.theme = 'classic';
20
21
  }
21
22
  render() {
22
- return h("div", { key: '3076f16567ad2d89474d318ae6ecf726716df537', class: "tags" }, this.tags.map(this.renderTag));
23
+ return h("div", { key: 'd815d584fbf26991101999bc76f0570cff5f1cba', class: "tags" }, this.tags.map(this.renderTag));
23
24
  }
24
25
  static get is() { return "tet-tag-group"; }
25
26
  static get encapsulation() { return "shadow"; }
@@ -80,6 +81,24 @@ export class TetTagGroup {
80
81
  "text": "The array of tags to display."
81
82
  },
82
83
  "defaultValue": "[]"
84
+ },
85
+ "theme": {
86
+ "type": "string",
87
+ "mutable": false,
88
+ "complexType": {
89
+ "original": "'light' | 'mint' | 'classic' | 'dark'",
90
+ "resolved": "\"classic\" | \"dark\" | \"light\" | \"mint\"",
91
+ "references": {}
92
+ },
93
+ "required": false,
94
+ "optional": false,
95
+ "docs": {
96
+ "tags": [],
97
+ "text": "The theme of the tag component."
98
+ },
99
+ "attribute": "theme",
100
+ "reflect": false,
101
+ "defaultValue": "'classic'"
83
102
  }
84
103
  };
85
104
  }
@@ -54,42 +54,48 @@ describe('tet-news-card-list', () => {
54
54
  initialscrollamount="0"
55
55
  withcontrols="" withoverflowopacity="" exportparts="card-list, card-list-container" part="card-list-component">
56
56
  <div class="tet-news-card" part="card-list-item">
57
- <div class="tet-news-card__image__container">
58
- <a class="tet-news-card__image" data-index="0" href="#" target="_blank">
59
- <img alt="Alt text" src="https://picsum.photos/seed/1/700/560">
60
- </a>
61
- </div>
62
- <span class="tet-news-card__date">13.10.1992</span><span class="tet-news-card__title">Test title 1</span>
63
- <span class="tet-news-card__divider"></span>
64
- <a data-index="0" class="tet-news-card__link" href="#" target="_blank">
65
- <span class="tet-news-card__underline">Redirect</span>
66
- <tet-icon class="tet-news-card__link-icon" name="chevron-right"></tet-icon>
57
+ <a data-index="0" class="tet-news-card__link-container" href="#" target="_blank" tabindex="0">
58
+ <div class="tet-news-card__image__container">
59
+ <div class="tet-news-card__image">
60
+ <img alt="Alt text" src="https://picsum.photos/seed/1/700/560">
61
+ </div>
62
+ </div>
63
+ <span class="tet-news-card__date">13.10.1992</span><span class="tet-news-card__title">Test title 1</span>
64
+ <span class="tet-news-card__divider"></span>
65
+ <div class="tet-news-card__link">
66
+ <span class="tet-news-card__underline">Redirect</span>
67
+ <tet-icon class="tet-news-card__link-icon" name="chevron-right"></tet-icon>
68
+ </div>
67
69
  </a>
68
70
  </div>
69
71
  <div class="tet-news-card" part="card-list-item">
70
- <div class="tet-news-card__image__container">
71
- <a class="tet-news-card__image" data-index="1" href="#" target="">
72
- <img alt="" src="https://picsum.photos/seed/2/350/280">
73
- </a>
74
- </div>
75
- <span class="tet-news-card__date">13.10.1992</span><span class="tet-news-card__title">Test title 2</span>
76
- <span class="tet-news-card__divider"></span>
77
- <a data-index="1" class="tet-news-card__link" href="#" target="">
78
- <span class="tet-news-card__underline">Redirect</span>
79
- <tet-icon class="tet-news-card__link-icon" name="chevron-right"></tet-icon>
72
+ <a data-index="1" class="tet-news-card__link-container" href="#" target="" tabindex="0">
73
+ <div class="tet-news-card__image__container">
74
+ <div class="tet-news-card__image" >
75
+ <img alt="" src="https://picsum.photos/seed/2/350/280">
76
+ </div>
77
+ </div>
78
+ <span class="tet-news-card__date">13.10.1992</span><span class="tet-news-card__title">Test title 2</span>
79
+ <span class="tet-news-card__divider"></span>
80
+ <div class="tet-news-card__link">
81
+ <span class="tet-news-card__underline">Redirect</span>
82
+ <tet-icon class="tet-news-card__link-icon" name="chevron-right"></tet-icon>
83
+ </div>
80
84
  </a>
81
85
  </div>
82
86
  <div class="tet-news-card" part="card-list-item">
87
+ <a data-index="2" class="tet-news-card__link-container" href="#" target="" tabindex="0">
83
88
  <div class="tet-news-card__image__container">
84
- <a class="tet-news-card__image" data-index="2" href="#" target="">
89
+ <div class="tet-news-card__image" >
85
90
  <img alt="" src="https://picsum.photos/seed/3/350/280">
86
- </a>
91
+ </div>
87
92
  </div>
88
93
  <span class="tet-news-card__date">13.10.1992</span><span class="tet-news-card__title">Test title 3</span>
89
94
  <span class="tet-news-card__divider"></span>
90
- <a data-index="2" class="tet-news-card__link" href="#" target="">
95
+ <div class="tet-news-card__link">
91
96
  <span class="tet-news-card__underline">Redirect</span>
92
97
  <tet-icon class="tet-news-card__link-icon" name="chevron-right"></tet-icon>
98
+ </div>
93
99
  </a>
94
100
  </div>
95
101
  </tet-card-list>
@@ -442,6 +442,14 @@ tet-card-list {
442
442
  .hover .tet-news-card__link {
443
443
  color: rgb(10, 11, 13);
444
444
  }
445
+ .tet-news-card__link-container {
446
+ display: flex;
447
+ flex-direction: column;
448
+ text-decoration: none;
449
+ font: 400 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif";
450
+ color: rgb(10, 11, 13);
451
+ height: 100%;
452
+ }
445
453
  .tet-news-card__link-icon {
446
454
  --icon-size: 1rem;
447
455
  --icon-color: rgb(153, 160, 174);
@@ -37,7 +37,7 @@ export class TetNewsCardList {
37
37
  */
38
38
  this.renderListCard = (item, index) => {
39
39
  var _a;
40
- return (h("div", { class: "tet-news-card", part: "card-list-item" }, h("div", { class: "tet-news-card__image__container" }, h("a", { "data-index": index, href: item.redirectHref, target: item.redirectNewTab ? '_blank' : '', class: "tet-news-card__image", onMouseDown: this.disableImageEvents, onMouseOver: this.handleCardMouseOver, onMouseLeave: this.handleCardMouseLeave, onClick: item.clickCallback }, h("img", { src: item.imageSrc, alt: (_a = item.imageAlt) !== null && _a !== void 0 ? _a : '' }))), item.date && h("span", { class: "tet-news-card__date" }, item.date), h("span", { class: "tet-news-card__title" }, item.title), h("span", { class: "tet-news-card__divider" }), h("a", { "data-index": index, class: "tet-news-card__link", href: item.redirectHref, onMouseOver: this.handleCardMouseOver, onMouseLeave: this.handleCardMouseLeave, target: item.redirectNewTab ? '_blank' : '', onClick: item.clickCallback }, h("span", { class: "tet-news-card__underline" }, item.redirectText), ' ', h("tet-icon", { class: "tet-news-card__link-icon", name: "chevron-right" }))));
40
+ return (h("div", { class: "tet-news-card", part: "card-list-item" }, h("a", { class: "tet-news-card__link-container", "data-index": index, href: item.redirectHref, target: item.redirectNewTab ? '_blank' : '', onMouseOver: this.handleCardMouseOver, onMouseLeave: this.handleCardMouseLeave, onClick: item.clickCallback, tabIndex: 0 }, h("div", { class: "tet-news-card__image__container" }, h("div", { class: "tet-news-card__image", onMouseDown: this.disableImageEvents }, h("img", { src: item.imageSrc, alt: (_a = item.imageAlt) !== null && _a !== void 0 ? _a : '' }))), item.date && h("span", { class: "tet-news-card__date" }, item.date), h("span", { class: "tet-news-card__title" }, item.title), h("span", { class: "tet-news-card__divider" }), h("div", { class: "tet-news-card__link" }, h("span", { class: "tet-news-card__underline" }, item.redirectText), ' ', h("tet-icon", { class: "tet-news-card__link-icon", name: "chevron-right" })))));
41
41
  };
42
42
  this.items = [];
43
43
  this.withControls = true;
@@ -61,7 +61,7 @@ export class TetNewsCardList {
61
61
  scrollFullWidth,
62
62
  controlScrollAmount,
63
63
  };
64
- return (h(Host, { key: '5156be1b2616ec625edff50f195f4ef9b3ffc906' }, h("tet-card-list", Object.assign({ key: '659800d9b0bbbafb0435a80bead740d9dbe98bd4', part: "card-list-component", exportparts: "card-list, card-list-container", withOverflowOpacity: true }, props), this.items.map((item, index) => this.renderListCard(item, index)))));
64
+ return (h(Host, { key: 'e5c27006fc39eb5032940928d8962bc9663ec0bf' }, h("tet-card-list", Object.assign({ key: '57ae72acde66ef611444da732ff1e10e1b924845', part: "card-list-component", exportparts: "card-list, card-list-container", withOverflowOpacity: true }, props), this.items.map((item, index) => this.renderListCard(item, index)))));
65
65
  }
66
66
  static get is() { return "tet-news-card-list"; }
67
67
  static get encapsulation() { return "shadow"; }
@@ -9,7 +9,7 @@ describe('tet-table', () => {
9
9
  });
10
10
  expect(page.root).toEqualHtml(`
11
11
  <tet-table>
12
- <table class="table">
12
+ <table class="table light">
13
13
  <thead>
14
14
  <tr>
15
15
  <th scope="col" colspan="1"></th>
@@ -28,7 +28,7 @@ describe('tet-table', () => {
28
28
  });
29
29
  expect(page.root).toEqualHtml(`
30
30
  <tet-table caption="Table caption">
31
- <table class="table">
31
+ <table class="table light">
32
32
  <caption>Table caption</caption>
33
33
  <thead>
34
34
  <tr>
@@ -41,7 +41,7 @@ describe('tet-table', () => {
41
41
  </tet-table>
42
42
  `);
43
43
  });
44
- it('renders table data', async () => {
44
+ it('renders table data with dark theme', async () => {
45
45
  const tableData = {
46
46
  columns: ['Header 1', 'Header 2'],
47
47
  rows: [
@@ -57,11 +57,11 @@ describe('tet-table', () => {
57
57
  };
58
58
  const page = await newSpecPage({
59
59
  components: [TetTable],
60
- template: () => (h("tet-table", { "table-header": "Table Header", tableData: tableData })),
60
+ template: () => (h("tet-table", { "table-header": "Table Header", tableData: tableData, theme: "dark" })),
61
61
  });
62
62
  expect(page.root).toEqualHtml(`
63
63
  <tet-table table-header="Table Header">
64
- <table class="table">
64
+ <table class="table dark">
65
65
  <thead>
66
66
  <tr>
67
67
  <th scope="col" colspan="1">Table Header</th>
@@ -85,7 +85,7 @@ describe('tet-table', () => {
85
85
  </tbody>
86
86
  </table>
87
87
  <div class="mobile-table-wrapper">
88
- <table class="mobile-table">
88
+ <table class="mobile-table dark">
89
89
  <thead>
90
90
  <tr>
91
91
  <th colspan="2" scope="col">
@@ -104,7 +104,7 @@ describe('tet-table', () => {
104
104
  </tr>
105
105
  </tbody>
106
106
  </table>
107
- <table class="mobile-table">
107
+ <table class="mobile-table dark">
108
108
  <thead>
109
109
  <tr>
110
110
  <th colspan="2" scope="col">
@@ -135,7 +135,7 @@ describe('tet-table', () => {
135
135
  expect(page.root).toEqualHtml(`
136
136
  <tet-table table-header="Table Header">
137
137
  <template></template>
138
- <table class="table">
138
+ <table class="table light">
139
139
  <thead>
140
140
  <tr>
141
141
  <th scope="col" colspan="1">Table Header</th>
@@ -159,7 +159,7 @@ describe('tet-table', () => {
159
159
  </tbody>
160
160
  </table>
161
161
  <div class="mobile-table-wrapper">
162
- <table class="mobile-table">
162
+ <table class="mobile-table light">
163
163
  <thead>
164
164
  <tr>
165
165
  <th colspan="2" scope="col">
@@ -178,7 +178,7 @@ describe('tet-table', () => {
178
178
  </tr>
179
179
  </tbody>
180
180
  </table>
181
- <table class="mobile-table">
181
+ <table class="mobile-table light">
182
182
  <thead>
183
183
  <tr>
184
184
  <th colspan="2" scope="col">