@avakhula/ui 0.0.352 → 0.0.353

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.
Files changed (83) hide show
  1. package/.prettierrc.json +0 -0
  2. package/.storybook/intelliboardTheme.js +0 -0
  3. package/.storybook/manager.js +0 -0
  4. package/.storybook/scss-loader.scss +0 -0
  5. package/.storybook/withSource.js +0 -0
  6. package/README.md +0 -0
  7. package/dist/index.js +7098 -6710
  8. package/dist/index.umd.cjs +72 -72
  9. package/dist/style.css +1 -1
  10. package/index.html +0 -0
  11. package/package.json +4 -3
  12. package/src/App.vue +13 -69
  13. package/src/EventEmmiter.js +0 -0
  14. package/src/assets/scss/mixins.scss +0 -0
  15. package/src/assets/scss/reset.scss +0 -0
  16. package/src/assets/scss/style.scss +0 -0
  17. package/src/assets/scss/typography.scss +0 -0
  18. package/src/components/Alert/Alert.vue +5 -0
  19. package/src/components/Alert/alert.scss +6 -1
  20. package/src/components/Badge/Badge.stories.js +0 -0
  21. package/src/components/Button/Button.stories.js +0 -0
  22. package/src/components/Button/constants.js +0 -0
  23. package/src/components/ButtonGroup/ButtonGroup.vue +0 -0
  24. package/src/components/Chips/Chips.stories.js +30 -0
  25. package/src/components/Chips/Chips.vue +125 -0
  26. package/src/components/Dropdown/Dropdown.spec.js +0 -0
  27. package/src/components/Dropdown/DropdownDivider.vue +0 -0
  28. package/src/components/Dropdown/DropdownList.vue +0 -0
  29. package/src/components/Dropdown/constants.js +0 -0
  30. package/src/components/Form/CharactersCount.vue +10 -7
  31. package/src/components/Form/Checkbox/Checkbox.vue +2 -1
  32. package/src/components/Form/DatePicker/DatePicker.vue +32 -11
  33. package/src/components/Form/DatePicker/Icons/chevron-back.js +0 -0
  34. package/src/components/Form/DatePicker/Icons/chevron-forward.js +0 -0
  35. package/src/components/Form/FormGroup/FormGroup.stories.js +0 -0
  36. package/src/components/Form/FormGroup/FormGroupSet.stories.js +0 -0
  37. package/src/components/Form/FormGroup/FormGroupSet.vue +0 -0
  38. package/src/components/Form/Input/Input.vue +2 -2
  39. package/src/components/Form/PhoneInput/PhoneInput.vue +26 -21
  40. package/src/components/Form/PhoneInput/phoneInput.scss +4 -5
  41. package/src/components/Form/Radio/Radio.vue +3 -3
  42. package/src/components/Form/TextEditor/TextEditor.vue +46 -4
  43. package/src/components/Form/TextEditor/icons/svg/chevron-down.svg +0 -0
  44. package/src/components/Form/TextEditor/icons/toolbarIcons.js +0 -0
  45. package/src/components/Form/TextEditor/plugins/alphabetList.js +0 -0
  46. package/src/components/Form/TextEditor/textEditor.scss +50 -26
  47. package/src/components/Form/Textarea/Textarea.spec.js +0 -0
  48. package/src/components/Form/Textarea/textarea.scss +7 -1
  49. package/src/components/Icon.vue +0 -0
  50. package/src/components/IconButton/IconButton.stories.js +0 -0
  51. package/src/components/IconButton/constants.js +0 -0
  52. package/src/components/Modal/Modal.vue +6 -4
  53. package/src/components/Pagination/Pagination.stories.js +0 -0
  54. package/src/components/Pagination/Pagination.vue +2 -2
  55. package/src/components/Popover/Popover.stories.js +0 -0
  56. package/src/components/ProgressBar/ProgressBar.stories.js +0 -0
  57. package/src/components/Sorting/constants.js +0 -0
  58. package/src/components/SplitButton/SplitButtonItem.vue +0 -0
  59. package/src/components/SplitButton/constants.js +0 -0
  60. package/src/components/Table/Cells/Cell.vue +0 -0
  61. package/src/components/Table/Cells/CheckboxCell.vue +0 -0
  62. package/src/components/Table/Row.vue +0 -0
  63. package/src/components/Table/Table.stories.js +0 -0
  64. package/src/components/Table/Table.vue +0 -0
  65. package/src/components/Tabs/Tab.vue +0 -0
  66. package/src/components/TagPill/TagPill.vue +0 -0
  67. package/src/components/TagPill/constants.js +0 -0
  68. package/src/components/ToggleTip/ToggleTip.stories.js +0 -0
  69. package/src/components/ToggleTip/ToggleTip.vue +0 -0
  70. package/src/components/Tooltip/Tooltip.stories.js +0 -0
  71. package/src/components/TreeSelect/Select.vue +17 -4
  72. package/src/components/TreeSelect/mixins/InfinityLoaderMixin.js +40 -0
  73. package/src/constants/events.js +0 -0
  74. package/src/constants/keyCodes.js +0 -0
  75. package/src/directives/outside/outside.js +0 -0
  76. package/src/directives/tooltip/tooltip.js +15 -0
  77. package/src/helpers/generateUID.js +0 -0
  78. package/src/helpers/getHrefFromID.js +0 -0
  79. package/src/helpers/multiLineOverflows.js +0 -0
  80. package/src/index.js +2 -0
  81. package/src/stories/link.stories.js +0 -0
  82. package/static/Logo.svg +0 -0
  83. package/vite.config.js +0 -0
