@avakhula/ui 0.0.168 → 0.0.170

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.168",
3
+ "version": "0.0.170",
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,33 +1,59 @@
1
1
  <template>
2
- <ib-select is-toggle :options="roles" @input="changeRole" :value="roles.map(role => role.id)">
2
+ <div class="hello">
3
+ <div v-for="item in items" :key="item.id">
4
+ {{ item.name }}
3
5
 
4
- <template v-slot:trigger="{ selectedCount }">
5
- <ib-button kind="tertiary">
6
- Org Role ({{ roles.length - selectedCount }} hidden)
7
- <ib-icon style="paddingLeft: 5px" name="chevron-down-outline"></ib-icon>
8
- </ib-button>
9
- </template>
10
- </ib-select>
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 IbSelect from "./components/TreeSelect/Select.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 {
16
20
  data() {
17
21
  return {
18
- roles: [{ "id": 1, "title": "ALL Access", "checked": true, "initiallyVisible": true, "visible": true, "isDisabled": false }, { "id": 2, "title": "Manager", "checked": true, "initiallyVisible": true, "visible": true, "isDisabled": false }, { "id": 3, "title": "Department Chair", "checked": true, "initiallyVisible": true, "visible": true, "isDisabled": false }, { "id": 4, "title": "test role", "checked": true, "initiallyVisible": true, "visible": true, "isDisabled": false }]
19
- }
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
+ };
20
30
  },
21
31
  methods: {
22
- changeRole(a) {
23
- setTimeout(() => {
24
- console.log(a)
25
-
26
- })
27
- }
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
28
40
  },
29
41
  components: {
30
- IbSelect
42
+ IbIconButton,
43
+ IbIcon
31
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);
32
58
  }
33
- </script>
59
+ </style>
@@ -14,6 +14,7 @@
14
14
  @input="onInput($event)"
15
15
  @blur="onBlur($event)"
16
16
  @focus="onFocus($event)"
17
+ @change="onChange($event)"
17
18
  />
18
19
 
19
20
  <ib-icon v-if="showIcon" class="icon-search" name="search-outline" />
@@ -21,7 +22,7 @@
21
22
  <ib-icon-button
22
23
  kind="ghost"
23
24
  class="button-clear"
24
- :disabled="readonly"
25
+ :disabled="readonly || disabled"
25
26
  :help-text="clearButtonMessage"
26
27
  prevent-default
27
28
  type="button"
@@ -37,7 +38,7 @@
37
38
  class="toggle-password"
38
39
  prevent-default
39
40
  type="button"
40
- :disabled="readonly"
41
+ :disabled="readonly || disabled"
41
42
  :help-text="showPassword ? hidePasswordMessage : showPasswordMessage"
42
43
  @click.prevent="toggleShowPassword"
43
44
  v-if="actualValue?.length && type === 'password'"
@@ -195,6 +196,9 @@ export default {
195
196
  this.$emit("input", this.actualValue);
196
197
  }
197
198
  },
199
+ onChange(event) {
200
+ console.log('test', event, this.name)
201
+ },
198
202
  delayedInput(value) {
199
203
  if (this.timer) {
200
204
  clearTimeout(this.timer);
@@ -241,7 +245,7 @@ export default {
241
245
  this.actualValue = newVal;
242
246
  },
243
247
  disabled(val) {
244
- // this.$globalEvents.$emit(`label:disabled:${this.id}`, val);
248
+ this.$globalEvents.$emit(`label:disabled:${this.id}`, val);
245
249
  },
246
250
  },
247
251
  emits: [
@@ -249,7 +253,7 @@ export default {
249
253
  "blur",
250
254
  "focus",
251
255
  "update:modelValue",
252
- // `label:disabled:${this.id}`,
256
+ `label:disabled:${this?.id}`,
253
257
  ],
254
258
  components: {
255
259
  IbAlert,
@@ -105,6 +105,15 @@ $input-border-error-color: $red-800;
105
105
  background-color: $input-disabled-bg;
106
106
  border-bottom-color: $input-disabled-border-color;
107
107
 
108
+ &::-ms-reveal {
109
+ display: none;
110
+ }
111
+
112
+ &:-webkit-autofill {
113
+ color: $input-disabled-color;
114
+ background-color: $input-disabled-bg;
115
+ }
116
+
108
117
  &::placeholder {
109
118
  color: $input-disabled-placeholder-color;
110
119
  }