@avakhula/ui 0.0.349 → 0.0.351

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.349",
3
+ "version": "0.0.351",
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,11 +1,12 @@
1
1
  <template>
2
- <ib-select :options="opt">
2
+ <ib-select :options="opt" :is-multiple="false"
3
+ :show-clear-button="false" :style="{ width: '400px' }">
3
4
  <template v-slot:triggerContent="{ selectedCount }">
4
5
  {{ selectedCount }}
5
6
  </template>
6
7
  </ib-select>
7
8
 
8
- <ib-toggle :disabled="true"></ib-toggle>
9
+ <ib-phone-input></ib-phone-input>
9
10
 
10
11
 
11
12
  </template>
@@ -16,121 +17,48 @@ import label from "@/components/Form/Label/Label.vue";
16
17
  import {IbCheckboxGroup} from "./index.js";
17
18
  import {IbRadio} from "./index.js";
18
19
  import IbToggle from "@/components/Form/Toggle/Toggle.vue";
20
+ import {IbPhoneInput} from "./index.js";
19
21
  const testData1 = [
20
22
  {
21
- id: "1",
22
- title: "A Education",
23
- is_category: true,
24
- initiallyVisible: true,
25
- visible: true,
26
- isDisabled: true,
27
- checked: false,
28
- isChildrenVisible: false,
29
- },
30
- {
31
- id: "2",
32
- title: "Education 2",
33
- is_category: true,
34
- initiallyVisible: true,
35
- visible: true,
36
- isDisabled: true,
37
- checked: false,
38
- isChildrenVisible: true,
39
- },
40
- {
41
- id: "3",
42
- title: "Education 3",
43
- is_category: true,
44
- initiallyVisible: true,
45
- visible: true,
46
- isDisabled: false,
47
- checked: false,
48
- isChildrenVisible: true,
49
- },
50
- {
51
- id: "4",
52
- title: "Education 4",
53
- is_category: true,
54
- initiallyVisible: true,
55
- visible: true,
56
- isDisabled: false,
57
- checked: false,
58
- isChildrenVisible: true,
59
- },
60
- {
61
- id: "5",
62
- title: "Education 5",
63
- is_category: true,
64
- initiallyVisible: true,
65
- visible: true,
66
- isDisabled: true,
67
- checked: false,
68
- isChildrenVisible: true,
69
- },
70
-
71
- {
72
- id: "6",
73
- title: "Education 6",
74
- is_category: true,
75
- initiallyVisible: true,
76
- visible: true,
23
+ disable: false,
24
+ active: false,
25
+ id: "2024-06-12 23:59:59.999999",
26
+ title: "One Day",
77
27
  isDisabled: false,
78
- checked: false,
79
- isChildrenVisible: true,
28
+ showTooltipByDefault: true
80
29
  },
81
-
82
30
  {
83
- id: "7",
84
- title: "Education 7",
85
- is_category: true,
86
- initiallyVisible: true,
87
- visible: true,
88
- isDisabled: false,
89
- checked: false,
90
- isChildrenVisible: true,
31
+ disable: false,
32
+ active: false,
33
+ id: "2024-06-18 23:59:59.999999",
34
+ title: "One Week",
35
+ isDisabled: false
91
36
  },
92
-
93
37
  {
94
- id: "8",
95
- title: "Education 8",
96
- is_category: true,
97
- initiallyVisible: true,
98
- visible: true,
99
- isDisabled: false,
100
- checked: false,
101
- isChildrenVisible: true,
38
+ disable: false,
39
+ active: false,
40
+ id: "2024-06-25 23:59:59.999999",
41
+ title: "Two Weeks",
42
+ isDisabled: true
102
43
  },
103
44
  {
104
- id: "9",
105
- title: "Education 9",
106
- is_category: true,
107
- initiallyVisible: true,
108
- visible: true,
109
- isDisabled: false,
110
- checked: false,
111
- isChildrenVisible: true,
112
- },
113
- {
114
- id: "10",
115
- title: "Education 10",
116
- is_category: true,
117
- initiallyVisible: true,
118
- visible: true,
119
- isDisabled: false,
120
- checked: false,
121
- isChildrenVisible: true,
45
+ disable: false,
46
+ active: false,
47
+ id: "2024-07-11 23:59:59.999999",
48
+ title: "One Month",
49
+ isDisabled: true,
50
+ disableTooltip: 'disable 123',
51
+ showTooltipByDefault: true
122
52
  },
123
53
  {
124
- id: "11",
125
- title: "Education 11",
126
- is_category: true,
127
- initiallyVisible: true,
128
- visible: true,
54
+ disable: false,
55
+ active: true,
56
+ id: "2025-02-01 23:59:59.999999",
57
+ title: "All Time",
129
58
  isDisabled: true,
130
- checked: false,
131
- isChildrenVisible: true,
132
- },
133
- ];
59
+ disableTooltip: 'disable 123'
60
+ }
61
+ ]
134
62
  export default {
135
63
  computed: {
136
64
  label() {
@@ -143,6 +71,6 @@ export default {
143
71
  checked: '1'
144
72
  }
145
73
  },
146
- components: {IbToggle, IbSelect, IbCheckboxGroup, IbRadio}
74
+ components: {IbToggle, IbSelect, IbCheckboxGroup, IbRadio, IbPhoneInput}
147
75
  }
148
76
  </script>
@@ -30,7 +30,7 @@
30
30
  @click="clearInput"
31
31
  @keypress.enter="clearInput"
32
32
  v-if="type !== 'password' && showClearButton"
33
- v-show="actualValue?.length"
33
+ v-show="actualValue?.toString().length"
34
34
  >
35
35
  <ib-icon name="close-outline"></ib-icon>
36
36
  </ib-icon-button>
@@ -83,11 +83,15 @@ export default {
83
83
  this.vueTel.choose(value);
84
84
  });
85
85
 
86
- if (!this.phone || this.phone.length - 1 < this.dialCode.length) {
87
- this.phone = "+" + data.dialCode;
88
- } else if (this.dialCode) {
89
- this.phone = this.phone.replace(this.dialCode, data.dialCode);
90
- }
86
+ this.phone = "+" + data.dialCode;
87
+
88
+ // if (!this.phone || this.phone.length - 1 < this.dialCode.length) {
89
+ // console.log('1')
90
+ // this.phone = "+" + data.dialCode;
91
+ // } else if (this.dialCode) {
92
+ // console.log(2)
93
+ // this.phone = this.phone.replace(this.dialCode, data.dialCode);
94
+ // }
91
95
  this.dialCode = data.dialCode;
92
96
  },
93
97
  clickOutside() {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <li>
3
3
  <div
4
- v-tooltip="showTooltip ? option.title : ''"
4
+ v-tooltip="showTooltip ? (option.isDisabled ? option.disableTooltip : option.title) : ''"
5
5
  class="tree-select-option"
6
6
  tabindex="0"
7
7
  role="option"
@@ -174,10 +174,16 @@ export default {
174
174
  if (this.option.hasOwnProperty("children") && this.option.children) {
175
175
  this.checkParent();
176
176
  }
177
+
178
+ if(this.option.showTooltipByDefault) {
179
+ this.showTooltip = true;
180
+ }
177
181
  },
178
182
  updated() {
179
183
  this.$nextTick(() => {
180
- if (multiLineOverflows(this.$el.querySelector(".option-label"))) {
184
+ if(this.option.showTooltipByDefault) {
185
+ this.showTooltip = true;
186
+ } else if (multiLineOverflows(this.$el.querySelector(".option-label"))) {
181
187
  this.showTooltip = true;
182
188
  }
183
189
  });