classcard-ui 0.2.577 → 0.2.581

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.577",
3
+ "version": "0.2.581",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -14,7 +14,7 @@
14
14
  </option>
15
15
  </select>
16
16
  <div>
17
- <slot :name="tabPanelSlotName"></slot>
17
+ <slot :name="`tab-panel-${this.activeTab}`"></slot>
18
18
  </div>
19
19
  </div>
20
20
  <div class="hidden lg:block">
@@ -24,11 +24,6 @@
24
24
  v-for="tab in tabs"
25
25
  :key="tab.text"
26
26
  @click="switchTab(tab.name)"
27
- :class="
28
- activeTab == tab.name
29
- ? 'border-indigo-600 text-indigo-700 hover:text-indigo-800'
30
- : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'
31
- "
32
27
  class="group inline-flex cursor-pointer items-center whitespace-nowrap border-b-2 py-4 px-1 text-sm font-medium"
33
28
  >
34
29
  <c-icon
@@ -36,26 +31,18 @@
36
31
  :name="tab.icon"
37
32
  class="-ml-0.5 mr-2 h-5 w-5"
38
33
  type="solid"
39
- :class="
40
- activeTab == tab.name
41
- ? 'text-indigo-700 group-hover:text-indigo-800'
42
- : 'text-gray-400 group-hover:text-gray-500 '
43
- "
44
34
  ></c-icon>
45
35
  <span
46
- :class="
47
- activeTab == tab.name
48
- ? 'text-indigo-700'
49
- : 'text-gray-500 hover:text-gray-700'
50
- "
51
36
  >
52
37
  <slot :name="tabHeadSlotName(tab.text)"></slot>{{ tab.text }}
53
38
  </span>
54
39
  </a>
55
40
  </nav>
56
41
  </div>
42
+ {{activeTab}}
57
43
  <div v-for="(tab, index) in tabs" :key="index">
58
- <div v-show="tab.name == activeTab">
44
+ <!-- <div v-show="tab.name == activeTab"> -->
45
+ <div>
59
46
  <slot :name="`tab-panel-${tab.name}`"></slot>
60
47
  </div>
61
48
  </div>
@@ -85,15 +72,10 @@ export default {
85
72
  activeTab: this.initialTab,
86
73
  };
87
74
  },
88
- computed: {
89
- tabPanelSlotName() {
90
- return `tab-panel-${this.activeTab}`;
91
- },
92
- },
93
75
  methods: {
94
76
  switchTab(tabText) {
95
- let tabSelected = tabText;
96
- this.activeTab = tabSelected;
77
+ console.log(tabText);
78
+ this.activeTab = tabText;
97
79
  },
98
80
  switchTabForMobile(index) {
99
81
  var selectedOption = this.tabs[index];
@@ -16,7 +16,7 @@ export default {
16
16
  const Template = (args, { argTypes }) => ({
17
17
  props: Object.keys(argTypes),
18
18
  components: { CTabs },
19
- template: '<c-tabs v-bind="$props" />',
19
+ template: '<c-tabs v-bind="$props"><template slot="tab-panel-url">url panel</template><template slot="tab-panel-mobile-app">app panel</template><template slot="tab-panel-preferences">preferences panel</template></c-tabs>',
20
20
  });
21
21
 
22
22
  export const Default = Template.bind({});