@avakhula/ui 0.1.13 → 0.1.15
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/.prettierrc.json +0 -0
- package/.storybook/intelliboardTheme.js +0 -0
- package/.storybook/manager.js +0 -0
- package/.storybook/scss-loader.scss +0 -0
- package/.storybook/withSource.js +0 -0
- package/README.md +0 -0
- package/dist/index.js +9028 -7513
- package/dist/index.umd.cjs +76 -73
- package/dist/style.css +1 -1
- package/index.html +0 -0
- package/package.json +4 -3
- package/src/App.vue +5 -128
- package/src/EventEmmiter.js +0 -0
- package/src/assets/scss/mixins/dropdown-list-item.scss +13 -1
- package/src/assets/scss/mixins.scss +0 -0
- package/src/assets/scss/reset.scss +0 -0
- package/src/assets/scss/style.scss +0 -0
- package/src/assets/scss/typography.scss +0 -0
- package/src/components/Alert/Alert.vue +5 -0
- package/src/components/Alert/alert.scss +6 -1
- package/src/components/Avatar/Avatar.stories.js +5 -1
- package/src/components/Avatar/Avatar.vue +25 -2
- package/src/components/Avatar/constants.js +6 -0
- package/src/components/Badge/Badge.stories.js +0 -0
- package/src/components/Breadcrumbs/Breadcrumbs.vue +17 -7
- package/src/components/Button/Button.stories.js +0 -0
- package/src/components/Button/Button.vue +19 -3
- package/src/components/Button/button.scss +5 -0
- package/src/components/Button/constants.js +0 -0
- package/src/components/ButtonGroup/ButtonGroup.vue +0 -0
- package/src/components/Chips/Chips.stories.js +30 -0
- package/src/components/Chips/Chips.vue +125 -0
- package/src/components/Dropdown/Dropdown.spec.js +0 -0
- package/src/components/Dropdown/DropdownDivider.vue +0 -0
- package/src/components/Dropdown/DropdownItem.vue +26 -4
- package/src/components/Dropdown/DropdownList.vue +0 -0
- package/src/components/Dropdown/constants.js +0 -0
- package/src/components/Form/CharactersCount.vue +10 -7
- package/src/components/Form/Checkbox/Checkbox.vue +25 -11
- package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +15 -0
- package/src/components/Form/CheckboxGroup/readme.mdx +2 -0
- package/src/components/Form/DatePicker/DatePicker.scss +352 -261
- package/src/components/Form/DatePicker/DatePicker.vue +72 -17
- package/src/components/Form/DatePicker/Icons/chevron-back.js +0 -0
- package/src/components/Form/DatePicker/Icons/chevron-forward.js +0 -0
- package/src/components/Form/FormGroup/FormGroup.stories.js +0 -0
- package/src/components/Form/FormGroup/FormGroup.vue +3 -3
- package/src/components/Form/FormGroup/FormGroupSet.stories.js +0 -0
- package/src/components/Form/FormGroup/FormGroupSet.vue +0 -0
- package/src/components/Form/Input/Input.vue +116 -13
- package/src/components/Form/Input/input.scss +61 -2
- package/src/components/Form/Label/Label.vue +22 -10
- package/src/components/Form/PhoneInput/PhoneInput.vue +26 -12
- package/src/components/Form/PhoneInput/phoneInput.scss +38 -6
- package/src/components/Form/Radio/Radio.vue +16 -44
- package/src/components/Form/Radio/radio.scss +5 -2
- package/src/components/Form/TextEditor/TextEditor.vue +117 -22
- package/src/components/Form/TextEditor/icons/svg/chevron-down.svg +0 -0
- package/src/components/Form/TextEditor/icons/toolbarIcons.js +0 -0
- package/src/components/Form/TextEditor/plugins/alphabetList.js +0 -0
- package/src/components/Form/TextEditor/textEditor.scss +56 -32
- package/src/components/Form/Textarea/Textarea.spec.js +0 -0
- package/src/components/Form/Textarea/Textarea.vue +19 -6
- package/src/components/Form/Textarea/textarea.scss +30 -2
- package/src/components/Icon.vue +0 -0
- package/src/components/IconButton/IconButton.scss +11 -0
- package/src/components/IconButton/IconButton.stories.js +0 -0
- package/src/components/IconButton/IconButton.vue +6 -9
- package/src/components/IconButton/constants.js +0 -0
- package/src/components/Modal/Modal.vue +42 -9
- package/src/components/Pagination/LimitSelector.vue +5 -0
- package/src/components/Pagination/Pagination.stories.js +0 -0
- package/src/components/Pagination/Pagination.vue +9 -2
- package/src/components/Panel/Panel.vue +87 -6
- package/src/components/Popover/Popover.stories.js +0 -0
- package/src/components/Popover/Popover.vue +47 -19
- package/src/components/Popover/popover.scss +27 -7
- package/src/components/ProgressBar/ProgressBar.stories.js +0 -0
- package/src/components/Sorting/Sorting.vue +24 -26
- package/src/components/Sorting/constants.js +0 -0
- package/src/components/SplitButton/SplitButton.vue +51 -8
- package/src/components/SplitButton/SplitButtonItem.vue +13 -1
- package/src/components/SplitButton/constants.js +0 -0
- package/src/components/Table/Cells/Cell.vue +0 -0
- package/src/components/Table/Cells/CheckboxCell.vue +0 -0
- package/src/components/Table/Row.vue +0 -0
- package/src/components/Table/Table.stories.js +0 -0
- package/src/components/Table/Table.vue +0 -0
- package/src/components/Tabs/Tab.vue +4 -0
- package/src/components/Tabs/Tabs.vue +5 -0
- package/src/components/Tabs/tabs.scss +8 -2
- package/src/components/TagPill/TagPill.vue +6 -0
- package/src/components/TagPill/constants.js +0 -0
- package/src/components/ToggleTip/ToggleTip.stories.js +0 -0
- package/src/components/ToggleTip/ToggleTip.vue +0 -0
- package/src/components/Tooltip/Tooltip.stories.js +0 -0
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/components/TreeSelect/Option.vue +48 -16
- package/src/components/TreeSelect/Select.vue +101 -39
- package/src/components/TreeSelect/mixins/InfinityLoaderMixin.js +40 -0
- package/src/components/TreeSelect/scss/option.scss +31 -0
- package/src/components/TreeSelect/scss/select.scss +48 -2
- package/src/constants/events.js +0 -0
- package/src/constants/keyCodes.js +1 -0
- package/src/directives/outside/outside.js +0 -0
- package/src/directives/tooltip/TooltipController.js +2 -0
- package/src/directives/tooltip/textOverflowTooltip.js +3 -1
- package/src/directives/tooltip/tooltip.js +15 -0
- package/src/helpers/generateUID.js +0 -0
- package/src/helpers/getHrefFromID.js +0 -0
- package/src/helpers/multiLineOverflows.js +0 -0
- package/src/helpers/stripHtml.js +4 -0
- package/src/index.js +2 -0
- package/src/stories/link.stories.js +0 -0
- package/static/Logo.svg +0 -0
- package/vite.config.js +0 -0
|
@@ -10,9 +10,12 @@
|
|
|
10
10
|
}"
|
|
11
11
|
>
|
|
12
12
|
<ib-dropdown
|
|
13
|
-
:disabled="isLoading"
|
|
13
|
+
:disabled="isLoading || disable"
|
|
14
14
|
:is-resizable="isResizable"
|
|
15
|
-
:vertical="
|
|
15
|
+
:vertical="verticalVal"
|
|
16
|
+
:class="{
|
|
17
|
+
disable: disable
|
|
18
|
+
}"
|
|
16
19
|
ref="dropdown"
|
|
17
20
|
@close="onClose"
|
|
18
21
|
@open="onOpen"
|
|
@@ -27,6 +30,7 @@
|
|
|
27
30
|
tabindex="0"
|
|
28
31
|
class="tree-choice"
|
|
29
32
|
ref="combobox"
|
|
33
|
+
:aria-expanded="isOpened"
|
|
30
34
|
@click.prevent
|
|
31
35
|
@blur="onBlur"
|
|
32
36
|
@keyup.down="comboboxKeyupDown"
|
|
@@ -41,7 +45,7 @@
|
|
|
41
45
|
>
|
|
42
46
|
|
|
43
47
|
<template v-if="hasTriggerContent">
|
|
44
|
-
<slot v-bind:selected-count="selectedKeys.length" name="triggerContent"></slot>
|
|
48
|
+
<slot v-bind:selected-count="selectedKeys.length" v-bind:is-open="isOpened" name="triggerContent"></slot>
|
|
45
49
|
</template>
|
|
46
50
|
|
|
47
51
|
<template v-else>
|
|
@@ -62,6 +66,7 @@
|
|
|
62
66
|
v-if="showClearButton"
|
|
63
67
|
kind="ghost"
|
|
64
68
|
class="button-clear"
|
|
69
|
+
aria-label="Clear selection"
|
|
65
70
|
@click.prevent="clearValue"
|
|
66
71
|
@keypress.enter.stop.prevent
|
|
67
72
|
@keydown.enter.stop.prevent
|
|
@@ -85,6 +90,7 @@
|
|
|
85
90
|
class="tree-drop"
|
|
86
91
|
:class="{ 'not-tree-child': !hasTreeChildren }"
|
|
87
92
|
:style="treeDropPos"
|
|
93
|
+
role="listbox"
|
|
88
94
|
>
|
|
89
95
|
<div
|
|
90
96
|
v-if="isResizable"
|
|
@@ -95,34 +101,17 @@
|
|
|
95
101
|
v-if="isResizable"
|
|
96
102
|
class="ib-dropdown-resizer ib-dropdown-resizer-right"
|
|
97
103
|
@mousedown="startResizing('right')"
|
|
104
|
+
v-tooltip.rightCenter="lang('resize_list', 'select')"
|
|
98
105
|
></div>
|
|
99
|
-
<list
|
|
100
|
-
:class="{ 'has-hierarchy': hasHierarchy }"
|
|
101
|
-
v-if="Object.keys(actualBookmarkedOptions).length > 0"
|
|
102
|
-
>
|
|
103
|
-
<select-option
|
|
104
|
-
:key="'bookmark' + option.id"
|
|
105
|
-
v-for="option in actualBookmarkedOptions"
|
|
106
|
-
:option="option"
|
|
107
|
-
:parent-auto-check="false"
|
|
108
|
-
:is-multiple="isMultiple"
|
|
109
|
-
:is-bookmarkable="true"
|
|
110
|
-
:is-bookmarked="true"
|
|
111
|
-
@check="registerCheck"
|
|
112
|
-
@toggle-bookmark="toggleBookmark"
|
|
113
|
-
:uid="uid"
|
|
114
|
-
:only-end-nodes="onlyEndNodes"
|
|
115
|
-
:html-title="htmlOptionTitle"
|
|
116
|
-
:show-input="showInputs"
|
|
117
|
-
></select-option>
|
|
118
|
-
</list>
|
|
119
106
|
|
|
120
107
|
<ib-input
|
|
121
108
|
class="tree-search"
|
|
122
109
|
v-if="showSearch"
|
|
123
110
|
ref="search"
|
|
111
|
+
autocomplete="off"
|
|
124
112
|
:show-icon="true"
|
|
125
113
|
:value="filterString"
|
|
114
|
+
:debounce="searchDebounce"
|
|
126
115
|
:aria-label="
|
|
127
116
|
searchPlaceholderText
|
|
128
117
|
? searchPlaceholderText
|
|
@@ -139,7 +128,11 @@
|
|
|
139
128
|
<list
|
|
140
129
|
ref="list"
|
|
141
130
|
role="listbox"
|
|
142
|
-
:class="{
|
|
131
|
+
:class="{
|
|
132
|
+
'tree-select-list': true,
|
|
133
|
+
'has-hierarchy': hasHierarchy,
|
|
134
|
+
'alphabetic-list': alphabeticStyle,
|
|
135
|
+
}"
|
|
143
136
|
>
|
|
144
137
|
<div
|
|
145
138
|
v-if="
|
|
@@ -173,6 +166,7 @@
|
|
|
173
166
|
:name="actualName"
|
|
174
167
|
:parent-auto-check="parentAutoCheck"
|
|
175
168
|
:is-multiple="isMultiple"
|
|
169
|
+
role="option"
|
|
176
170
|
@check="registerCheck"
|
|
177
171
|
@toggle-bookmark="toggleBookmark"
|
|
178
172
|
:uid="uid"
|
|
@@ -181,10 +175,31 @@
|
|
|
181
175
|
></select-option>
|
|
182
176
|
</template>
|
|
183
177
|
|
|
178
|
+
<template v-if="Object.keys(actualBookmarkedOptions).length > 0">
|
|
179
|
+
<select-option
|
|
180
|
+
:key="'bookmark' + option.id"
|
|
181
|
+
v-for="option in actualBookmarkedOptions"
|
|
182
|
+
class="bookmarked-option"
|
|
183
|
+
:option="option"
|
|
184
|
+
:parent-auto-check="false"
|
|
185
|
+
:is-multiple="isMultiple"
|
|
186
|
+
:is-bookmarkable="true"
|
|
187
|
+
:is-bookmarked="true"
|
|
188
|
+
role="option"
|
|
189
|
+
@check="registerCheck"
|
|
190
|
+
@toggle-bookmark="toggleBookmark"
|
|
191
|
+
:uid="uid"
|
|
192
|
+
:only-end-nodes="onlyEndNodes"
|
|
193
|
+
:html-title="htmlOptionTitle"
|
|
194
|
+
:show-input="showInputs"
|
|
195
|
+
></select-option>
|
|
196
|
+
</template>
|
|
197
|
+
|
|
184
198
|
<template v-if="!requiredDependencyNotFilled">
|
|
185
199
|
<template
|
|
186
200
|
v-if="
|
|
187
201
|
allOptions &&
|
|
202
|
+
!alphabeticStyle &&
|
|
188
203
|
isMultiple &&
|
|
189
204
|
visibleOptionsCount &&
|
|
190
205
|
!requiredDependencyNotFilled
|
|
@@ -210,6 +225,8 @@
|
|
|
210
225
|
:uid="uid"
|
|
211
226
|
:only-end-nodes="onlyEndNodes"
|
|
212
227
|
:show-input="showInputs"
|
|
228
|
+
:alphabetic-style="alphabeticStyle"
|
|
229
|
+
role="option"
|
|
213
230
|
@check="manageAll"
|
|
214
231
|
@on-focus="(id) => focusedOptionId = id"
|
|
215
232
|
></select-option>
|
|
@@ -234,6 +251,7 @@
|
|
|
234
251
|
:option="option"
|
|
235
252
|
:is-toggle="isToggle"
|
|
236
253
|
:name="actualName"
|
|
254
|
+
role="option"
|
|
237
255
|
:parent-auto-check="parentAutoCheck"
|
|
238
256
|
:is-multiple="isMultiple"
|
|
239
257
|
:is-bookmarkable="isBookmarkable"
|
|
@@ -241,6 +259,7 @@
|
|
|
241
259
|
:only-end-nodes="onlyEndNodes"
|
|
242
260
|
:html-title="htmlOptionTitle"
|
|
243
261
|
:show-input="showInputs"
|
|
262
|
+
:alphabetic-style="alphabeticStyle"
|
|
244
263
|
@check="registerCheck"
|
|
245
264
|
@toggle-bookmark="toggleBookmark"
|
|
246
265
|
@on-focus="(id) => focusedOptionId = id"
|
|
@@ -248,6 +267,8 @@
|
|
|
248
267
|
</slot>
|
|
249
268
|
</template>
|
|
250
269
|
</template>
|
|
270
|
+
|
|
271
|
+
<div v-if="infiniteLoader" ref="infinityLoader"></div>
|
|
251
272
|
</list>
|
|
252
273
|
</div>
|
|
253
274
|
</template>
|
|
@@ -266,6 +287,8 @@ import IbIcon from "../Icon.vue";
|
|
|
266
287
|
import IbIconButton from "../IconButton/IconButton.vue";
|
|
267
288
|
import IbAlert from "../Alert/Alert.vue";
|
|
268
289
|
import List from "../List.vue";
|
|
290
|
+
import InfinityLoaderMixin from "./mixins/InfinityLoaderMixin";
|
|
291
|
+
import { TooltipDirective as Tooltip } from "../../directives/tooltip/tooltip";
|
|
269
292
|
|
|
270
293
|
function copy(data) {
|
|
271
294
|
return JSON.parse(JSON.stringify(data));
|
|
@@ -274,8 +297,13 @@ function copy(data) {
|
|
|
274
297
|
export default {
|
|
275
298
|
name: "IbTreeSelect",
|
|
276
299
|
inject: ["LANG_COMPONENTS"],
|
|
300
|
+
mixins: [InfinityLoaderMixin],
|
|
277
301
|
props: {
|
|
278
302
|
classList: [String, Array],
|
|
303
|
+
keywordHighlighter: {
|
|
304
|
+
type: Boolean,
|
|
305
|
+
default: true,
|
|
306
|
+
},
|
|
279
307
|
placeholder: {
|
|
280
308
|
type: String,
|
|
281
309
|
default: "",
|
|
@@ -315,6 +343,7 @@ export default {
|
|
|
315
343
|
},
|
|
316
344
|
},
|
|
317
345
|
options: {
|
|
346
|
+
type: [Array, Function],
|
|
318
347
|
default() {
|
|
319
348
|
return [];
|
|
320
349
|
},
|
|
@@ -393,10 +422,9 @@ export default {
|
|
|
393
422
|
type: Boolean,
|
|
394
423
|
default: false,
|
|
395
424
|
},
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
// },
|
|
425
|
+
vertical: {
|
|
426
|
+
type: String,
|
|
427
|
+
},
|
|
400
428
|
emptyMessage: {
|
|
401
429
|
type: String,
|
|
402
430
|
default: "",
|
|
@@ -421,6 +449,18 @@ export default {
|
|
|
421
449
|
type: Boolean,
|
|
422
450
|
default: false,
|
|
423
451
|
},
|
|
452
|
+
disable: {
|
|
453
|
+
type: Boolean,
|
|
454
|
+
default: false
|
|
455
|
+
},
|
|
456
|
+
searchDebounce: {
|
|
457
|
+
type: Number,
|
|
458
|
+
default: 0,
|
|
459
|
+
},
|
|
460
|
+
alphabeticStyle: {
|
|
461
|
+
type: Boolean,
|
|
462
|
+
default: false
|
|
463
|
+
},
|
|
424
464
|
},
|
|
425
465
|
emits: [
|
|
426
466
|
"close",
|
|
@@ -430,6 +470,7 @@ export default {
|
|
|
430
470
|
"resize",
|
|
431
471
|
"submit",
|
|
432
472
|
"clearValue",
|
|
473
|
+
"toggle-bookmarked-option",
|
|
433
474
|
"update:modelValue",
|
|
434
475
|
],
|
|
435
476
|
watch: {
|
|
@@ -463,7 +504,7 @@ export default {
|
|
|
463
504
|
},
|
|
464
505
|
options: {
|
|
465
506
|
handler(newOptions) {
|
|
466
|
-
this.initialOptions
|
|
507
|
+
this.initialOptions = typeof newOptions === "function" ? newOptions : copy(newOptions);
|
|
467
508
|
},
|
|
468
509
|
deep: true,
|
|
469
510
|
},
|
|
@@ -523,13 +564,13 @@ export default {
|
|
|
523
564
|
const filterString = this.filterString.toLowerCase().trim();
|
|
524
565
|
this.filterFunc.call(this, options, filterString);
|
|
525
566
|
|
|
526
|
-
if (filterString) {
|
|
567
|
+
if (filterString && this.keywordHighlighter) {
|
|
527
568
|
this.marker.mark(filterString);
|
|
528
569
|
}
|
|
529
570
|
};
|
|
530
571
|
|
|
531
572
|
return {
|
|
532
|
-
initialOptions: copy(this.options),
|
|
573
|
+
initialOptions: typeof this.options === "function" ? this.options : copy(this.options),
|
|
533
574
|
val: this.modelValue ? this.modelValue : this.value,
|
|
534
575
|
size: {
|
|
535
576
|
left: (this.initialSize && this.initialSize.left) || 0,
|
|
@@ -545,7 +586,7 @@ export default {
|
|
|
545
586
|
actualBookmarkedOptions: {},
|
|
546
587
|
selected: [],
|
|
547
588
|
isOpen: false,
|
|
548
|
-
|
|
589
|
+
verticalVal: this.vertical ?? "bottom",
|
|
549
590
|
allOptionsIsChecked: true,
|
|
550
591
|
hasTreeChildren: false,
|
|
551
592
|
uid: `f${(~~(Math.random() * 1e8)).toString(16)}`,
|
|
@@ -668,7 +709,7 @@ export default {
|
|
|
668
709
|
},
|
|
669
710
|
filter(filterString, options) {
|
|
670
711
|
this.filterString = filterString;
|
|
671
|
-
this.$emit("search",
|
|
712
|
+
this.$emit("search", this.filterString);
|
|
672
713
|
this.defaultFilter(options);
|
|
673
714
|
},
|
|
674
715
|
setPreparedValues(opt) {
|
|
@@ -709,7 +750,7 @@ export default {
|
|
|
709
750
|
this.clear();
|
|
710
751
|
this.setPreparedValues();
|
|
711
752
|
},
|
|
712
|
-
prepare(options) {
|
|
753
|
+
prepare(options, checkInitialVisibility = true) {
|
|
713
754
|
return new Promise((res) => {
|
|
714
755
|
const selected = {},
|
|
715
756
|
promises = [];
|
|
@@ -737,7 +778,6 @@ export default {
|
|
|
737
778
|
typeof option.visible === "undefined" ? true : option.visible;
|
|
738
779
|
option.visible = option.initiallyVisible;
|
|
739
780
|
option.readonly = option.readonly ? true : false;
|
|
740
|
-
option.isDisabled = false;
|
|
741
781
|
|
|
742
782
|
option.checked = this.isMultiple
|
|
743
783
|
? this.val !== null &&
|
|
@@ -761,6 +801,11 @@ export default {
|
|
|
761
801
|
this.prepare(option.children).then(
|
|
762
802
|
([preparedChildren, selectedChildren]) => {
|
|
763
803
|
option.children = preparedChildren;
|
|
804
|
+
|
|
805
|
+
if (this.parentAutoCheck) {
|
|
806
|
+
option.checked = this.checkIfOptionsChecked(option.children);
|
|
807
|
+
}
|
|
808
|
+
|
|
764
809
|
Object.assign(selected, selectedChildren);
|
|
765
810
|
res(option);
|
|
766
811
|
}
|
|
@@ -790,10 +835,11 @@ export default {
|
|
|
790
835
|
|
|
791
836
|
if (option.children && option.children.length) {
|
|
792
837
|
let visibleChildrenCount = this.filterFunc(option.children, filterString);
|
|
838
|
+
|
|
793
839
|
visibleOptionsCount += visibleChildrenCount;
|
|
794
840
|
|
|
795
841
|
if (visibleChildrenCount) {
|
|
796
|
-
option.isChildrenVisible =
|
|
842
|
+
option.isChildrenVisible = filterString.length > 0 || Boolean(Object.keys(this.actualBookmarkedOptions).length);
|
|
797
843
|
option.isDisabled = visibleChildrenCount < option.children.length && !this.isBookmarkable;
|
|
798
844
|
}
|
|
799
845
|
|
|
@@ -942,16 +988,18 @@ export default {
|
|
|
942
988
|
this.$emit("close", Object.keys(this.selected)[0]);
|
|
943
989
|
}
|
|
944
990
|
this.$emit("blur");
|
|
945
|
-
this.
|
|
991
|
+
this.verticalVal = this.vertical ?? "bottom";
|
|
946
992
|
},
|
|
947
993
|
onOpen() {
|
|
948
994
|
const screenHeight = document.documentElement.scrollHeight;
|
|
949
995
|
this.isOpen = true;
|
|
950
996
|
|
|
997
|
+
if (this.vertical === "bottom") return;
|
|
998
|
+
|
|
951
999
|
this.$nextTick(() => {
|
|
952
1000
|
const newScreenHeight = document.documentElement.scrollHeight
|
|
953
1001
|
if(newScreenHeight > screenHeight) {
|
|
954
|
-
this.
|
|
1002
|
+
this.verticalVal = "top";
|
|
955
1003
|
}
|
|
956
1004
|
})
|
|
957
1005
|
}
|
|
@@ -1025,7 +1073,7 @@ export default {
|
|
|
1025
1073
|
);
|
|
1026
1074
|
},
|
|
1027
1075
|
showSearch() {
|
|
1028
|
-
return this.useSearch || this.optionsCount > 10;
|
|
1076
|
+
return this.useSearch || (this.optionsCount > 10 && !this.alphabeticStyle);
|
|
1029
1077
|
},
|
|
1030
1078
|
arrayOfOptions() {
|
|
1031
1079
|
return this.getArrayOptions(this.actualOptions);
|
|
@@ -1072,12 +1120,26 @@ export default {
|
|
|
1072
1120
|
List,
|
|
1073
1121
|
"select-option": Option,
|
|
1074
1122
|
},
|
|
1123
|
+
directives: {
|
|
1124
|
+
Tooltip,
|
|
1125
|
+
},
|
|
1075
1126
|
beforeUnmount() {
|
|
1076
1127
|
document.removeEventListener("mousemove", this.onResize);
|
|
1077
1128
|
document.removeEventListener("mouseup", this.endResizing);
|
|
1078
1129
|
},
|
|
1130
|
+
inheritAttrs: false,
|
|
1079
1131
|
};
|
|
1080
1132
|
</script>
|
|
1081
1133
|
<style lang="scss">
|
|
1082
1134
|
@import "./scss/select.scss";
|
|
1135
|
+
|
|
1136
|
+
.bookmarked-option {
|
|
1137
|
+
.tree-select-option-label {
|
|
1138
|
+
padding-left: 15px;
|
|
1139
|
+
|
|
1140
|
+
ion-icon {
|
|
1141
|
+
color: $blue-900;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1083
1145
|
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
infiniteLoader: {
|
|
4
|
+
type: Boolean,
|
|
5
|
+
default: true,
|
|
6
|
+
},
|
|
7
|
+
},
|
|
8
|
+
watch: {
|
|
9
|
+
infiniteLoader(newValue) {
|
|
10
|
+
if (!newValue) {
|
|
11
|
+
infiniteLoaderObserver.disconnect();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
data() {
|
|
16
|
+
return {
|
|
17
|
+
infiniteLoaderObserver: null,
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
mounted() {
|
|
21
|
+
if (this.infiniteLoader) {
|
|
22
|
+
|
|
23
|
+
this.infiniteLoaderObserver = new IntersectionObserver((entries) => {
|
|
24
|
+
entries.forEach(entry => {
|
|
25
|
+
if (entry.isIntersecting) {
|
|
26
|
+
this.$emit('loadMoreOptions');
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
this.infiniteLoaderObserver.observe(this.$refs.infinityLoader);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
beforeDestroy() {
|
|
35
|
+
if (this.infiniteLoader) {
|
|
36
|
+
infiniteLoaderObserver?.disconnect();
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ['loadMoreOptions'],
|
|
40
|
+
};
|
|
@@ -89,6 +89,14 @@ $option-checked-hover-bg: $blue-50;
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
&.alphabetic-option {
|
|
93
|
+
max-width: 65px;
|
|
94
|
+
width: 65px;
|
|
95
|
+
&.tree-select-option-checked {
|
|
96
|
+
background-color: white;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
92
100
|
.tree-select-option-label {
|
|
93
101
|
&:hover {
|
|
94
102
|
background-color: $option-hover-bg;
|
|
@@ -110,6 +118,19 @@ $option-checked-hover-bg: $blue-50;
|
|
|
110
118
|
}
|
|
111
119
|
}
|
|
112
120
|
|
|
121
|
+
&.has-icon {
|
|
122
|
+
border-top: 1px solid $gray-200;
|
|
123
|
+
|
|
124
|
+
.option-label {
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
|
|
128
|
+
ion-icon {
|
|
129
|
+
margin-right: 15px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
113
134
|
.tree-select-option {
|
|
114
135
|
.toggle-children,
|
|
115
136
|
.option-label,
|
|
@@ -128,6 +149,12 @@ $option-checked-hover-bg: $blue-50;
|
|
|
128
149
|
transform: translateX(50px);
|
|
129
150
|
}
|
|
130
151
|
|
|
152
|
+
.bookmarkable-option-content {
|
|
153
|
+
.option-label {
|
|
154
|
+
width: calc(100% - 85px);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
131
158
|
.option-label {
|
|
132
159
|
width: calc(100% - 75px);
|
|
133
160
|
}
|
|
@@ -205,4 +232,8 @@ $option-checked-hover-bg: $blue-50;
|
|
|
205
232
|
}
|
|
206
233
|
}
|
|
207
234
|
}
|
|
235
|
+
|
|
236
|
+
.disabled {
|
|
237
|
+
color: $neutral-500 !important;
|
|
238
|
+
}
|
|
208
239
|
}
|
|
@@ -20,6 +20,14 @@ $choice-opened-icon-color: $blue-900;
|
|
|
20
20
|
$choice-border-error-color: $red-800;
|
|
21
21
|
$tree-search-border-color: $gray-600;
|
|
22
22
|
|
|
23
|
+
.disable {
|
|
24
|
+
.tree-choice {
|
|
25
|
+
background-color: $gray-100 !important;
|
|
26
|
+
color: $neutral-500 !important;
|
|
27
|
+
border-bottom: 1px solid $neutral-500 !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
.tree-select-error {
|
|
24
32
|
margin-bottom: 5px;
|
|
25
33
|
}
|
|
@@ -156,7 +164,7 @@ $tree-search-border-color: $gray-600;
|
|
|
156
164
|
|
|
157
165
|
.ib-input-wrapper {
|
|
158
166
|
margin-bottom: 6.5px;
|
|
159
|
-
|
|
167
|
+
|
|
160
168
|
& > div {
|
|
161
169
|
overflow: visible;
|
|
162
170
|
}
|
|
@@ -166,9 +174,36 @@ $tree-search-border-color: $gray-600;
|
|
|
166
174
|
margin: 0;
|
|
167
175
|
overflow: auto;
|
|
168
176
|
max-height: 360px;
|
|
177
|
+
|
|
178
|
+
.ib-list {
|
|
179
|
+
max-height: fit-content;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.bookmarkable-option-content {
|
|
185
|
+
display: flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
width: 100%;
|
|
188
|
+
justify-content: space-between;
|
|
189
|
+
|
|
190
|
+
.option-label {
|
|
191
|
+
width: calc(100% - 65px);
|
|
192
|
+
|
|
193
|
+
ion-icon {
|
|
194
|
+
color: $blue-900;
|
|
195
|
+
}
|
|
169
196
|
}
|
|
170
197
|
}
|
|
171
198
|
|
|
199
|
+
.tree-select-option-label {
|
|
200
|
+
width: 99.5%;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.bookmarkable-option-title {
|
|
204
|
+
width: inherit;
|
|
205
|
+
}
|
|
206
|
+
|
|
172
207
|
.ib-dropdown-menu {
|
|
173
208
|
position: inherit;
|
|
174
209
|
}
|
|
@@ -178,10 +213,11 @@ $tree-search-border-color: $gray-600;
|
|
|
178
213
|
cursor: move;
|
|
179
214
|
background: transparent;
|
|
180
215
|
z-index: 2;
|
|
216
|
+
width: 3px;
|
|
217
|
+
transition: background 0.3s;
|
|
181
218
|
|
|
182
219
|
&.ib-dropdown-resizer-left,
|
|
183
220
|
&.ib-dropdown-resizer-right {
|
|
184
|
-
width: 3px;
|
|
185
221
|
top: 0;
|
|
186
222
|
bottom: 0;
|
|
187
223
|
}
|
|
@@ -195,6 +231,10 @@ $tree-search-border-color: $gray-600;
|
|
|
195
231
|
right: 0;
|
|
196
232
|
cursor: e-resize;
|
|
197
233
|
}
|
|
234
|
+
|
|
235
|
+
&:hover {
|
|
236
|
+
background-color: $blue-700;
|
|
237
|
+
}
|
|
198
238
|
}
|
|
199
239
|
|
|
200
240
|
.tree-select-default-empty {
|
|
@@ -205,4 +245,10 @@ $tree-search-border-color: $gray-600;
|
|
|
205
245
|
.tree-select-empty {
|
|
206
246
|
padding: 15px;
|
|
207
247
|
}
|
|
248
|
+
|
|
249
|
+
.alphabetic-list {
|
|
250
|
+
display: flex;
|
|
251
|
+
flex-wrap: wrap;
|
|
252
|
+
flex-direction: row;
|
|
253
|
+
}
|
|
208
254
|
}
|
package/src/constants/events.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -37,6 +37,7 @@ export default class Tooltip {
|
|
|
37
37
|
position: absolute;
|
|
38
38
|
top: 0px;
|
|
39
39
|
left: 0px;
|
|
40
|
+
opacity: 0;
|
|
40
41
|
`;
|
|
41
42
|
|
|
42
43
|
this.tooltipContainer = document.createElement("div");
|
|
@@ -59,6 +60,7 @@ export default class Tooltip {
|
|
|
59
60
|
|
|
60
61
|
const tooltipStyles = this.getPositionStyle(el, position);
|
|
61
62
|
this.tooltipContainer.firstChild.setAttribute("style", tooltipStyles);
|
|
63
|
+
this.tooltipContainer.setAttribute("style", {'opacity': 1});
|
|
62
64
|
}
|
|
63
65
|
}, 100);
|
|
64
66
|
}
|
|
@@ -6,12 +6,14 @@ const tooltip = new Tooltip();
|
|
|
6
6
|
const createTooltip = (el, binding) => {
|
|
7
7
|
if (multiLineOverflows(el)) {
|
|
8
8
|
|
|
9
|
+
const position = Object.keys(binding.modifiers)[0] || binding.arg;
|
|
10
|
+
|
|
9
11
|
const content = {
|
|
10
12
|
title: binding.value.title || '',
|
|
11
13
|
text: typeof(binding.value) === 'object' ? binding.value.text : binding.value,
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
tooltip.createTooltip(el, content);
|
|
16
|
+
tooltip.createTooltip(el, content, position);
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
19
|
|
|
@@ -24,6 +24,15 @@ const destroyTooltip = (event, el) => {
|
|
|
24
24
|
|
|
25
25
|
const tooltipContainer = tooltip.getTooltipContainer();
|
|
26
26
|
|
|
27
|
+
if(event.type === "blur") {
|
|
28
|
+
if(!el.contains(event.relatedTarget)) {
|
|
29
|
+
tooltip.destroyTooltip(el);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Remove Hover
|
|
27
36
|
const isMouseOverEl = el !== event.target && !el.contains(event.target);
|
|
28
37
|
const isMouseOverTooltip =
|
|
29
38
|
tooltipContainer !== event.target &&
|
|
@@ -40,12 +49,18 @@ const attachTooltipListeners = (el, binding) => {
|
|
|
40
49
|
|
|
41
50
|
el.addEventListener("mouseenter", el.__tooltip_create);
|
|
42
51
|
document.addEventListener("mousemove", el.__tooltip_destroy);
|
|
52
|
+
|
|
53
|
+
el.addEventListener("focus", el.__tooltip_create);
|
|
54
|
+
el.addEventListener("blur", el.__tooltip_destroy, true);
|
|
43
55
|
};
|
|
44
56
|
|
|
45
57
|
const removeTooltipListeners = (el) => {
|
|
46
58
|
tooltip.destroyTooltip(el);
|
|
47
59
|
el.removeEventListener("mouseenter", el.__tooltip_create);
|
|
48
60
|
document.removeEventListener("mousemove", el.__tooltip_destroy);
|
|
61
|
+
|
|
62
|
+
el.removeEventListener("focus", el.__tooltip_create);
|
|
63
|
+
el.removeEventListener("blur", el.__tooltip_destroy, true);
|
|
49
64
|
};
|
|
50
65
|
|
|
51
66
|
export const TooltipDirective = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export { default as IbLimitSelector } from "./components/Pagination/LimitSelecto
|
|
|
26
26
|
export { default as IbProgressBar } from "./components/ProgressBar/ProgressBar.vue";
|
|
27
27
|
export { default as IbStatusIndicator } from "./components/StatusIndicator/StatusIndicator.vue";
|
|
28
28
|
export { default as IbPanel } from "./components/Panel/Panel.vue";
|
|
29
|
+
export { default as IbChips } from "./components/Chips/Chips.vue";
|
|
29
30
|
|
|
30
31
|
// FORM
|
|
31
32
|
export { default as IbInput } from "./components/Form/Input/Input.vue";
|
|
@@ -40,6 +41,7 @@ export { default as IbTreeSelect } from "./components/TreeSelect/Select.vue";
|
|
|
40
41
|
export { default as IbDatePicker } from "./components/Form/DatePicker/DatePicker.vue";
|
|
41
42
|
export { default as IbPhoneInput } from "./components/Form/PhoneInput/PhoneInput.vue";
|
|
42
43
|
export { default as IbTextEditor } from "./components/Form/TextEditor/TextEditor.vue";
|
|
44
|
+
export {default as IbCharactersCount } from "./components/Form/CharactersCount.vue";
|
|
43
45
|
|
|
44
46
|
// Table
|
|
45
47
|
export { default as IbTable } from "./components/Table/Table.vue";
|
|
File without changes
|
package/static/Logo.svg
CHANGED
|
File without changes
|
package/vite.config.js
CHANGED
|
File without changes
|