@mptw/skylens-ui 1.4.14 → 1.4.15

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.
@@ -7,7 +7,8 @@ li(
7
7
  ref='tabPaneEl'
8
8
  )
9
9
  a(
10
- href="javascript:;"
10
+ href="javascript:;",
11
+ :class='{ disabled: disabled }'
11
12
  ).tab-nav-item-link
12
13
  .tab-nav-item-link-title
13
14
  .inline-flex.items-center.justify-center.w-full.space-x-1
@@ -63,9 +64,13 @@ export default defineComponent({
63
64
  type: Boolean,
64
65
  default: false,
65
66
  },
67
+ disabled: {
68
+ type: Boolean,
69
+ default: false,
70
+ },
66
71
  },
67
72
  setup(props) {
68
- const { order, activeTabBorderColor, single } = toRefs(props);
73
+ const { order, activeTabBorderColor, single, disabled } = toRefs(props);
69
74
 
70
75
  const distributed = inject<{
71
76
  header: boolean;
@@ -98,11 +103,15 @@ export default defineComponent({
98
103
  classes.push("single");
99
104
  }
100
105
 
106
+ if (disabled.value) {
107
+ classes.push("disabled");
108
+ }
109
+
101
110
  return classes.join(" ");
102
111
  });
103
112
 
104
113
  function navClick() {
105
- if (!isActive.value && distributed && distributed.changeTabTo) {
114
+ if (!isActive.value && distributed && distributed.changeTabTo && !disabled.value) {
106
115
  distributed.changeTabTo(index.value || 0);
107
116
  }
108
117
  }
@@ -414,6 +414,10 @@ export default defineComponent({
414
414
  .tab-nav-item-link
415
415
  @apply cursor-default
416
416
 
417
+ &.disabled
418
+ .tab-nav-item-link
419
+ @apply s('text-[#BCBFCF]') cursor-default
420
+
417
421
  &-link
418
422
  @apply relative block px-4 pb-2 text-lg text-gray-2
419
423
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.4.14",
4
+ "version": "1.4.15",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",