@avakhula/ui 0.0.168 → 0.0.169

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.169",
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>
@@ -21,7 +21,7 @@
21
21
  <ib-icon-button
22
22
  kind="ghost"
23
23
  class="button-clear"
24
- :disabled="readonly"
24
+ :disabled="readonly || disabled"
25
25
  :help-text="clearButtonMessage"
26
26
  prevent-default
27
27
  type="button"
@@ -37,7 +37,7 @@
37
37
  class="toggle-password"
38
38
  prevent-default
39
39
  type="button"
40
- :disabled="readonly"
40
+ :disabled="readonly || disabled"
41
41
  :help-text="showPassword ? hidePasswordMessage : showPasswordMessage"
42
42
  @click.prevent="toggleShowPassword"
43
43
  v-if="actualValue?.length && type === 'password'"
@@ -241,7 +241,7 @@ export default {
241
241
  this.actualValue = newVal;
242
242
  },
243
243
  disabled(val) {
244
- // this.$globalEvents.$emit(`label:disabled:${this.id}`, val);
244
+ this.$globalEvents.$emit(`label:disabled:${this.id}`, val);
245
245
  },
246
246
  },
247
247
  emits: [
@@ -249,7 +249,7 @@ export default {
249
249
  "blur",
250
250
  "focus",
251
251
  "update:modelValue",
252
- // `label:disabled:${this.id}`,
252
+ `label:disabled:${this?.id}`,
253
253
  ],
254
254
  components: {
255
255
  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
  }