@avakhula/ui 0.0.505 → 0.0.510-alpha-spa.1
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/.babelrc.json +0 -0
- package/.eslintrc.cjs +0 -0
- package/.nvmrc +0 -0
- package/.storybook/main.js +0 -0
- package/.storybook/preview-head.html +0 -0
- package/.storybook/preview.js +0 -0
- package/dist/index.css +1 -0
- package/dist/index.es.js +22382 -0
- package/dist/index.umd.js +238 -0
- package/package.json +11 -10
- package/src/App.vue +16 -127
- package/src/assets/scss/mixins/dropdown-list-item.scss +9 -4
- package/src/assets/scss/mixins/tooltip-position.scss +7 -0
- package/src/assets/scss/mixins.scss +2 -2
- package/src/assets/scss/style.scss +4 -4
- package/src/assets/scss/typography.scss +3 -3
- package/src/assets/scss/variables/colors.json +0 -0
- package/src/assets/scss/variables/colors.scss +0 -0
- package/src/assets/scss/variables/shadows.json +0 -0
- package/src/assets/scss/variables/shadows.scss +0 -0
- package/src/components/Accordion/Accordion.scss +3 -3
- package/src/components/Accordion/Accordion.stories.js +0 -0
- package/src/components/Accordion/Accordion.vue +2 -2
- package/src/components/Accordion/Acordion.spec.js +0 -0
- package/src/components/Accordion/readme.mdx +0 -0
- package/src/components/Alert/Alert.spec.js +0 -0
- package/src/components/Alert/Alert.stories.js +0 -0
- package/src/components/Alert/Alert.vue +6 -1
- package/src/components/Alert/alert.scss +8 -3
- package/src/components/Alert/constants.js +0 -0
- package/src/components/Alert/readme.mdx +0 -0
- package/src/components/Avatar/Avatar.stories.js +5 -1
- package/src/components/Avatar/Avatar.vue +27 -4
- package/src/components/Avatar/constants.js +6 -0
- package/src/components/Badge/Badge.spec.js +0 -0
- package/src/components/Badge/Badge.vue +2 -2
- package/src/components/Badge/readme.mdx +0 -0
- package/src/components/Breadcrumbs/Breadcrumbs.vue +24 -9
- package/src/components/Breadcrumbs/breadcrumbs.scss +5 -5
- package/src/components/Breadcrumbs/breadcrumbs.stories.js +0 -0
- package/src/components/Button/Button.spec.js +0 -0
- package/src/components/Button/Button.vue +20 -4
- package/src/components/Button/button.scss +8 -3
- package/src/components/Button/readme.mdx +0 -0
- package/src/components/ButtonGroup/ButtonGroup.stories.js +0 -0
- package/src/components/ButtonGroup/readme.mdx +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/Dropdown.stories.js +0 -0
- package/src/components/Dropdown/Dropdown.vue +3 -3
- package/src/components/Dropdown/DropdownDivider.vue +1 -1
- package/src/components/Dropdown/DropdownItem.vue +27 -5
- package/src/components/Dropdown/DropdownList.stories.js +0 -0
- package/src/components/Dropdown/DropdownList.vue +6 -2
- package/src/components/Dropdown/readme.mdx +0 -0
- package/src/components/Form/CharactersCount.vue +12 -9
- package/src/components/Form/Checkbox/Checkbox.scss +4 -4
- package/src/components/Form/Checkbox/Checkbox.stories.js +0 -0
- package/src/components/Form/Checkbox/Checkbox.vue +25 -12
- package/src/components/Form/Checkbox/readme.mdx +0 -0
- package/src/components/Form/CheckboxGroup/CheckboxGroup.stories.js +0 -0
- 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 +356 -265
- package/src/components/Form/DatePicker/DatePicker.stories.js +0 -0
- package/src/components/Form/DatePicker/DatePicker.vue +73 -18
- package/src/components/Form/DatePicker/readme.mdx +0 -0
- package/src/components/Form/FormGroup/FormGroup.vue +5 -5
- package/src/components/Form/FormGroup/FormGroupSet.vue +1 -1
- package/src/components/Form/Input/Input.stories.js +0 -0
- package/src/components/Form/Input/Input.vue +120 -14
- package/src/components/Form/Input/constants.js +0 -0
- package/src/components/Form/Input/input.scss +64 -5
- package/src/components/Form/Input/readme.mdx +0 -0
- package/src/components/Form/Label/Label.stories.js +0 -0
- package/src/components/Form/Label/Label.vue +24 -12
- package/src/components/Form/Label/readme.mdx +0 -0
- package/src/components/Form/PhoneInput/PhoneInput.stories.js +0 -0
- package/src/components/Form/PhoneInput/PhoneInput.vue +77 -28
- package/src/components/Form/PhoneInput/phoneInput.scss +42 -10
- package/src/components/Form/PhoneInput/readme.mdx +0 -0
- package/src/components/Form/Radio/Radio.stories.js +0 -0
- package/src/components/Form/Radio/Radio.vue +17 -45
- package/src/components/Form/Radio/radio.scss +8 -5
- package/src/components/Form/Radio/readme.mdx +0 -0
- package/src/components/Form/TextEditor/TextEditor.stories.js +0 -0
- package/src/components/Form/TextEditor/TextEditor.vue +92 -138
- package/src/components/Form/TextEditor/Toolbar.vue +723 -0
- package/src/components/Form/TextEditor/icons/toolbarIcons.js +8 -0
- package/src/components/Form/TextEditor/plugins/imageBlot.js +23 -0
- package/src/components/Form/TextEditor/readme.mdx +0 -0
- package/src/components/Form/TextEditor/setupTextEditor.js +71 -0
- package/src/components/Form/TextEditor/textEditor.scss +15 -339
- package/src/components/Form/Textarea/Textarea.spec.js +0 -0
- package/src/components/Form/Textarea/Textarea.stories.js +0 -0
- package/src/components/Form/Textarea/Textarea.vue +28 -10
- package/src/components/Form/Textarea/readme.mdx +0 -0
- package/src/components/Form/Textarea/textarea.scss +33 -5
- package/src/components/Form/Toggle/Toggle.stories.js +0 -0
- package/src/components/Form/Toggle/Toggle.vue +1 -1
- package/src/components/Form/Toggle/readme.mdx +0 -0
- package/src/components/Form/Toggle/toggle.scss +3 -3
- package/src/components/IconButton/IconButton.scss +13 -2
- package/src/components/IconButton/IconButton.vue +11 -4
- package/src/components/IconButton/readme.mdx +0 -0
- package/src/components/List.vue +1 -1
- package/src/components/Modal/Modal.stories.js +0 -0
- package/src/components/Modal/Modal.vue +109 -40
- package/src/components/Modal/constants.js +0 -0
- package/src/components/Modal/readme.mdx +0 -0
- package/src/components/Pagination/LimitSelector.vue +5 -0
- package/src/components/Pagination/Pagination.vue +37 -5
- package/src/components/Pagination/pagination.scss +20 -4
- package/src/components/Panel/Panel.stories.js +0 -0
- package/src/components/Panel/Panel.vue +72 -6
- package/src/components/Popover/Popover.vue +27 -10
- package/src/components/Popover/constants.js +0 -0
- package/src/components/Popover/popover.scss +4 -4
- package/src/components/Popover/readme.mdx +0 -0
- package/src/components/ProgressBar/ProgressBar.vue +1 -1
- package/src/components/ProgressBar/constants.js +0 -0
- package/src/components/ProgressBar/progressBar.scss +1 -1
- package/src/components/ProgressBar/readme.mdx +0 -0
- package/src/components/Sorting/Sorting.stories.js +0 -0
- package/src/components/Sorting/Sorting.vue +25 -27
- package/src/components/Sorting/sorting.scss +5 -5
- package/src/components/SplitButton/SplitButton.stories.js +0 -0
- package/src/components/SplitButton/SplitButton.vue +52 -9
- package/src/components/SplitButton/SplitButtonItem.vue +14 -2
- package/src/components/SplitButton/readme.mdx +0 -0
- package/src/components/SplitButton/splitButton.scss +3 -3
- package/src/components/StatusIndicator/StatusIndicator.stories.js +0 -0
- package/src/components/StatusIndicator/StatusIndicator.vue +2 -2
- package/src/components/StatusIndicator/constants.js +0 -0
- package/src/components/StatusIndicator/icons.js +0 -0
- package/src/components/StatusIndicator/readme.mdx +0 -0
- package/src/components/Table/Cells/Cell.vue +2 -2
- package/src/components/Table/Cells/CheckboxCell.vue +0 -0
- package/src/components/Table/Row.vue +1 -1
- 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/TabDropdown.vue +1 -1
- package/src/components/Tabs/Tabs.stories.js +0 -0
- package/src/components/Tabs/Tabs.vue +21 -6
- package/src/components/Tabs/tabs.scss +12 -6
- package/src/components/TagPill/TagPill.stories.js +0 -0
- package/src/components/TagPill/TagPill.vue +8 -2
- package/src/components/TagPill/readme.mdx +0 -0
- package/src/components/ToggleTip/ToggleTip.vue +1 -1
- package/src/components/ToggleTip/constants.js +0 -0
- package/src/components/ToggleTip/readme.mdx +0 -0
- package/src/components/ToggleTip/toggleTip.scss +5 -5
- package/src/components/Tooltip/Tooltip.vue +4 -4
- package/src/components/Tooltip/readme.mdx +0 -0
- package/src/components/TreeSelect/Option.vue +59 -25
- package/src/components/TreeSelect/Select.stories.js +0 -0
- package/src/components/TreeSelect/Select.vue +283 -148
- package/src/components/TreeSelect/TreeSelect.stories.js +0 -0
- package/src/components/TreeSelect/mixins/InfinityLoaderMixin.js +40 -0
- package/src/components/TreeSelect/scss/option.scss +37 -6
- package/src/components/TreeSelect/scss/select.scss +97 -6
- package/src/constants/keyCodes.js +1 -0
- package/src/directives/outside/outside.stories.js +0 -0
- package/src/directives/outside/readme.mdx +0 -0
- package/src/directives/tooltip/TooltipController.js +2 -0
- package/src/directives/tooltip/readme.mdx +0 -0
- package/src/directives/tooltip/textOverflowTooltip.js +3 -1
- package/src/directives/tooltip/tooltip.js +61 -0
- package/src/directives/tooltip/tooltip.stories.js +0 -0
- package/src/helpers/debounce.js +23 -0
- package/src/helpers/removeEvents.js +0 -0
- package/src/helpers/stripHtml.js +4 -0
- package/src/index.js +7 -0
- package/src/main.js +0 -0
- package/src/mixins/expandAnimation.js +0 -0
- package/src/scripts/parseScssVariables.js +0 -0
- package/src/stories/link.readme.mdx +0 -0
- package/src/stories/variables/colors.stories.js +0 -0
- package/src/stories/variables/shadows.stories.js +0 -0
- package/static/docks/button.pdf +0 -0
- package/static/favicon.ico +0 -0
- package/vite.config.js +3 -9
- package/dist/index.js +0 -20786
- package/dist/index.umd.cjs +0 -227
- package/dist/style.css +0 -1
|
File without changes
|
|
@@ -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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@use "../../../assets/scss/variables/colors.scss" as *;
|
|
2
|
+
@use "../../../assets/scss/typography.scss" as *;
|
|
3
|
+
@use "../../../assets/scss/mixins.scss" as *;
|
|
4
4
|
|
|
5
5
|
$option-hover-bg: $gray-100;
|
|
6
6
|
$option-checked-bg: $gray-100;
|
|
@@ -41,7 +41,7 @@ $option-checked-hover-bg: $blue-50;
|
|
|
41
41
|
|
|
42
42
|
.ib-checkbox-body {
|
|
43
43
|
padding: 0;
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
45
|
|
|
46
46
|
.option-label {
|
|
47
47
|
margin-left: 15px;
|
|
@@ -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
|
}
|
|
@@ -138,7 +165,7 @@ $option-checked-hover-bg: $blue-50;
|
|
|
138
165
|
.ib-checkbox {
|
|
139
166
|
transform: translateX(75px);
|
|
140
167
|
}
|
|
141
|
-
|
|
168
|
+
|
|
142
169
|
.option-label {
|
|
143
170
|
width: calc(100% - 100px);
|
|
144
171
|
}
|
|
@@ -185,7 +212,7 @@ $option-checked-hover-bg: $blue-50;
|
|
|
185
212
|
}
|
|
186
213
|
}
|
|
187
214
|
|
|
188
|
-
|
|
215
|
+
|
|
189
216
|
.ib-toggle-container {
|
|
190
217
|
position: absolute;
|
|
191
218
|
right: 0;
|
|
@@ -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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
1
|
+
@use "../../../assets/scss/variables/shadows.scss" as *;
|
|
2
|
+
@use "../../../assets/scss/variables/colors.scss" as *;
|
|
3
|
+
@use "../../../assets/scss/typography.scss" as *;
|
|
4
|
+
@use "../../../assets/scss/mixins.scss" as *;
|
|
5
5
|
|
|
6
6
|
$choice-bg: $gray-100;
|
|
7
7
|
$choice-border-color: $gray-500;
|
|
@@ -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
|
+
}
|
|
169
181
|
}
|
|
170
182
|
}
|
|
171
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
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
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,55 @@ $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
|
+
}
|
|
254
|
+
|
|
255
|
+
&.disabled-parent-autocheck {
|
|
256
|
+
.tree-select-option {
|
|
257
|
+
&.tree-select-option-indeterminate {
|
|
258
|
+
.ib-checkbox-input {
|
|
259
|
+
background-color: transparent;
|
|
260
|
+
|
|
261
|
+
ion-icon {
|
|
262
|
+
color: $blue-900;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ib-checkbox-body:hover .ib-checkbox-input {
|
|
267
|
+
background-color: transparent!important;
|
|
268
|
+
border-color: #a6ceff !important;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
&.tree-select-option-checked {
|
|
273
|
+
.ib-checkbox-input {
|
|
274
|
+
border-color: #0060D6;
|
|
275
|
+
background-color: #0060D6;
|
|
276
|
+
|
|
277
|
+
ion-icon {
|
|
278
|
+
color: white;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.ib-checkbox-body:hover .ib-checkbox-input {
|
|
283
|
+
background-color: $blue-700 !important;
|
|
284
|
+
border-color: $blue-700 !important;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.ib-list {
|
|
288
|
+
.ib-checkbox:not(.ib-checkbox-filled) .ib-checkbox-input {
|
|
289
|
+
background-color: transparent;
|
|
290
|
+
|
|
291
|
+
ion-icon {
|
|
292
|
+
color: $blue-900;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
208
299
|
}
|
|
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
|
}
|
|
File without changes
|
|
@@ -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 &&
|
|
@@ -34,18 +43,70 @@ const destroyTooltip = (event, el) => {
|
|
|
34
43
|
}
|
|
35
44
|
};
|
|
36
45
|
|
|
46
|
+
const handleScroll = (el, binding) => {
|
|
47
|
+
tooltip.destroyTooltip(el);
|
|
48
|
+
|
|
49
|
+
if (el.__tooltip_scroll_timeout) {
|
|
50
|
+
clearTimeout(el.__tooltip_scroll_timeout);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
el.__tooltip_scroll_timeout = setTimeout(() => {
|
|
54
|
+
const rect = el.getBoundingClientRect();
|
|
55
|
+
const mouseEvent = el.__tooltip_last_mouse_event;
|
|
56
|
+
|
|
57
|
+
if (mouseEvent) {
|
|
58
|
+
const { clientX, clientY } = mouseEvent;
|
|
59
|
+
const isOverElement =
|
|
60
|
+
clientX >= rect.left &&
|
|
61
|
+
clientX <= rect.right &&
|
|
62
|
+
clientY >= rect.top &&
|
|
63
|
+
clientY <= rect.bottom;
|
|
64
|
+
|
|
65
|
+
if (isOverElement) {
|
|
66
|
+
createTooltip(el, binding);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, 250);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const trackMousePosition = (el) => {
|
|
73
|
+
return (e) => {
|
|
74
|
+
el.__tooltip_last_mouse_event = e;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
|
|
37
78
|
const attachTooltipListeners = (el, binding) => {
|
|
79
|
+
|
|
38
80
|
el.__tooltip_create = () => createTooltip(el, binding);
|
|
39
81
|
el.__tooltip_destroy = (e) => destroyTooltip(e, el);
|
|
82
|
+
el.__tooltip_scroll = () => handleScroll(el, binding);
|
|
83
|
+
el.__tooltip_track_mouse = trackMousePosition(el);
|
|
40
84
|
|
|
41
85
|
el.addEventListener("mouseenter", el.__tooltip_create);
|
|
42
86
|
document.addEventListener("mousemove", el.__tooltip_destroy);
|
|
87
|
+
document.addEventListener("mousemove", el.__tooltip_track_mouse);
|
|
88
|
+
document.addEventListener("scroll", el.__tooltip_scroll, true);
|
|
89
|
+
|
|
90
|
+
el.addEventListener("focus", el.__tooltip_create);
|
|
91
|
+
el.addEventListener("blur", el.__tooltip_destroy, true);
|
|
43
92
|
};
|
|
44
93
|
|
|
45
94
|
const removeTooltipListeners = (el) => {
|
|
95
|
+
if (el.__tooltip_scroll_timeout) {
|
|
96
|
+
clearTimeout(el.__tooltip_scroll_timeout);
|
|
97
|
+
}
|
|
98
|
+
|
|
46
99
|
tooltip.destroyTooltip(el);
|
|
47
100
|
el.removeEventListener("mouseenter", el.__tooltip_create);
|
|
48
101
|
document.removeEventListener("mousemove", el.__tooltip_destroy);
|
|
102
|
+
document.removeEventListener("mousemove", el.__tooltip_track_mouse);
|
|
103
|
+
document.removeEventListener("scroll", el.__tooltip_scroll, true);
|
|
104
|
+
|
|
105
|
+
el.removeEventListener("focus", el.__tooltip_create);
|
|
106
|
+
el.removeEventListener("blur", el.__tooltip_destroy, true);
|
|
107
|
+
|
|
108
|
+
delete el.__tooltip_last_mouse_event;
|
|
109
|
+
delete el.__tooltip_scroll_timeout;
|
|
49
110
|
};
|
|
50
111
|
|
|
51
112
|
export const TooltipDirective = {
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default function debounce(f, ms) {
|
|
2
|
+
let timer = null;
|
|
3
|
+
|
|
4
|
+
function debounced(...args) {
|
|
5
|
+
if (timer) {
|
|
6
|
+
clearTimeout(timer);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
timer = setTimeout(() => {
|
|
10
|
+
f.apply(this, args);
|
|
11
|
+
timer = null;
|
|
12
|
+
}, ms);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
debounced.cancel = function() {
|
|
16
|
+
if (timer) {
|
|
17
|
+
clearTimeout(timer);
|
|
18
|
+
timer = null;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return debounced;
|
|
23
|
+
}
|
|
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";
|
|
@@ -37,9 +38,15 @@ export { default as IbRadio } from "./components/Form/Radio/Radio.vue";
|
|
|
37
38
|
export { default as IbToggle } from "./components/Form/Toggle/Toggle.vue";
|
|
38
39
|
export { default as IbTextarea } from "./components/Form/Textarea/Textarea.vue";
|
|
39
40
|
export { default as IbTreeSelect } from "./components/TreeSelect/Select.vue";
|
|
41
|
+
export { default as IbSelect } from "./components/TreeSelect/Select.vue";
|
|
40
42
|
export { default as IbDatePicker } from "./components/Form/DatePicker/DatePicker.vue";
|
|
41
43
|
export { default as IbPhoneInput } from "./components/Form/PhoneInput/PhoneInput.vue";
|
|
44
|
+
|
|
45
|
+
// Text Editor
|
|
42
46
|
export { default as IbTextEditor } from "./components/Form/TextEditor/TextEditor.vue";
|
|
47
|
+
export { default as IbTextEditorToolbar } from "./components/Form/TextEditor/Toolbar.vue";
|
|
48
|
+
export { setupTextEditor } from "./components/Form/TextEditor/setupTextEditor.js";
|
|
49
|
+
export { default as IbCharactersCount } from "./components/Form/CharactersCount.vue";
|
|
43
50
|
|
|
44
51
|
// Table
|
|
45
52
|
export { default as IbTable } from "./components/Table/Table.vue";
|
package/src/main.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/static/docks/button.pdf
CHANGED
|
File without changes
|
package/static/favicon.ico
CHANGED
|
File without changes
|
package/vite.config.js
CHANGED
|
@@ -3,7 +3,6 @@ import { resolve } from "path";
|
|
|
3
3
|
import { defineConfig } from "vite";
|
|
4
4
|
import vue from "@vitejs/plugin-vue";
|
|
5
5
|
|
|
6
|
-
// https://vitejs.dev/config/
|
|
7
6
|
export default defineConfig({
|
|
8
7
|
plugins: [
|
|
9
8
|
vue({
|
|
@@ -19,20 +18,15 @@ export default defineConfig({
|
|
|
19
18
|
},
|
|
20
19
|
build: {
|
|
21
20
|
lib: {
|
|
22
|
-
// Could also be a dictionary or array of multiple entry points
|
|
23
|
-
// eslint-disable-next-line no-undef
|
|
24
21
|
entry: resolve(__dirname, "src/index.js"),
|
|
25
22
|
name: "MyLib",
|
|
26
|
-
|
|
27
|
-
fileName:
|
|
23
|
+
formats: ['es', 'umd'],
|
|
24
|
+
fileName: (format) => `index.${format}.js`,
|
|
25
|
+
cssFileName: 'index',
|
|
28
26
|
},
|
|
29
27
|
rollupOptions: {
|
|
30
|
-
// make sure to externalize deps that shouldn't be bundled
|
|
31
|
-
// into your library
|
|
32
28
|
external: ["vue"],
|
|
33
29
|
output: {
|
|
34
|
-
// Provide global variables to use in the UMD build
|
|
35
|
-
// for externalized deps
|
|
36
30
|
globals: {
|
|
37
31
|
vue: "Vue",
|
|
38
32
|
},
|