classcard-ui 0.2.899 → 0.2.901

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.899",
3
+ "version": "0.2.901",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -4,13 +4,7 @@
4
4
  class="group flex rounded-lg bg-gray-100 p-0.5 hover:bg-gray-200"
5
5
  aria-label="Tabs"
6
6
  >
7
- <button
8
- v-for="(tabOption, index) in tabOptions"
9
- :key="tabOption.label"
10
- x-ref="dates"
11
- class="focus:outline-none flex min-w-0 flex-grow rounded-md focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-100"
12
- :tabindex="currentTab === tabOption.label ? '0' : '-1'"
13
- @keydown.arrow-left="
7
+ <!-- @keydown.arrow-left="
14
8
  $emit(
15
9
  'update-tab',
16
10
  index === 0 ? tabOption.label : tabOptions[index - 1].label
@@ -23,8 +17,14 @@
23
17
  ? tabOptions.find((tab) => tab.label !== tabOption.label).label
24
18
  : tabOptions[index - 1].label
25
19
  )
26
- "
27
- @click="$emit('update-tab', tabOption.label)"
20
+ " -->
21
+ <button
22
+ v-for="(tabOption, index) in tabOptions"
23
+ :key="index"
24
+ x-ref="dates"
25
+ class="focus:outline-none flex min-w-0 flex-grow rounded-md focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-100"
26
+ :tabindex="currentTab === tabOption.label ? '0' : '-1'"
27
+ @click="handleButtonClick(tabOption)"
28
28
  >
29
29
  <span
30
30
  x-show="true"
@@ -47,6 +47,7 @@
47
47
  :viewBox="tabOption.icon.viewBox"
48
48
  ></c-icon>
49
49
  <span
50
+ v-if="tabOption.showLabel"
50
51
  :class="`${
51
52
  currentTab === tabOption.label
52
53
  ? 'text-gray-900'
@@ -76,6 +77,11 @@ export default {
76
77
  type: Array,
77
78
  },
78
79
  },
80
+ methods: {
81
+ handleButtonClick(tabOption) {
82
+ this.$emit("update-tab", tabOption.label);
83
+ },
84
+ },
79
85
  };
80
86
  </script>
81
87