@@ -32,11 +32,11 @@
32
32
  ref="wrapper"
33
33
  >
34
34
  <QuillEditor
35
+ aria-label="text-editor"
35
36
  @textChange="onChange"
36
37
  @blur="onBlur"
37
38
  @focus="onFocus"
38
39
  ref="quill"
39
- toolbar="#toolbar"
40
40
  v-model:content="data"
41
41
  contentType="html"
42
42
  :options="config"
@@ -44,8 +44,18 @@
44
44
  ></QuillEditor>
45
45
  </div>
46
46
  <div id="toolbar" class="toolbar" ref="toolbar">
47
+
48
+ <div class="toolbar-group header-toolbar-group" v-if="placeholders.length">
49
+ <label class="toolbar-group__label" for="placeholders">Placeholder Selector</label>
50
+ <select id="placeholders" class="ql-placeholder">
51
+ <option selected value="default" class="disabled"></option>
52
+ <option v-for="placeholder in placeholders" :key="placeholder.id" :value="placeholder.id">{{ placeholder.label }}</option>
53
+ </select>
54
+ </div>
55
+
47
56
  <div class="toolbar-group header-toolbar-group">
48
- <select class="ql-header">
57
+ <label class="toolbar-group__label" for="header-selector">Header Selector</label>
58
+ <select id="header-selector" class="ql-header">
49
59
  <option value="1"></option>
50
60
  <option value="2"></option>
51
61
  <option value="3"></option>
@@ -58,34 +68,42 @@
58
68
 
59
69
  <div class="toolbar-group">
60
70
  <ib-icon-button
71
+ aria-label="button-bold"
61
72
  class="toolbar-item ql-bold"
62
73
  kind="ghost"
63
74
  ></ib-icon-button>
64
75
  <ib-icon-button
76
+ aria-label="button-italic"
65
77
  class="toolbar-item ql-italic"
66
78
  kind="ghost"
67
79
  ></ib-icon-button>
68
80
  <ib-icon-button
81
+ aria-label="button-underline"
69
82
  class="toolbar-item ql-underline"
70
83
  kind="ghost"
71
84
  ></ib-icon-button>
72
85
  <ib-icon-button
86
+ aria-label="button-strike"
73
87
  class="toolbar-item ql-strike"
74
88
  kind="ghost"
75
89
  ></ib-icon-button>
76
90
  </div>
77
91
 
78
92
  <div class="toolbar-group">
79
- <select class="ql-background"></select>
80
- <select class="ql-color"></select>
93
+ <label class="toolbar-group__label" for="background-selector">Background Selector</label>
94
+ <select id="background-selector" class="ql-background"></select>
95
+ <label class="toolbar-group__label" for="color-selector">Background Color Selector</label>
96
+ <select id="color-selector" class="ql-color"></select>
81
97
  </div>
