@avakhula/ui 0.0.175 → 0.0.177

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.175",
3
+ "version": "0.0.177",
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,20 +1,59 @@
1
-
2
1
  <template>
3
- <form>
4
- <!-- <ib-input required autofocus type="email" id="email" name="email" ref="email" /> -->
5
- <ib-input name="password" type="password" />
2
+ <div class="hello">
3
+ <div v-for="item in items" :key="item.id">
4
+ {{ item.name }}
6
5
 
7
- <input type="text" name="username" />
8
- <input type="password" name="password" />
9
- <input type="submit" name="Login">
10
- </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>
11
11
  </template>
12
12
 
13
13
  <script>
14
- 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"
15
19
  export default {
20
+ data() {
21
+ return {
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
+ ],
29
+ };
30
+ },
31
+ methods: {
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
40
+ },
16
41
  components: {
17
- IbInput
42
+ IbIconButton,
43
+ IbIcon
18
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);
19
58
  }
20
- </script>
59
+ </style>
@@ -160,6 +160,7 @@ $disabled-btn-color: $neutral-500;
160
160
  &.ib-btn-link,
161
161
  &:disabled {
162
162
  background: $ghost-btn-disabled-background;
163
+ border-color: transparent;
163
164
  }
164
165
  }
165
166
  }
@@ -102,26 +102,29 @@ $input-border-error-color: $red-800;
102
102
 
103
103
  &:-webkit-autofill {
104
104
  & + .button-clear {
105
- display: block!important;
105
+ display: flex!important;
106
106
  }
107
107
 
108
108
  & + .toggle-password{
109
- display: block!important;
109
+ display: flex!important;
110
110
  }
111
111
  }
112
112
 
113
+ &::-ms-reveal {
114
+ display: none;
115
+ }
116
+
113
117
  &:disabled {
114
118
  color: $input-disabled-color;
115
119
  background-color: $input-disabled-bg;
116
120
  border-bottom-color: $input-disabled-border-color;
117
121
 
118
- &::-ms-reveal {
119
- display: none;
120
- }
121
-
122
- &:-webkit-autofill {
123
- color: $input-disabled-color;
124
- background-color: $input-disabled-bg;
122
+ &:-webkit-autofill,
123
+ &:-webkit-autofill:hover,
124
+ &:-webkit-autofill:focus,
125
+ &:-webkit-autofill:active {
126
+ -webkit-box-shadow: 0 0 0 30px $input-disabled-bg inset !important;
127
+ -webkit-text-fill-color: $input-disabled-color;
125
128
  }
126
129
 
127
130
  &::placeholder {
@@ -143,6 +146,11 @@ $input-border-error-color: $red-800;
143
146
  border-radius: 4px;
144
147
  border-color: transparent;
145
148
  @include outline(-2px, $input-border-error-color);
149
+
150
+ &:focus {
151
+ border-bottom: 0px;
152
+ @include focus(-2px);
153
+ }
146
154
  }
147
155
  }
148
156
  }
@@ -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
 
@@ -6,8 +6,7 @@
6
6
  :kind="kind"
7
7
  :disabled="disabled"
8
8
  :prevent-default="preventDefault"
9
- >
10
- <!-- :tabindex="disabledFocus ? -1 : 0" -->
9
+ >
11
10
  <slot></slot>
12
11
  <ib-tooltip v-if="helpText.length" :text="helpText" />
13
12
  </ib-button>
@@ -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;