@avakhula/ui 0.0.288 → 0.0.290
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/dist/index.js +71 -65
- package/dist/index.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Form/Checkbox/Checkbox.scss +14 -10
- package/src/components/Form/Checkbox/Checkbox.vue +8 -1
- package/src/components/TreeSelect/Option.vue +1 -0
- package/src/components/TreeSelect/Select.stories.js +3 -15
- package/src/components/TreeSelect/Select.vue +3 -2
- package/src/components/TreeSelect/TreeSelect.stories.js +0 -34
package/package.json
CHANGED
|
@@ -130,12 +130,13 @@ $checkbox-bg-indeterminate: $blue-800;
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
&.checkbox-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
133
|
+
// &.checkbox-readonly,
|
|
134
|
+
// &.checkbox-disabled {
|
|
135
|
+
// .checkbox-input {
|
|
136
|
+
// background-color: $checkbox-bg-filed-disabled;
|
|
137
|
+
// border-color: $checkbox-border-filed-disabled;
|
|
138
|
+
// }
|
|
139
|
+
// }
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
&.ib-checkbox-indeterminate {
|
|
@@ -165,6 +166,7 @@ $checkbox-bg-indeterminate: $blue-800;
|
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
|
|
169
|
+
&.ib-checkbox-readonly,
|
|
168
170
|
&.ib-checkbox-disabled {
|
|
169
171
|
cursor: not-allowed;
|
|
170
172
|
|
|
@@ -198,10 +200,6 @@ $checkbox-bg-indeterminate: $blue-800;
|
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
|
|
201
|
-
.ib-checkbox-label {
|
|
202
|
-
color: $checkbox-text-color-disabled;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
203
|
&.ib-checkbox-filled,
|
|
206
204
|
&.ib-checkbox-indeterminate{
|
|
207
205
|
.ib-checkbox-input {
|
|
@@ -220,6 +218,12 @@ $checkbox-bg-indeterminate: $blue-800;
|
|
|
220
218
|
}
|
|
221
219
|
}
|
|
222
220
|
}
|
|
221
|
+
|
|
222
|
+
&.ib-checkbox-disabled {
|
|
223
|
+
.ib-checkbox-label {
|
|
224
|
+
color: $checkbox-text-color-disabled;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
223
227
|
}
|
|
224
228
|
|
|
225
229
|
&.ib-has-error {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:checked="checked"
|
|
16
16
|
:disabled="disabled"
|
|
17
17
|
:required="required"
|
|
18
|
-
@click="onChange"
|
|
18
|
+
@click.prevent="onChange"
|
|
19
19
|
/>
|
|
20
20
|
<div class="ib-checkbox-body">
|
|
21
21
|
<span
|
|
@@ -80,6 +80,10 @@ export default {
|
|
|
80
80
|
type: Boolean,
|
|
81
81
|
default: false,
|
|
82
82
|
},
|
|
83
|
+
readonly: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false,
|
|
86
|
+
},
|
|
83
87
|
disabled: {
|
|
84
88
|
type: Boolean,
|
|
85
89
|
default: false,
|
|
@@ -112,6 +116,8 @@ export default {
|
|
|
112
116
|
},
|
|
113
117
|
methods: {
|
|
114
118
|
onChange() {
|
|
119
|
+
if (this.readonly) return;
|
|
120
|
+
|
|
115
121
|
this.checked = !this.checked;
|
|
116
122
|
this.$emit("update:modelValue", this.checked);
|
|
117
123
|
this.$emit("input", this.checked);
|
|
@@ -124,6 +130,7 @@ export default {
|
|
|
124
130
|
"ib-has-error": this.error,
|
|
125
131
|
"ib-checkbox-filled": this.checked,
|
|
126
132
|
"ib-checkbox-disabled": this.disabled,
|
|
133
|
+
"ib-checkbox-readonly": this.readonly,
|
|
127
134
|
"ib-checkbox-indeterminate": this.indeterminate,
|
|
128
135
|
};
|
|
129
136
|
},
|
|
@@ -21,7 +21,7 @@ const testData = [
|
|
|
21
21
|
initiallyVisible: true,
|
|
22
22
|
visible: true,
|
|
23
23
|
isDisabled: false,
|
|
24
|
-
|
|
24
|
+
readonly: true,
|
|
25
25
|
isChildrenVisible: true,
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -31,7 +31,6 @@ const testData = [
|
|
|
31
31
|
initiallyVisible: true,
|
|
32
32
|
visible: true,
|
|
33
33
|
isDisabled: false,
|
|
34
|
-
checked: false,
|
|
35
34
|
isChildrenVisible: true,
|
|
36
35
|
},
|
|
37
36
|
{
|
|
@@ -41,7 +40,6 @@ const testData = [
|
|
|
41
40
|
initiallyVisible: true,
|
|
42
41
|
visible: true,
|
|
43
42
|
isDisabled: false,
|
|
44
|
-
checked: false,
|
|
45
43
|
isChildrenVisible: true,
|
|
46
44
|
},
|
|
47
45
|
{
|
|
@@ -51,12 +49,11 @@ const testData = [
|
|
|
51
49
|
initiallyVisible: true,
|
|
52
50
|
visible: true,
|
|
53
51
|
isDisabled: false,
|
|
54
|
-
checked: false,
|
|
55
52
|
isChildrenVisible: true,
|
|
56
53
|
},
|
|
57
54
|
];
|
|
58
55
|
|
|
59
|
-
const a = [{"id":1,"title":"Moodle","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":2,"title":"Canvas","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":true},{"id":3,"title":"Blackboard","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":4,"title":"D2l","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":5,"title":"Google Classroom","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":9,"title":"Zoom","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":11,"title":"Ellucian Banner","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":12,"title":"Ellucian Colleague Banner","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":16,"title":"Ilias","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":17,"title":"Blackboard Collaborate","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":18,"title":"Sakai","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":20,"title":"Moodle Workplace","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":21,"title":"Totara","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":22,"title":"Qwickly","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":24,"title":"Mongoose Cadence","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":27,"title":"Workday Raas","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":28,"title":"Hubspot","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":29,"title":"Open Lms Work","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":30,"title":"Totara 18","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":31,"title":"Blackboard Data","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false}]
|
|
56
|
+
// const a = [{"id":1,"title":"Moodle","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":2,"title":"Canvas","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":true},{"id":3,"title":"Blackboard","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":4,"title":"D2l","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":5,"title":"Google Classroom","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":9,"title":"Zoom","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":11,"title":"Ellucian Banner","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":12,"title":"Ellucian Colleague Banner","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":16,"title":"Ilias","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":17,"title":"Blackboard Collaborate","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":18,"title":"Sakai","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":20,"title":"Moodle Workplace","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":21,"title":"Totara","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":22,"title":"Qwickly","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":24,"title":"Mongoose Cadence","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":27,"title":"Workday Raas","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":28,"title":"Hubspot","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":29,"title":"Open Lms Work","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":30,"title":"Totara 18","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false},{"id":31,"title":"Blackboard Data","initiallyVisible":true,"visible":true,"isDisabled":false,"checked":false}]
|
|
60
57
|
|
|
61
58
|
const testData1 = [
|
|
62
59
|
{
|
|
@@ -66,7 +63,6 @@ const testData1 = [
|
|
|
66
63
|
initiallyVisible: true,
|
|
67
64
|
visible: true,
|
|
68
65
|
isDisabled: false,
|
|
69
|
-
checked: true,
|
|
70
66
|
isChildrenVisible: true,
|
|
71
67
|
},
|
|
72
68
|
{
|
|
@@ -76,7 +72,6 @@ const testData1 = [
|
|
|
76
72
|
initiallyVisible: true,
|
|
77
73
|
visible: true,
|
|
78
74
|
isDisabled: false,
|
|
79
|
-
checked: false,
|
|
80
75
|
isChildrenVisible: true,
|
|
81
76
|
},
|
|
82
77
|
{
|
|
@@ -86,7 +81,6 @@ const testData1 = [
|
|
|
86
81
|
initiallyVisible: true,
|
|
87
82
|
visible: true,
|
|
88
83
|
isDisabled: false,
|
|
89
|
-
checked: false,
|
|
90
84
|
isChildrenVisible: true,
|
|
91
85
|
},
|
|
92
86
|
{
|
|
@@ -106,7 +100,6 @@ const testData1 = [
|
|
|
106
100
|
initiallyVisible: true,
|
|
107
101
|
visible: true,
|
|
108
102
|
isDisabled: false,
|
|
109
|
-
checked: false,
|
|
110
103
|
isChildrenVisible: true,
|
|
111
104
|
},
|
|
112
105
|
|
|
@@ -117,7 +110,6 @@ const testData1 = [
|
|
|
117
110
|
initiallyVisible: true,
|
|
118
111
|
visible: true,
|
|
119
112
|
isDisabled: false,
|
|
120
|
-
checked: false,
|
|
121
113
|
isChildrenVisible: true,
|
|
122
114
|
},
|
|
123
115
|
|
|
@@ -128,7 +120,6 @@ const testData1 = [
|
|
|
128
120
|
initiallyVisible: true,
|
|
129
121
|
visible: true,
|
|
130
122
|
isDisabled: false,
|
|
131
|
-
checked: false,
|
|
132
123
|
isChildrenVisible: true,
|
|
133
124
|
},
|
|
134
125
|
|
|
@@ -149,7 +140,6 @@ const testData1 = [
|
|
|
149
140
|
initiallyVisible: true,
|
|
150
141
|
visible: true,
|
|
151
142
|
isDisabled: false,
|
|
152
|
-
checked: false,
|
|
153
143
|
isChildrenVisible: true,
|
|
154
144
|
},
|
|
155
145
|
{
|
|
@@ -159,7 +149,6 @@ const testData1 = [
|
|
|
159
149
|
initiallyVisible: true,
|
|
160
150
|
visible: true,
|
|
161
151
|
isDisabled: false,
|
|
162
|
-
checked: false,
|
|
163
152
|
isChildrenVisible: true,
|
|
164
153
|
},
|
|
165
154
|
{
|
|
@@ -169,7 +158,6 @@ const testData1 = [
|
|
|
169
158
|
initiallyVisible: true,
|
|
170
159
|
visible: true,
|
|
171
160
|
isDisabled: false,
|
|
172
|
-
checked: false,
|
|
173
161
|
isChildrenVisible: true,
|
|
174
162
|
},
|
|
175
163
|
];
|
|
@@ -266,7 +254,7 @@ CustomTrigger.args = {
|
|
|
266
254
|
placeholder: "Please select",
|
|
267
255
|
ariaLabel: "Search",
|
|
268
256
|
clearButtonMessage: "Clear",
|
|
269
|
-
options: a,
|
|
257
|
+
// options: a,
|
|
270
258
|
initialSize: {
|
|
271
259
|
left: 0,
|
|
272
260
|
right: 100,
|
|
@@ -469,7 +469,7 @@ export default {
|
|
|
469
469
|
} else {
|
|
470
470
|
const result = [];
|
|
471
471
|
|
|
472
|
-
const options =
|
|
472
|
+
const options = this.initialOptions;
|
|
473
473
|
Array.prototype.forEach.call(options, (option) => {
|
|
474
474
|
if (option.id !== undefined) result.push(option.id);
|
|
475
475
|
});
|
|
@@ -830,7 +830,7 @@ export default {
|
|
|
830
830
|
this.$refs.dropdown.close();
|
|
831
831
|
},
|
|
832
832
|
checkIfOptionsChecked(options) {
|
|
833
|
-
return options.every((option) => option.checked);
|
|
833
|
+
return options.every((option) => option.checked || option.readonly);
|
|
834
834
|
},
|
|
835
835
|
registerCheck(option, isChecked, isDirectChild) {
|
|
836
836
|
if (isChecked) {
|
|
@@ -880,6 +880,7 @@ export default {
|
|
|
880
880
|
manageAll() {
|
|
881
881
|
this.allOptionsIsChecked = !this.allOptionsIsChecked;
|
|
882
882
|
this.traverseTree(this.actualOptions, (option) => {
|
|
883
|
+
if (option.readonly) return;
|
|
883
884
|
this.registerCheck(option, this.allOptionsIsChecked, false);
|
|
884
885
|
});
|
|
885
886
|
},
|
|
@@ -108,8 +108,6 @@ const testData = [
|
|
|
108
108
|
selected: false,
|
|
109
109
|
initiallyVisible: true,
|
|
110
110
|
visible: true,
|
|
111
|
-
isDisabled: false,
|
|
112
|
-
checked: false,
|
|
113
111
|
},
|
|
114
112
|
{
|
|
115
113
|
id: 300,
|
|
@@ -117,14 +115,10 @@ const testData = [
|
|
|
117
115
|
selected: false,
|
|
118
116
|
initiallyVisible: true,
|
|
119
117
|
visible: true,
|
|
120
|
-
isDisabled: false,
|
|
121
|
-
checked: false,
|
|
122
118
|
},
|
|
123
119
|
],
|
|
124
120
|
initiallyVisible: true,
|
|
125
121
|
visible: true,
|
|
126
|
-
isDisabled: false,
|
|
127
|
-
checked: false,
|
|
128
122
|
isChildrenVisible: true,
|
|
129
123
|
},
|
|
130
124
|
{
|
|
@@ -133,8 +127,6 @@ const testData = [
|
|
|
133
127
|
selected: false,
|
|
134
128
|
initiallyVisible: true,
|
|
135
129
|
visible: true,
|
|
136
|
-
isDisabled: false,
|
|
137
|
-
checked: false,
|
|
138
130
|
},
|
|
139
131
|
{
|
|
140
132
|
id: 17,
|
|
@@ -142,8 +134,6 @@ const testData = [
|
|
|
142
134
|
selected: false,
|
|
143
135
|
initiallyVisible: true,
|
|
144
136
|
visible: true,
|
|
145
|
-
isDisabled: false,
|
|
146
|
-
checked: false,
|
|
147
137
|
},
|
|
148
138
|
{
|
|
149
139
|
id: 29,
|
|
@@ -151,8 +141,6 @@ const testData = [
|
|
|
151
141
|
selected: false,
|
|
152
142
|
initiallyVisible: true,
|
|
153
143
|
visible: true,
|
|
154
|
-
isDisabled: false,
|
|
155
|
-
checked: false,
|
|
156
144
|
},
|
|
157
145
|
{
|
|
158
146
|
id: 30,
|
|
@@ -160,8 +148,6 @@ const testData = [
|
|
|
160
148
|
selected: false,
|
|
161
149
|
initiallyVisible: true,
|
|
162
150
|
visible: true,
|
|
163
|
-
isDisabled: false,
|
|
164
|
-
checked: false,
|
|
165
151
|
},
|
|
166
152
|
{
|
|
167
153
|
id: 31,
|
|
@@ -169,8 +155,6 @@ const testData = [
|
|
|
169
155
|
selected: false,
|
|
170
156
|
initiallyVisible: true,
|
|
171
157
|
visible: true,
|
|
172
|
-
isDisabled: false,
|
|
173
|
-
checked: false,
|
|
174
158
|
},
|
|
175
159
|
{
|
|
176
160
|
id: 32,
|
|
@@ -178,14 +162,10 @@ const testData = [
|
|
|
178
162
|
selected: false,
|
|
179
163
|
initiallyVisible: true,
|
|
180
164
|
visible: true,
|
|
181
|
-
isDisabled: false,
|
|
182
|
-
checked: false,
|
|
183
165
|
},
|
|
184
166
|
],
|
|
185
167
|
initiallyVisible: true,
|
|
186
168
|
visible: true,
|
|
187
|
-
isDisabled: false,
|
|
188
|
-
checked: false,
|
|
189
169
|
isChildrenVisible: true,
|
|
190
170
|
},
|
|
191
171
|
{
|
|
@@ -194,8 +174,6 @@ const testData = [
|
|
|
194
174
|
selected: false,
|
|
195
175
|
initiallyVisible: true,
|
|
196
176
|
visible: true,
|
|
197
|
-
isDisabled: false,
|
|
198
|
-
checked: false,
|
|
199
177
|
},
|
|
200
178
|
{
|
|
201
179
|
id: 434,
|
|
@@ -203,8 +181,6 @@ const testData = [
|
|
|
203
181
|
selected: false,
|
|
204
182
|
initiallyVisible: true,
|
|
205
183
|
visible: true,
|
|
206
|
-
isDisabled: false,
|
|
207
|
-
checked: false,
|
|
208
184
|
},
|
|
209
185
|
{
|
|
210
186
|
id: 4324,
|
|
@@ -212,8 +188,6 @@ const testData = [
|
|
|
212
188
|
selected: false,
|
|
213
189
|
initiallyVisible: true,
|
|
214
190
|
visible: true,
|
|
215
|
-
isDisabled: false,
|
|
216
|
-
checked: false,
|
|
217
191
|
},
|
|
218
192
|
{
|
|
219
193
|
id: 41224,
|
|
@@ -221,8 +195,6 @@ const testData = [
|
|
|
221
195
|
selected: false,
|
|
222
196
|
initiallyVisible: true,
|
|
223
197
|
visible: true,
|
|
224
|
-
isDisabled: false,
|
|
225
|
-
checked: false,
|
|
226
198
|
},
|
|
227
199
|
{
|
|
228
200
|
id: 990,
|
|
@@ -230,8 +202,6 @@ const testData = [
|
|
|
230
202
|
selected: false,
|
|
231
203
|
initiallyVisible: true,
|
|
232
204
|
visible: true,
|
|
233
|
-
isDisabled: false,
|
|
234
|
-
checked: false,
|
|
235
205
|
},
|
|
236
206
|
{
|
|
237
207
|
id: 122324,
|
|
@@ -239,8 +209,6 @@ const testData = [
|
|
|
239
209
|
selected: false,
|
|
240
210
|
initiallyVisible: true,
|
|
241
211
|
visible: true,
|
|
242
|
-
isDisabled: false,
|
|
243
|
-
checked: false,
|
|
244
212
|
},
|
|
245
213
|
{
|
|
246
214
|
id: 9123123,
|
|
@@ -248,8 +216,6 @@ const testData = [
|
|
|
248
216
|
selected: false,
|
|
249
217
|
initiallyVisible: true,
|
|
250
218
|
visible: true,
|
|
251
|
-
isDisabled: false,
|
|
252
|
-
checked: false,
|
|
253
219
|
},
|
|
254
220
|
];
|
|
255
221
|
export const Default = Template.bind({});
|