82
98
 
83
99
  <div class="toolbar-group">
84
100
  <ib-icon-button
101
+ aria-label="button-code-block"
85
102
  class="toolbar-item ql-code-block"
86
103
  kind="ghost"
87
104
  ></ib-icon-button>
88
105
  <ib-icon-button
106
+ aria-label="button-link"
89
107
  class="toolbar-item ql-link"
90
108
  kind="ghost"
91
109
  ></ib-icon-button>
@@ -93,20 +111,24 @@
93
111
 
94
112
  <div class="toolbar-group">
95
113
  <ib-icon-button
114
+ aria-label="button-align"
96
115
  class="toolbar-item ql-align"
97
116
  kind="ghost"
98
117
  ></ib-icon-button>
99
118
  <ib-icon-button
119
+ aria-label="button-align-center"
100
120
  class="ql-align toolbar-item"
101
121
  value="center"
102
122
  kind="ghost"
103
123
  ></ib-icon-button>
104
124
  <ib-icon-button
125
+ aria-label="button-align-right"
105
126
  class="ql-align toolbar-item"
106
127
  value="right"
107
128
  kind="ghost"
108
129
  ></ib-icon-button>
109
130
  <ib-icon-button
131
+ aria-label="button-align-justify"
110
132
  class="ql-align toolbar-item"
111
133
  value="justify"
112
134
  kind="ghost"
@@ -115,17 +137,20 @@
115
137
 
116
138
  <div class="toolbar-group">
117
139
  <ib-icon-button
140
+ aria-label="button-ordered-list"
118
141
  class="ql-list toolbar-item"
119
142
  value="ordered"
120
143
  kind="ghost"
121
144
  ></ib-icon-button>
122
145
  <ib-icon-button
146
+ aria-label="button-bullet-list"
123
147
  class="ql-list toolbar-item"
124
148
  value="bullet"
125
149
  kind="ghost"
126
150
  ></ib-icon-button>
127
151
 
128
152
  <ib-icon-button
153
+ aria-label="button-alphabet-list"
129
154
  class="ql-alphabet-list alphabet-list toolbar-item"
130
155
  kind="ghost"
131
156
  ></ib-icon-button>
@@ -141,6 +166,7 @@ import IbIconButton from "../../IconButton/IconButton.vue";
141
166
  import IbAlert from "../../Alert/Alert.vue";
142
167
  import IbCharacterCount from "../CharactersCount.vue";
143
168
  import {AlphabetList, AlphabetListItem} from "./plugins/alphabetList";
169
+ import getPlaceholderModule from 'quill-placeholder-module';
144
170
  import "@vueup/vue-quill/dist/vue-quill.snow.css";
145
171
 
