@avakhula/ui 0.0.174 → 0.0.176

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.174",
3
+ "version": "0.0.176",
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,59 +1,32 @@
1
+
1
2
  <template>
2
- <div class="hello">
3
- <div v-for="item in items" :key="item.id">
4
- {{ item.name }}
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"> -->
5
10
 
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
+ <button type="button" @click="test = true">Disabled</button>
12
+ </form>
11
13
  </template>
12
14
 
13
15
  <script>
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"
16
+ import IbInput from "./components/Form/Input/input.vue";
19
17
  export default {
20
18
  data() {
21
19
  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
- ],
20
+ test: false,
29
21
  };
30
22
  },
31
23
  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
24
+ test1() {
25
+ console.log('dissabled')
26
+ }
40
27
  },
41
28
  components: {
42
- IbIconButton,
43
- IbIcon
29
+ IbInput
44
30
  }
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);
58
31
  }
59
- </style>
32
+ </script>
@@ -90,10 +90,12 @@ export default {
90
90
  this.$refs.content.classList.remove("large");
91
91
  }
92
92
 
93
- if (parseInt(contentStyle.height) > 37 &&
94
- this.showIcon &&
95
- this.title?.length) {
96
- this.$refs.content.classList.add("large");
93
+ if (parseInt(contentStyle.height) > 37 && this.showIcon) {
94
+ if (this.title.length) {
95
+ this.$refs.content.classList.add("large");
96
+ } else {
97
+ this.$refs.content.classList.add("medium");
98
+ }
97
99
  }
98
100
  },
99
101
  },
@@ -97,6 +97,25 @@ $alert-success-secondary-color: $green-50;
97
97
  padding-left: 0;
98
98
  }
99
99
  }
100
+
101
+ &.medium {
102
+ align-items: start;
103
+ padding-left: 3px;
104
+ padding-right: 5px;
105
+
106
+ .text-content {
107
+ @include Ib-P1-regular;
108
+ margin-bottom: 5px;
109
+ padding-left: 0!important;
110
+ }
111
+
112
+ & + .close-button {
113
+ position: absolute;
114
+ right: 10px;
115
+ top: 10px;
116
+ transform: translateY(0);
117
+ }
118
+ }
100
119
  }
101
120
 
102
121
  &.has-icon {
@@ -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
  }
@@ -3,6 +3,8 @@
3
3
  <ib-alert v-if="errorMessage">{{ errorMessage }}</ib-alert>
4
4
 
5
5
  <div class="ib-input-wrapper" :class="{ 'has-settings': hasSettings }">
6
+ <ib-icon v-if="showIcon" class="icon-search" name="search-outline" />
7
+
6
8
  <input
7
9
  v-bind="attrs"
8
10
  v-model="actualValue"
@@ -14,11 +16,8 @@
14
16
  @input="onInput($event)"
15
17
  @blur="onBlur($event)"
16
18
  @focus="onFocus($event)"
17
- @change="onChange($event)"
18
19
  />
19
20
 
20
- <ib-icon v-if="showIcon" class="icon-search" name="search-outline" />
21
-
22
21
  <ib-icon-button
23
22
  kind="ghost"
24
23
  class="button-clear"
@@ -28,7 +27,8 @@
28
27
  type="button"
29
28
  @click="clearInput"
30
29
  @keypress.enter="clearInput"
31
- v-if="actualValue?.length && type !== 'password' && showClearButton"
30
+ v-if="type !== 'password' && showClearButton"
31
+ v-show="actualValue?.length"
32
32
  >
33
33
  <ib-icon name="close-outline"></ib-icon>
34
34
  </ib-icon-button>
@@ -41,7 +41,8 @@
41
41
  :disabled="readonly || disabled"
42
42
  :help-text="showPassword ? hidePasswordMessage : showPasswordMessage"
43
43
  @click.prevent="toggleShowPassword"
44
- v-if="actualValue?.length && type === 'password'"
44
+ v-if="type === 'password'"
45
+ v-show="actualValue?.length"
45
46
  >
46
47
  <ib-icon
47
48
  :name="showPassword ? 'eye-off-outline' : 'eye-outline'"
@@ -83,6 +84,7 @@ import IbDropdown from "../../Dropdown/Dropdown.vue";
83
84
  import { inputTypeOptions } from "./constants";
84
85
  import generateUID from "../../../helpers/generateUID";
85
86
  import removeEvents from "../../../helpers/removeEvents";
87
+
86
88
  import {
87
89
  verticalPosition,
88
90
  horizontalPosition,
@@ -196,10 +198,6 @@ export default {
196
198
  this.$emit("input", this.actualValue);
197
199
  }
198
200
  },
199
- onChange(event) {
200
- this.actualValue = event.target.value;
201
- this.$emit("focus", event.target.value);
202
- },
203
201
  delayedInput(value) {
204
202
  if (this.timer) {
205
203
  clearTimeout(this.timer);
@@ -245,8 +243,8 @@ export default {
245
243
  value(newVal) {
246
244
  this.actualValue = newVal;
247
245
  },
248
- disabled(val) {
249
- this.$globalEvents.$emit(`label:disabled:${this.id}`, val);
246
+ disabled(newVal) {
247
+ this.$globalEvents.$emit(`label:disabled:${this.id}`, newVal);
250
248
  },
251
249
  },
252
250
  emits: [
@@ -83,7 +83,7 @@ $input-border-error-color: $red-800;
83
83
  outline: none;
84
84
  border-bottom: 1px solid $input-border-color;
85
85
  transition: color 0.3s, border-radius 0.3s, border-bottom-color 0.3s,
86
- background-color 0.3s;
86
+ background-color 0.3s;
87
87
 
88
88
  &::placeholder {
89
89
  @include Ib-H4-regular-italic;
@@ -100,18 +100,31 @@ $input-border-error-color: $red-800;
100
100
  }
101
101
  }
102
102
 
103
+ &:-webkit-autofill {
104
+ & + .button-clear {
105
+ display: flex!important;
106
+ }
107
+
108
+ & + .toggle-password{
109
+ display: flex!important;
110
+ }
111
+ }
112
+
113
+ &::-ms-reveal {
114
+ display: none;
115
+ }
116
+
103
117
  &:disabled {
104
118
  color: $input-disabled-color;
105
119
  background-color: $input-disabled-bg;
106
120
  border-bottom-color: $input-disabled-border-color;
107
121
 
108
- &::-ms-reveal {
109
- display: none;
110
- }
111
-
112
- &:-webkit-autofill {
113
- color: $input-disabled-color;
114
- 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;
115
128
  }
116
129
 
117
130
  &::placeholder {
@@ -133,6 +146,11 @@ $input-border-error-color: $red-800;
133
146
  border-radius: 4px;
134
147
  border-color: transparent;
135
148
  @include outline(-2px, $input-border-error-color);
149
+
150
+ &:focus {
151
+ border-bottom: 0px;
152
+ @include focus(-2px);
153
+ }
136
154
  }
137
155
  }
138
156
  }
@@ -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>