classcard-ui 0.2.716 → 0.2.718

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.716",
3
+ "version": "0.2.718",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -21,6 +21,7 @@
21
21
  :name="icon.name"
22
22
  :type="icon.type"
23
23
  :class="icon.class"
24
+ :cursorType="cursorType"
24
25
  ></c-icon>
25
26
  </button>
26
27
  </div>
@@ -30,28 +31,30 @@
30
31
  class="absolute z-10 mt-2 -mr-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-gray-900 ring-opacity-5"
31
32
  >
32
33
  <div
33
- class="w-max py-2"
34
+ class="w-max py-1"
34
35
  role="menu"
35
36
  aria-orientation="vertical"
36
37
  aria-labelledby="option-menu"
37
38
  >
38
- <a
39
- v-for="(item, index) in items"
40
- v-bind:key="item.text"
41
- @mousedown.stop.prevent="dropdownAction(item)"
42
- class="flex cursor-pointer px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 disabled:pointer-events-none disabled:opacity-50"
43
- :class="item.class"
44
- role="menuitem"
45
- :disabled="item.disabled"
46
- >
47
- <c-icon
48
- v-if="item.icon"
49
- :name="dropdownIcons[index].name"
50
- :type="dropdownIcons[index].type"
51
- :class="dropdownIcons[index].class"
52
- ></c-icon>
53
- {{ item.text }}
54
- </a>
39
+ <div v-for="(item, index) in items" v-bind:key="item.text">
40
+ <a
41
+ @mousedown.stop.prevent="dropdownAction(item)"
42
+ class="flex cursor-pointer px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 disabled:pointer-events-none disabled:opacity-50"
43
+ :class="item.class"
44
+ role="menuitem"
45
+ :disabled="item.disabled"
46
+ >
47
+ <c-icon
48
+ v-if="item.icon"
49
+ :name="dropdownIcons[index].name"
50
+ :type="dropdownIcons[index].type"
51
+ :class="dropdownIcons[index].class"
52
+ :cursorType="cursorType"
53
+ ></c-icon>
54
+ {{ item.text }}
55
+ </a>
56
+ <hr v-if="item.border" class="my-1" />
57
+ </div>
55
58
  </div>
56
59
  </div>
57
60
  </div>
@@ -91,6 +94,10 @@ export default {
91
94
  type: Boolean,
92
95
  default: true,
93
96
  },
97
+ cursorType: {
98
+ type: String,
99
+ default: "cursor-pointer",
100
+ },
94
101
  },
95
102
  data() {
96
103
  return {
@@ -9,7 +9,7 @@ export default {
9
9
  argTypes: {
10
10
  items: { control: { type: "object" } },
11
11
  icon: Object,
12
- dropdownIcons: { type: Array }
12
+ dropdownIcons: { type: Array },
13
13
  },
14
14
  };
15
15
 
@@ -22,19 +22,24 @@ const Template = (args, { argTypes }) => ({
22
22
  export const Default = Template.bind({});
23
23
  Default.args = {
24
24
  items: [
25
- { icon: true, text: "one", action:'alert', class:'hover:bg-red-100 hover:text-red-500 w-56' },
25
+ {
26
+ icon: true,
27
+ text: "one",
28
+ action: "alert",
29
+ class: "hover:bg-red-100 hover:text-red-500 w-56",
30
+ },
26
31
  { text: "two" },
27
32
  ],
28
33
  dropdownIcons: [
29
34
  {
30
- name:'trash',
31
- class:'mr-3 h-5 w-5 text-gray-400 hover:text-red-500',
32
- type:'solid'
33
- }
35
+ name: "trash",
36
+ class: "mr-3 h-5 w-5 text-gray-400 hover:text-red-500",
37
+ type: "solid",
38
+ },
34
39
  ],
35
- icon:{
36
- name:'dots-vertical-solid',
37
- class:'h-5 w-5 text-gray-500',
38
- type:'solid'
39
- }
40
- };
40
+ icon: {
41
+ name: "dots-vertical-solid",
42
+ class: "h-5 w-5 text-gray-500",
43
+ type: "solid",
44
+ },
45
+ };