146
172
  import {
@@ -179,6 +205,11 @@ Quill.register({
179
205
  "formats/alphabet-list/item": AlphabetListItem,
180
206
  });
181
207
 
208
+ Quill.register('modules/placeholder', getPlaceholderModule(Quill, {
209
+ className: 'ql-placeholder-content'
210
+ }))
211
+
212
+
182
213
  Quill.register(icons);
183
214
  Quill.debug("error");
184
215
 
@@ -193,6 +224,10 @@ export default {
193
224
  type: String,
194
225
  default: "",
195
226
  },
227
+ placeholders: {
228
+ type: Array,
229
+ default: () => []
230
+ },
196
231
  modelValue: {
197
232
  type: String,
198
233
  },
@@ -291,6 +326,13 @@ export default {
291
326
  placeholder: this.data.length ? "" : this.placeholder,
292
327
  readOnly: this.readOnly ? this.readOnly : this.disable,
293
328
  enable: this.enable,
329
+ modules: {
330
+ toolbar: {container: '#toolbar'},
331
+ placeholder: {
332
+ delimiters: ['{{', '}}'],
333
+ placeholders: this.placeholders
334
+ }
335
+ },
294
336
  };
295
337
 
296
338
  return Object.assign(config, this.options);
@@ -249,6 +249,10 @@ ol[type="a"] li {
249
249
  display: flex;
250
250
  padding: 0 10px;
251
251
 
252
+ &__label {
253
+ display: none;
254
+ }
255
+
252
256
  &:last-child {
253
257
  &::before {
254
258
  display: none;
@@ -274,6 +278,24 @@ ol[type="a"] li {
274
278
  }
275
279
  }
276
280
 
281
+ .ql-picker.ql-placeholder {
282
+ width: 118px;
283
+
284
+ .ql-picker-options {
285
+ [data-value='default'] {
286
+ display: none;
287
+ }
288
+ }
289
+ }
290
+
291
+ .ql-picker.ql-placeholder > span.ql-picker-label::before {
292
+ content: 'Placeholders';
293
+ }
294
+
295
+ .ql-picker.ql-placeholder > span.ql-picker-options > span.ql-picker-item::before {
296
+ content: attr(data-label);
297
+ }
298
+
277
299
  // Headings dropdown
278
300
  .ql-snow .ql-picker.ql-header .ql-picker-item {
279
301
  &::before {
@@ -395,37 +417,39 @@ ol[type="a"] li {
395
417
  }
396
418
  }
397
419
 
398
- .ql-picker-options {
399
- left: -2px;
400
- margin-top: 5px !important;
401
- border-radius: 4px;
402
- padding: 6.5px 0;
403
- background-color: $white;
404
- box-shadow: $ib-shadow-4;
420
+ .ql-snow {
421
+ .ql-picker-options {
422
+ left: -2px;
423
+ margin-top: 5px !important;
424
+ border-radius: 4px;
425
+ padding: 6.5px 0;
426
+ background-color: $white;
427
+ box-shadow: $ib-shadow-4;
405
428
 
406
- .ql-picker-item {
407
- height: 36px;
408
- padding: 0px 15px 0px 13px;
409
- display: flex;
410
- align-items: center;
411
- border-left: 2px solid transparent;
412
- transition: border-color 0.3s, background-color 0.3s;
413
- @include focus();
429
+ .ql-picker-item {
430
+ height: 36px;
431
+ padding: 0px 15px 0px 13px;
432
+ display: flex;
433
+ align-items: center;
434
+ border-left: 2px solid transparent;
435
+ transition: border-color 0.3s, background-color 0.3s;
436
+ @include focus();
414
437
 
415
- &:before {
416
- color: $neutral-900;
417
- }
438
+ &:before {
439
+ color: $neutral-900;
440
+ }
418
441
 
419
- &:hover {
420
- background-color: $gray-100;
421
- }
442
+ &:hover {
443
+ background-color: $gray-100;
444
+ }
422
445
 
423
- &.ql-selected {
424
- border-color: $blue-900;
425
- background-color: $gray-100;
446
+ &.ql-selected {
447
+ border-color: $blue-900;
448
+ background-color: $gray-100;
426
449
 
427
- &:hover {
428
- background-color: $blue-50;
450
+ &:hover {
451
+ background-color: $blue-50;
452
+ }
429
453
  }
430
454
  }
431
455
  }
File without changes
@@ -14,7 +14,7 @@ $textarea-hover-border-color: $blue-700;
14
14
  $textarea-error-outline-color: $red-800;
15
15
 
16
16
  .textarea-wrapper {
17
- width: fit-content;
17
+ width: 100%;
18
18
  position: relative;
19
19
 
20
20
  .character-count {
@@ -36,6 +36,7 @@ $textarea-error-outline-color: $red-800;
36
36
 
37
37
  textarea.ib-textarea {
38
38
  @include Ib-H4-regular;
39
+ width: 100%;
39
40
  height: 80px;
40
41
  min-height: 36px;
41
42
  border: none;
@@ -76,6 +77,11 @@ textarea.ib-textarea {
76
77
  }
77
78
  }
78
79
 
80
+ &:read-only:hover {
81
+ background-color: $textarea-bg;
82
+ color: $textarea-text-color;
83
+ }
84
+
79
85
  &.error {
80
86
  border-radius: 4px;
81
87
  border-bottom-color: transparent;
File without changes
File without changes
File without changes
@@ -116,8 +116,10 @@ export default {
116
116
  this.close();
117
117
  }
118
118
  },
119
- onTriggerBlur() {
120
- this.$refs.modal?.querySelector("a, button, [tabindex]")?.focus();
119
+ onTriggerBlur(e) {
120
+ if (!this.$refs.modal?.contains(e.relatedTarget) && this.isActive) {
121
+ this.$refs.modal?.querySelector("a, button, [tabindex]")?.focus();
122
+ }
121
123
  },
122
124
  open() {
123
125
  this.isActive = true;
@@ -131,9 +133,9 @@ export default {
131
133
  this.$emit("close");
132
134
  },
133
135
  setFocusOnModal(e) {
134
- if(!this.$refs.modal?.contains(e.target) && this.isActive) {
136
+ if((!this.$refs.modal?.contains(e.target) && !this.$refs.modal?.contains(e.relatedTarget)) && this.isActive) {
135
137
  this.$refs.modal.querySelector(
136
- "[tabindex], a, button, input, select, textarea"
138
+ "[tabindex], a, button, input, select, textarea"
137
139
  ).focus();
138
140
  }
139
141
  },
File without changes
@@ -9,9 +9,9 @@
9
9
 
10
10
  <div class="repot-pagination">
11
11
  <template v-if="showPaginationInput">
12
- <ib-label>{{ labelInput }}</ib-label>
12
+ <ib-label for="goToPage">{{ labelInput }}</ib-label>
13
13
  <div class="pagination-input">
14
- <ib-input type="number" :debounce="500" @input="onInput"></ib-input>
14
+ <ib-input id="goToPage" type="number" :debounce="500" @input="onInput"></ib-input>
15
15
  </div>
16
16
  </template>
17
17
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -124,9 +124,10 @@
124
124
  class="tree-search"
125
125
  v-if="showSearch"
126
126
  ref="search"
127
- :show-icon="true"
128
127
  autocomplete="off"
128
+ :show-icon="true"
129
129
  :value="filterString"
130
+ :debounce="searchDebounce"
130
131
  :aria-label="
131
132
  searchPlaceholderText
132
133
  ? searchPlaceholderText
@@ -252,6 +253,8 @@
252
253
  </slot>
253
254
  </template>
254
255
  </template>
256
+
257
+ <div v-if="infiniteLoader" ref="infinityLoader"></div>
255
258
  </list>
256
259
  </div>
257
260
  </template>
@@ -270,6 +273,7 @@ import IbIcon from "../Icon.vue";
270
273
  import IbIconButton from "../IconButton/IconButton.vue";
271
274
  import IbAlert from "../Alert/Alert.vue";
272
275
  import List from "../List.vue";
276
+ import InfinityLoaderMixin from "./mixins/InfinityLoaderMixin";
273
277
 
274
278
  function copy(data) {
275
279
  return JSON.parse(JSON.stringify(data));
@@ -278,8 +282,13 @@ function copy(data) {
278
282
  export default {
279
283
  name: "IbTreeSelect",
280
284
  inject: ["LANG_COMPONENTS"],
285
+ mixins: [InfinityLoaderMixin],
281
286
  props: {
282
287
  classList: [String, Array],
288
+ keywordHighlighter: {
289
+ type: Boolean,
290
+ default: true,
291
+ },
283
292
  placeholder: {
284
293
  type: String,
285
294
  default: "",
@@ -427,7 +436,11 @@ export default {
427
436
  disable: {
428
437
  type: Boolean,
429
438
  default: false
430
- }
439
+ },
440
+ searchDebounce: {
441
+ type: Number,
442
+ default: 0,
443
+ },
431
444
  },
432
445
  emits: [
433
446
  "close",
@@ -530,7 +543,7 @@ export default {
530
543
  const filterString = this.filterString.toLowerCase().trim();
531
544
  this.filterFunc.call(this, options, filterString);
532
545
 
533
- if (filterString) {
546
+ if (filterString && this.keywordHighlighter) {
534
547
  this.marker.mark(filterString);
535
548
  }
536
549
  };
@@ -675,7 +688,7 @@ export default {
675
688
  },
676
689
  filter(filterString, options) {
677
690
  this.filterString = filterString;
678
- this.$emit("search", { search: this.filterString });
691
+ this.$emit("search", this.filterString);
679
692
  this.defaultFilter(options);
680
693
  },
681
694
  setPreparedValues(opt) {
@@ -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
+ };
File without changes
File without changes
File without changes
@@ -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