@avakhula/ui 0.0.91 → 0.0.93

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": "@avakhula/ui",
3
- "version": "0.0.91",
3
+ "version": "0.0.93",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -2,6 +2,8 @@
2
2
  <component
3
3
  :is="href.length ? 'a' : 'button'"
4
4
  @click="onClick($event)"
5
+ @mouseenter="onMouseenter"
6
+ @mouseleave="onMouseleave"
5
7
  v-bind="attrs"
6
8
  >
7
9
  <slot name="icon"></slot>
@@ -83,6 +85,12 @@ export default {
83
85
  },
84
86
  },
85
87
  methods: {
88
+ onMouseenter(e) {
89
+ this.$emit("mouseenter", e);
90
+ },
91
+ onMouseleave(e) {
92
+ this.$emit("mouseleave", e);
93
+ },
86
94
  onClick(e) {
87
95
  if (this.preventDefault || this.isDisabled) {
88
96
  e.preventDefault();
@@ -134,7 +142,7 @@ export default {
134
142
  return classList;
135
143
  },
136
144
  attrs() {
137
- const attrsList = { ...removeEvents({ ...this.$attrs }, "onClick") };
145
+ const attrsList = { ...removeEvents({ ...this.$attrs }) };
138
146
 
139
147
  attrsList.class = [...this.classes, attrsList.class];
140
148
  attrsList.disabled = this.isDisabled;
@@ -86,7 +86,7 @@ export default {
86
86
  return classList;
87
87
  },
88
88
  attrs() {
89
- const attrsList = { ...removeEvents({ ...this.$attrs }, "onClick") };
89
+ const attrsList = { ...removeEvents({ ...this.$attrs }) };
90
90
  attrsList.class = [...this.classes, attrsList.class];
91
91
 
92
92
  return attrsList;
@@ -613,6 +613,8 @@ export default {
613
613
  this.allOptionsIsChecked = false;
614
614
  this.countVisibleChildren = 0;
615
615
  this.selected = [];
616
+
617
+ this.option.forEach((opt) => (opt.checked = false));
616
618
  this.$emit("update:modelValue", null);
617
619
  },
618
620
  clearValue() {
@@ -1,11 +1,7 @@
1
- export default function removeEvents(attrList, eventName) {
1
+ export default function removeEvents(attrList) {
2
2
  for (let prop in attrList) {
3
- if (eventName && prop === eventName) {
3
+ if (prop.startsWith("on")) {
4
4
  delete attrList[prop];
5
- } else {
6
- if (prop.startsWith("on")) {
7
- delete attrList[prop];
8
- }
9
5
  }
10
6
  }
11
7