@avakhula/ui 0.0.176 → 0.0.178

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.176",
3
+ "version": "0.0.178",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
package/src/App.vue CHANGED
@@ -1,32 +1,59 @@
1
-
2
1
  <template>
3
- <form>
4
- <ib-input name="password" type="password" />
5
- <ib-input :disabled="test" name="username" type="email" />
6
-
7
- <!-- <input type="text" name="username" />
8
- <input type="password" name="password" />
9
- <input type="submit" name="Login"> -->
2
+ <div class="hello">
3
+ <div v-for="item in items" :key="item.id">
4
+ {{ item.name }}
10
5
 
11
- <button type="button" @click="test = true">Disabled</button>
12
- </form>
6
+ <ib-icon-button @click="deleteItem(item.id)" v-tooltip="'DELETE'">
7
+ <ib-icon name="close-outline" />
8
+ </ib-icon-button>
9
+ </div>
10
+ </div>
13
11
  </template>
14
12
 
15
13
  <script>
16
- import IbInput from "./components/Form/Input/input.vue";
14
+ import { TextOverflowTooltipDirective as TextOverflowTooltip } from "./directives/tooltip/textOverflowTooltip";
15
+ import { TooltipDirective as Tooltip } from "./directives/tooltip/tooltip";
16
+
17
+ import IbIconButton from "./components/IconButton/IconButton.vue";
18
+ import IbIcon from "./components/Icon.vue"
17
19
  export default {
18
20
  data() {
19
21
  return {
20
- test: false,
22
+ items: [
23
+ { id: 1, name: "Item 1" },
24
+ { id: 2, name: "Item 2" },
25
+ { id: 3, name: "Item 3" },
26
+ { id: 4, name: "Item 4" },
27
+ { id: 5, name: "Item 5" },
28
+ ],
21
29
  };
22
30
  },
23
31
  methods: {
24
- test1() {
25
- console.log('dissabled')
26
- }
32
+ deleteItem(id) {
33
+ const idx = this.items.findIndex((item) => item.id === id);
34
+ this.items.splice(idx, 1);
35
+ },
36
+ },
37
+ directives: {
38
+ TextOverflowTooltip,
39
+ Tooltip
27
40
  },
28
41
  components: {
29
- IbInput
42
+ IbIconButton,
43
+ IbIcon
30
44
  }
45
+ };
46
+ </script>
47
+
48
+ <style lang="scss">
49
+ @import "./assets/scss/mixins.scss";
50
+
51
+ .hello {
52
+ padding: 200px;
53
+ }
54
+
55
+ .test {
56
+ max-width: 20px;
57
+ @include lineClamp(1);
31
58
  }
32
- </script>
59
+ </style>
@@ -8,6 +8,7 @@
8
8
  size="xs"
9
9
  class="info-button"
10
10
  kind="ghost"
11
+ type="button"
11
12
  >
12
13
  <ib-icon name="information-circle-outline" />
13
14
 
@@ -21,6 +21,7 @@
21
21
  tabindex="0"
22
22
  class="tree-choice"
23
23
  @click.prevent
24
+ @blur="() => $emit('blur')"
24
25
  :aria-label="ariaLabel"
25
26
  :aria-expanded="isOpened"
26
27
  :class="{
@@ -387,7 +388,15 @@ export default {
387
388
  default: false,
388
389
  },
389
390
  },
390
- emits: ["close", "input", "search", "resize", "submit", "update:modelValue"],
391
+ emits: [
392
+ "close",
393
+ "input",
394
+ "blur",
395
+ "search",
396
+ "resize",
397
+ "submit",
398
+ "update:modelValue",
399
+ ],
391
400
  watch: {
392
401
  value(value) {
393
402
  this.val = value;
@@ -845,6 +854,7 @@ export default {
845
854
  } else {
846
855
  this.$emit("close", Object.keys(this.selected)[0]);
847
856
  }
857
+ this.$emit("blur");
848
858
  },
849
859
  },
850
860
  computed: {