mediacube-ui 0.1.265 → 0.1.267

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.267](https://github.com/MediaCubeCo/mcui/compare/v0.1.266...v0.1.267) (2024-05-17)
6
+
7
+ ### [0.1.266](https://github.com/MediaCubeCo/mcui/compare/v0.1.265...v0.1.266) (2024-05-16)
8
+
5
9
  ### [0.1.265](https://github.com/MediaCubeCo/mcui/compare/v0.1.264...v0.1.265) (2024-05-15)
6
10
 
7
11
  ### [0.1.264](https://github.com/MediaCubeCo/mcui/compare/v0.1.263...v0.1.264) (2024-05-03)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui",
3
- "version": "0.1.265",
3
+ "version": "0.1.267",
4
4
  "description": "Design system for Mediacube services",
5
5
  "author": "Mediacube",
6
6
  "private": false,
@@ -23,7 +23,7 @@ export default {
23
23
  default: false,
24
24
  },
25
25
  },
26
- render(h, { props, slots, data }) {
26
+ render(h, { props, slots, data, listeners }) {
27
27
  const variation = `${props.variation}${props.modern ? '-modern' : ''}`
28
28
  const classes = {
29
29
  'mc-badge': true,
@@ -74,6 +74,7 @@ export default {
74
74
  {
75
75
  class: classes,
76
76
  style,
77
+ on: listeners,
77
78
  },
78
79
  [
79
80
  h(
@@ -65,7 +65,7 @@ export default {
65
65
  }
66
66
  },
67
67
  {
68
- ...(this.root ? { root: document.querySelector(this.root) } : {}),
68
+ ...(this.root ? { root: this.$el.closest(this.root) } : {}),
69
69
  rootMargin: `${this.overlap}px`,
70
70
  threshold: 0.1,
71
71
  },
@@ -13,7 +13,7 @@
13
13
  <a
14
14
  :aria-controls="tab.hash"
15
15
  :aria-selected="tab.isActive"
16
- :href="tab.to || tab.href || tab.hash"
16
+ :href="getHref(tab)"
17
17
  class="tabs-component-tab-a"
18
18
  role="tab"
19
19
  @click="selectTab(tab.hash, $event)"
@@ -273,6 +273,11 @@ export default {
273
273
 
274
274
  const selectedTab = this.findTab(selectedTabHash)
275
275
 
276
+ if (selectedTab.$listeners && selectedTab.$listeners.click) {
277
+ selectedTab.$emit('click', event)
278
+ return
279
+ }
280
+
276
281
  if (!selectedTab) {
277
282
  return
278
283
  }
@@ -351,6 +356,10 @@ export default {
351
356
  getActiveTabIndex() {
352
357
  return this.getTabIndex(this.activeTabHash)
353
358
  },
359
+
360
+ getHref(tab) {
361
+ return tab.$listeners.click ? null : tab.to || tab.href || tab.hash
362
+ },
354
363
  },
355
364
  }
356
365
  </script>
@@ -492,6 +501,7 @@ export default {
492
501
  text-decoration: none;
493
502
  padding-bottom: $space-150;
494
503
  margin: 0 $space-150;
504
+ cursor: pointer;
495
505
 
496
506
  @include child-indent-right($space-50);
497
507
  @include border();