classcard-ui 0.2.327 → 0.2.330

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.327",
3
+ "version": "0.2.330",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -24,9 +24,8 @@
24
24
  >
25
25
  <ul class="py-1" tabindex="-1" role="listbox" aria-labelledby="listbox-label">
26
26
  <li
27
- v-for="(item, index) in items"
27
+ v-for="(item) in items"
28
28
  :key="item.text"
29
- :class="index !== Object.keys(items).length - 1 ? 'border-b border-gray-200' : ''"
30
29
  class="flex px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 cursor-pointer"
31
30
  @mousedown="emitOptionAction(item.action)"
32
31
  >
@@ -7,43 +7,20 @@
7
7
  type="white"
8
8
  @click.stop="toggleDropdown = !toggleDropdown"
9
9
  @blur="close()"
10
- class="
11
- inline-flex
12
- justify-center
13
- w-full
14
- rounded-full
15
- border-none
16
- p-2
17
- focus:outline-none
18
- focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600
19
- "
10
+ class="focus:outline-none inline-flex w-full justify-center rounded-full border-none p-2 focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"
20
11
  aria-haspopup="true"
21
12
  aria-expanded="true"
22
13
  >
23
- <c-icon
24
- :name="icon.name"
25
- :type="icon.type"
26
- :class="icon.class"
27
- ></c-icon>
14
+ <c-icon :name="icon.name" :type="icon.type" :class="icon.class"></c-icon>
28
15
  </button>
29
16
  </div>
30
17
  <div
31
18
  v-show="toggleDropdown"
32
19
  :class="classes"
33
- class="
34
- origin-top-right
35
- z-10
36
- absolute
37
- mt-2
38
- -mr-1
39
- rounded-md
40
- shadow-lg
41
- bg-white
42
- ring-1 ring-gray-900 ring-opacity-5
43
- "
20
+ 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"
44
21
  >
45
22
  <div
46
- class="py-2 w-max"
23
+ class="w-max py-2"
47
24
  role="menu"
48
25
  aria-orientation="vertical"
49
26
  aria-labelledby="option-menu"
@@ -51,25 +28,17 @@
51
28
  <a
52
29
  v-for="(item, index) in items"
53
30
  v-bind:key="item.text"
54
- @mousedown.stop="dropdownAction(item)"
55
- class="
56
- flex
57
- px-4
58
- py-2
59
- text-sm text-gray-700
60
- hover:bg-gray-100
61
- hover:text-gray-900
62
- cursor-pointer
63
- "
31
+ @mousedown.stop.prevent="dropdownAction(item)"
32
+ class="flex cursor-pointer px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900"
64
33
  :class="item.class"
65
34
  role="menuitem"
66
35
  >
67
- <c-icon
68
- v-if="item.icon"
69
- :name="dropdownIcons[index].name"
70
- :type="dropdownIcons[index].type"
71
- :class="dropdownIcons[index].class"
72
- ></c-icon>
36
+ <c-icon
37
+ v-if="item.icon"
38
+ :name="dropdownIcons[index].name"
39
+ :type="dropdownIcons[index].type"
40
+ :class="dropdownIcons[index].class"
41
+ ></c-icon>
73
42
  {{ item.text }}
74
43
  </a>
75
44
  </div>
@@ -23,8 +23,8 @@ const Template = (args, { argTypes }) => ({
23
23
  export const Default = Template.bind({});
24
24
  Default.args = {
25
25
  items: [
26
- { icon: "check", text: "one", action: "first" },
27
- { icon: "check", text: "two", action: "second" },
26
+ { icon: "check", text: "one", action: "first", iconType: "solid" },
27
+ { icon: "check", text: "two", action: "second", iconType: "solid" },
28
28
  ],
29
29
  type: "primary",
30
30
  label: "Button",