@avakhula/ui 0.0.503 → 0.0.505-alpha-spa.2

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 (160) hide show
  1. package/.babelrc.json +0 -0
  2. package/.eslintrc.cjs +0 -0
  3. package/.nvmrc +0 -0
  4. package/.storybook/main.js +0 -0
  5. package/.storybook/preview-head.html +0 -0
  6. package/.storybook/preview.js +0 -0
  7. package/dist/index.js +16912 -2987
  8. package/dist/index.umd.cjs +168 -22
  9. package/dist/style.css +1 -1
  10. package/package.json +4 -4
  11. package/src/App.vue +13 -128
  12. package/src/assets/scss/mixins/dropdown-list-item.scss +5 -0
  13. package/src/assets/scss/mixins/tooltip-position.scss +0 -0
  14. package/src/assets/scss/variables/colors.json +0 -0
  15. package/src/assets/scss/variables/colors.scss +0 -0
  16. package/src/assets/scss/variables/shadows.json +0 -0
  17. package/src/assets/scss/variables/shadows.scss +0 -0
  18. package/src/components/Accordion/Accordion.scss +0 -0
  19. package/src/components/Accordion/Accordion.stories.js +0 -0
  20. package/src/components/Accordion/Accordion.vue +0 -0
  21. package/src/components/Accordion/Acordion.spec.js +0 -0
  22. package/src/components/Accordion/readme.mdx +0 -0
  23. package/src/components/Alert/Alert.spec.js +0 -0
  24. package/src/components/Alert/Alert.stories.js +0 -0
  25. package/src/components/Alert/Alert.vue +5 -0
  26. package/src/components/Alert/alert.scss +6 -1
  27. package/src/components/Alert/constants.js +0 -0
  28. package/src/components/Alert/readme.mdx +0 -0
  29. package/src/components/Avatar/Avatar.stories.js +5 -1
  30. package/src/components/Avatar/Avatar.vue +25 -2
  31. package/src/components/Avatar/constants.js +6 -0
  32. package/src/components/Badge/Badge.spec.js +0 -0
  33. package/src/components/Badge/Badge.vue +0 -0
  34. package/src/components/Badge/readme.mdx +0 -0
  35. package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -0
  36. package/src/components/Breadcrumbs/breadcrumbs.scss +0 -0
  37. package/src/components/Breadcrumbs/breadcrumbs.stories.js +0 -0
  38. package/src/components/Button/Button.spec.js +0 -0
  39. package/src/components/Button/Button.vue +19 -3
  40. package/src/components/Button/button.scss +4 -0
  41. package/src/components/Button/readme.mdx +0 -0
  42. package/src/components/ButtonGroup/ButtonGroup.stories.js +0 -0
  43. package/src/components/ButtonGroup/readme.mdx +0 -0
  44. package/src/components/Chips/Chips.stories.js +30 -0
  45. package/src/components/Chips/Chips.vue +125 -0
  46. package/src/components/Dropdown/Dropdown.stories.js +0 -0
  47. package/src/components/Dropdown/Dropdown.vue +0 -0
  48. package/src/components/Dropdown/DropdownItem.vue +26 -4
  49. package/src/components/Dropdown/DropdownList.stories.js +0 -0
  50. package/src/components/Dropdown/readme.mdx +0 -0
  51. package/src/components/Form/CharactersCount.vue +10 -7
  52. package/src/components/Form/Checkbox/Checkbox.scss +0 -0
  53. package/src/components/Form/Checkbox/Checkbox.stories.js +0 -0
  54. package/src/components/Form/Checkbox/Checkbox.vue +23 -11
  55. package/src/components/Form/Checkbox/readme.mdx +0 -0
  56. package/src/components/Form/CheckboxGroup/CheckboxGroup.stories.js +0 -0
  57. package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +15 -0
  58. package/src/components/Form/CheckboxGroup/readme.mdx +2 -0
  59. package/src/components/Form/DatePicker/DatePicker.scss +345 -260
  60. package/src/components/Form/DatePicker/DatePicker.stories.js +0 -0
  61. package/src/components/Form/DatePicker/DatePicker.vue +55 -14
  62. package/src/components/Form/DatePicker/readme.mdx +0 -0
  63. package/src/components/Form/FormGroup/FormGroup.vue +3 -3
  64. package/src/components/Form/Input/Input.stories.js +0 -0
  65. package/src/components/Form/Input/Input.vue +6 -2
  66. package/src/components/Form/Input/constants.js +0 -0
  67. package/src/components/Form/Input/input.scss +0 -0
  68. package/src/components/Form/Input/readme.mdx +0 -0
  69. package/src/components/Form/Label/Label.stories.js +0 -0
  70. package/src/components/Form/Label/Label.vue +22 -10
  71. package/src/components/Form/Label/readme.mdx +0 -0
  72. package/src/components/Form/PhoneInput/PhoneInput.stories.js +0 -0
  73. package/src/components/Form/PhoneInput/PhoneInput.vue +21 -12
  74. package/src/components/Form/PhoneInput/phoneInput.scss +4 -5
  75. package/src/components/Form/PhoneInput/readme.mdx +0 -0
  76. package/src/components/Form/Radio/Radio.stories.js +0 -0
  77. package/src/components/Form/Radio/Radio.vue +22 -35
  78. package/src/components/Form/Radio/radio.scss +5 -2
  79. package/src/components/Form/Radio/readme.mdx +0 -0
  80. package/src/components/Form/TextEditor/TextEditor.stories.js +0 -0
  81. package/src/components/Form/TextEditor/TextEditor.vue +67 -15
  82. package/src/components/Form/TextEditor/readme.mdx +0 -0
  83. package/src/components/Form/TextEditor/textEditor.scss +22 -0
  84. package/src/components/Form/Textarea/Textarea.stories.js +0 -0
  85. package/src/components/Form/Textarea/Textarea.vue +19 -2
  86. package/src/components/Form/Textarea/readme.mdx +0 -0
  87. package/src/components/Form/Textarea/textarea.scss +20 -1
  88. package/src/components/Form/Toggle/Toggle.stories.js +0 -0
  89. package/src/components/Form/Toggle/Toggle.vue +0 -0
  90. package/src/components/Form/Toggle/readme.mdx +0 -0
  91. package/src/components/Form/Toggle/toggle.scss +0 -0
  92. package/src/components/IconButton/IconButton.scss +11 -0
  93. package/src/components/IconButton/IconButton.vue +5 -0
  94. package/src/components/IconButton/readme.mdx +0 -0
  95. package/src/components/List.vue +0 -0
  96. package/src/components/Modal/Modal.stories.js +0 -0
  97. package/src/components/Modal/Modal.vue +6 -5
  98. package/src/components/Modal/constants.js +0 -0
  99. package/src/components/Modal/readme.mdx +0 -0
  100. package/src/components/Pagination/LimitSelector.vue +4 -0
  101. package/src/components/Pagination/Pagination.vue +9 -2
  102. package/src/components/Pagination/pagination.scss +0 -0
  103. package/src/components/Panel/Panel.stories.js +0 -0
  104. package/src/components/Panel/Panel.vue +68 -2
  105. package/src/components/Popover/Popover.vue +4 -4
  106. package/src/components/Popover/constants.js +0 -0
  107. package/src/components/Popover/popover.scss +1 -1
  108. package/src/components/Popover/readme.mdx +0 -0
  109. package/src/components/ProgressBar/ProgressBar.vue +0 -0
  110. package/src/components/ProgressBar/constants.js +0 -0
  111. package/src/components/ProgressBar/progressBar.scss +0 -0
  112. package/src/components/ProgressBar/readme.mdx +0 -0
  113. package/src/components/Sorting/Sorting.stories.js +0 -0
  114. package/src/components/Sorting/Sorting.vue +0 -0
  115. package/src/components/Sorting/sorting.scss +0 -0
  116. package/src/components/SplitButton/SplitButton.stories.js +0 -0
  117. package/src/components/SplitButton/SplitButton.vue +31 -7
  118. package/src/components/SplitButton/SplitButtonItem.vue +13 -1
  119. package/src/components/SplitButton/readme.mdx +0 -0
  120. package/src/components/SplitButton/splitButton.scss +0 -0
  121. package/src/components/StatusIndicator/StatusIndicator.stories.js +0 -0
  122. package/src/components/StatusIndicator/StatusIndicator.vue +0 -0
  123. package/src/components/StatusIndicator/constants.js +0 -0
  124. package/src/components/StatusIndicator/icons.js +0 -0
  125. package/src/components/StatusIndicator/readme.mdx +0 -0
  126. package/src/components/Tabs/TabDropdown.vue +0 -0
  127. package/src/components/Tabs/Tabs.stories.js +0 -0
  128. package/src/components/Tabs/Tabs.vue +0 -0
  129. package/src/components/Tabs/tabs.scss +0 -0
  130. package/src/components/TagPill/TagPill.stories.js +0 -0
  131. package/src/components/TagPill/readme.mdx +0 -0
  132. package/src/components/ToggleTip/constants.js +0 -0
  133. package/src/components/ToggleTip/readme.mdx +0 -0
  134. package/src/components/ToggleTip/toggleTip.scss +0 -0
  135. package/src/components/Tooltip/Tooltip.vue +1 -1
  136. package/src/components/Tooltip/readme.mdx +0 -0
  137. package/src/components/TreeSelect/Option.vue +40 -9
  138. package/src/components/TreeSelect/Select.stories.js +0 -0
  139. package/src/components/TreeSelect/Select.vue +77 -29
  140. package/src/components/TreeSelect/TreeSelect.stories.js +0 -0
  141. package/src/components/TreeSelect/mixins/InfinityLoaderMixin.js +40 -0
  142. package/src/components/TreeSelect/scss/option.scss +31 -0
  143. package/src/components/TreeSelect/scss/select.scss +47 -1
  144. package/src/directives/outside/outside.stories.js +0 -0
  145. package/src/directives/outside/readme.mdx +0 -0
  146. package/src/directives/tooltip/TooltipController.js +2 -0
  147. package/src/directives/tooltip/readme.mdx +0 -0
  148. package/src/directives/tooltip/textOverflowTooltip.js +3 -1
  149. package/src/directives/tooltip/tooltip.js +15 -0
  150. package/src/directives/tooltip/tooltip.stories.js +0 -0
  151. package/src/helpers/removeEvents.js +0 -0
  152. package/src/index.js +4 -0
  153. package/src/main.js +0 -0
  154. package/src/mixins/expandAnimation.js +0 -0
  155. package/src/scripts/parseScssVariables.js +0 -0
  156. package/src/stories/link.readme.mdx +0 -0
  157. package/src/stories/variables/colors.stories.js +0 -0
  158. package/src/stories/variables/shadows.stories.js +0 -0
  159. package/static/docks/button.pdf +0 -0
  160. package/static/favicon.ico +0 -0
@@ -23,6 +23,8 @@
23
23
  {{ characterLimitErrorMessage }}
24
24
  </ib-alert>
25
25
 
26
+ <input :name="name" type="hidden" :disabled="disable" :value="data">
27
+
26
28
  <div class="ib-text-editor-wrapper" :class="{ disable: disable }">
27
29
  <div
28
30
  class="ib-text-editor"
@@ -30,11 +32,11 @@
30
32
  ref="wrapper"
31
33
  >
32
34
  <QuillEditor
35
+ aria-label="text-editor"
33
36
  @textChange="onChange"
34
37
  @blur="onBlur"
35
38
  @focus="onFocus"
36
39
  ref="quill"
37
- toolbar="#toolbar"
38
40
  v-model:content="data"
39
41
  contentType="html"
40
42
  :options="config"
@@ -42,8 +44,18 @@
42
44
  ></QuillEditor>
43
45
  </div>
44
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">івф</option>
52
+ <option v-for="placeholder in placeholders" :key="placeholder.id" :value="placeholder.id">{{ placeholder.label }}</option>
53
+ </select>
54
+ </div>
55
+
45
56
  <div class="toolbar-group header-toolbar-group">
46
- <select class="ql-header">
57
+ <label class="toolbar-group__label" for="header-selector">Header Selector</label>
58
+ <select id="header-selector" class="ql-header">
47
59
  <option value="1"></option>
48
60
  <option value="2"></option>
49
61
  <option value="3"></option>
@@ -56,34 +68,42 @@
56
68
 
57
69
  <div class="toolbar-group">
58
70
  <ib-icon-button
71
+ aria-label="button-bold"
59
72
  class="toolbar-item ql-bold"
60
73
  kind="ghost"
61
74
  ></ib-icon-button>
62
75
  <ib-icon-button
76
+ aria-label="button-italic"
63
77
  class="toolbar-item ql-italic"
64
78
  kind="ghost"
65
79
  ></ib-icon-button>
66
80
  <ib-icon-button
81
+ aria-label="button-underline"
67
82
  class="toolbar-item ql-underline"
68
83
  kind="ghost"
69
84
  ></ib-icon-button>
70
85
  <ib-icon-button
86
+ aria-label="button-strike"
71
87
  class="toolbar-item ql-strike"
72
88
  kind="ghost"
73
89
  ></ib-icon-button>
74
90
  </div>
75
91
 
76
92
  <div class="toolbar-group">
77
- <select class="ql-background"></select>
78
- <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>
79
97
  </div>
80
98
 
81
99
  <div class="toolbar-group">
82
100
  <ib-icon-button
101
+ aria-label="button-code-block"
83
102
  class="toolbar-item ql-code-block"
84
103
  kind="ghost"
85
104
  ></ib-icon-button>
86
105
  <ib-icon-button
106
+ aria-label="button-link"
87
107
  class="toolbar-item ql-link"
88
108
  kind="ghost"
89
109
  ></ib-icon-button>
@@ -91,20 +111,24 @@
91
111
 
92
112
  <div class="toolbar-group">
93
113
  <ib-icon-button
114
+ aria-label="button-align"
94
115
  class="toolbar-item ql-align"
95
116
  kind="ghost"
96
117
  ></ib-icon-button>
97
118
  <ib-icon-button
119
+ aria-label="button-align-center"
98
120
  class="ql-align toolbar-item"
99
121
  value="center"
100
122
  kind="ghost"
101
123
  ></ib-icon-button>
102
124
  <ib-icon-button
125
+ aria-label="button-align-right"
103
126
  class="ql-align toolbar-item"
104
127
  value="right"
105
128
  kind="ghost"
106
129
  ></ib-icon-button>
107
130
  <ib-icon-button
131
+ aria-label="button-align-justify"
108
132
  class="ql-align toolbar-item"
109
133
  value="justify"
110
134
  kind="ghost"
@@ -113,17 +137,20 @@
113
137
 
114
138
  <div class="toolbar-group">
115
139
  <ib-icon-button
140
+ aria-label="button-ordered-list"
116
141
  class="ql-list toolbar-item"
117
142
  value="ordered"
118
143
  kind="ghost"
119
144
  ></ib-icon-button>
120
145
  <ib-icon-button
146
+ aria-label="button-bullet-list"
121
147
  class="ql-list toolbar-item"
122
148
  value="bullet"
123
149
  kind="ghost"
124
150
  ></ib-icon-button>
125
151
 
126
152
  <ib-icon-button
153
+ aria-label="button-alphabet-list"
127
154
  class="ql-alphabet-list alphabet-list toolbar-item"
128
155
  kind="ghost"
129
156
  ></ib-icon-button>
@@ -134,27 +161,28 @@
134
161
  </template>
135
162
 
136
163
  <script>
137
- import { QuillEditor, Quill } from "@vueup/vue-quill";
164
+ import {Quill, QuillEditor} from "@vueup/vue-quill";
138
165
  import IbIconButton from "../../IconButton/IconButton.vue";
139
166
  import IbAlert from "../../Alert/Alert.vue";
140
167
  import IbCharacterCount from "../CharactersCount.vue";
141
- import { AlphabetList, AlphabetListItem } from "./plugins/alphabetList";
168
+ import {AlphabetList, AlphabetListItem} from "./plugins/alphabetList";
169
+ import getPlaceholderModule from 'quill-placeholder-module';
142
170
  import "@vueup/vue-quill/dist/vue-quill.snow.css";
143
171
 
144
172
  import {
173
+ ALIGN_CENTER,
174
+ ALIGN_JUSTIFY,
175
+ ALIGN_LEFT,
176
+ ALIGN_RIGHT,
145
177
  BOLD,
146
- ITALIC,
147
- UNDERLINE,
148
- STRIKE,
149
178
  CODE,
179
+ ITALIC,
150
180
  LINK,
151
- ALIGN_LEFT,
152
- ALIGN_CENTER,
153
- ALIGN_RIGHT,
154
- ALIGN_JUSTIFY,
155
- LIST_ORDERED,
156
- LIST_BULLET,
157
181
  LIST_ALPHABET,
182
+ LIST_BULLET,
183
+ LIST_ORDERED,
184
+ STRIKE,
185
+ UNDERLINE,
158
186
  } from "./icons/toolbarIcons";
159
187
 
160
188
  const icons = Quill.import("ui/icons");
@@ -177,16 +205,29 @@ Quill.register({
177
205
  "formats/alphabet-list/item": AlphabetListItem,
178
206
  });
179
207
 
208
+ Quill.register('modules/placeholder', getPlaceholderModule(Quill, {
209
+ className: 'ql-placeholder-content'
210
+ }))
211
+
212
+
180
213
  Quill.register(icons);
181
214
  Quill.debug("error");
182
215
 
183
216
  export default {
184
217
  name: "IbTextEditor",
185
218
  props: {
219
+ name: {
220
+ type: String,
221
+ required: true
222
+ },
186
223
  placeholder: {
187
224
  type: String,
188
225
  default: "",
189
226
  },
227
+ placeholders: {
228
+ type: Array,
229
+ default: () => []
230
+ },
190
231
  modelValue: {
191
232
  type: String,
192
233
  },
@@ -234,6 +275,7 @@ export default {
234
275
  type: String,
235
276
  },
236
277
  },
278
+ emits: ['onOverLimitHandler', 'update:modelValue', 'change', 'blur'],
237
279
  mounted() {
238
280
  // Reset default styles for toolbar
239
281
  this.$refs.toolbar.classList.remove("ql-toolbar");
@@ -258,6 +300,9 @@ export default {
258
300
  data(val) {
259
301
  this.$emit("update:modelValue", val);
260
302
  },
303
+ characterOverLimit(value) {
304
+ this.$emit('onOverLimitHandler', value);
305
+ }
261
306
  },
262
307
  methods: {
263
308
  onChange() {
@@ -281,6 +326,13 @@ export default {
281
326
  placeholder: this.data.length ? "" : this.placeholder,
282
327
  readOnly: this.readOnly ? this.readOnly : this.disable,
283
328
  enable: this.enable,
329
+ modules: {
330
+ toolbar: {container: '#toolbar'},
331
+ placeholder: {
332
+ delimiters: ['{{', '}}'],
333
+ placeholders: this.placeholders
334
+ }
335
+ },
284
336
  };
285
337
 
286
338
  return Object.assign(config, this.options);
File without changes
@@ -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 {
File without changes
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="textarea-wrapper" :class="{ disabled: disabled }">
2
+ <div class="textarea-wrapper" :class="{ disabled: disabled, hasActins: $slots.actions }">
3
3
  <ib-character-count
4
4
  v-if="characterLimit"
5
5
  :character-limit="characterLimit"
@@ -20,6 +20,10 @@
20
20
  :class="classes"
21
21
  :disabled="disabled"
22
22
  ></textarea>
23
+
24
+ <div class="textarea-actions">
25
+ <slot name="actions"></slot>
26
+ </div>
23
27
  </div>
24
28
  </template>
25
29
 
@@ -57,10 +61,22 @@ export default {
57
61
  type: String,
58
62
  default: "",
59
63
  },
64
+ value: {
65
+ type: String,
66
+ default: "",
67
+ },
68
+ },
69
+ watch: {
70
+ value() {
71
+ this.val = this.value;
72
+ },
73
+ val() {
74
+ this.$emit("update:value", this.val);
75
+ },
60
76
  },
61
77
  data() {
62
78
  return {
63
- val: "",
79
+ val: this.value,
64
80
  };
65
81
  },
66
82
  methods: {
@@ -93,6 +109,7 @@ export default {
93
109
  IbAlert,
94
110
  IbCharacterCount,
95
111
  },
112
+ emits: ["input", "blur", "update:value"],
96
113
  inheritAttrs: false,
97
114
  };
98
115
  </script>
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 {
@@ -32,10 +32,24 @@ $textarea-error-outline-color: $red-800;
32
32
  color: $neutral-500;
33
33
  }
34
34
  }
35
+
36
+ &.hasActins {
37
+ textarea {
38
+ padding-bottom: 40px;
39
+ }
40
+ }
41
+
42
+ .textarea-actions {
43
+ position: absolute;
44
+ bottom: 10px;
45
+ left: 10px;
46
+ right: 10px;
47
+ }
35
48
  }
36
49
 
37
50
  textarea.ib-textarea {
38
51
  @include Ib-H4-regular;
52
+ width: 100%;
39
53
  height: 80px;
40
54
  min-height: 36px;
41
55
  border: none;
@@ -76,6 +90,11 @@ textarea.ib-textarea {
76
90
  }
77
91
  }
78
92
 
93
+ &:read-only:hover {
94
+ background-color: $textarea-bg;
95
+ color: $textarea-text-color;
96
+ }
97
+
79
98
  &.error {
80
99
  border-radius: 4px;
81
100
  border-bottom-color: transparent;
File without changes
File without changes
File without changes
File without changes
@@ -1,6 +1,10 @@
1
1
  @import "../../assets/scss/variables/colors.scss";
2
2
  @import "../../assets/scss/mixins.scss";
3
3
 
4
+ // Disabled button colors
5
+ $disabled-btn-background: $gray-100;
6
+ $disabled-btn-color: $neutral-500;
7
+
4
8
  .ib-icon-button {
5
9
  padding: 0;
6
10
  display: flex;
@@ -93,6 +97,13 @@
93
97
  color: $blue-900;
94
98
  background-color: $blue-200;
95
99
  }
100
+
101
+ &:disabled {
102
+ background: $disabled-btn-background;
103
+ color: $disabled-btn-color;
104
+ cursor: auto;
105
+ border-color: transparent;
106
+ }
96
107
  }
97
108
  }
98
109
  }
@@ -2,6 +2,7 @@
2
2
  <ib-button
3
3
  v-bind="attrs"
4
4
  :href="href"
5
+ :to="to"
5
6
  :kind="kind"
6
7
  :disabled="disabled"
7
8
  :prevent-default="preventDefault"
@@ -43,6 +44,10 @@ export default {
43
44
  type: String,
44
45
  default: "",
45
46
  },
47
+ to: {
48
+ type: [String, Object],
49
+ default: "",
50
+ },
46
51
  helpText: {
47
52
  type: String,
48
53
  default: "",
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;
@@ -125,15 +127,14 @@ export default {
125
127
  this.$emit("open");
126
128
  },
127
129
  close() {
128
- this.isActive = false;
129
130
  this.$refs.trigger?.querySelector("a, button, [tabindex]")?.focus();
130
131
  document.body.classList.remove("modal-open");
131
132
  this.$emit("close");
132
133
  },
133
134
  setFocusOnModal(e) {
134
- if(!this.$refs.modal?.contains(e.target) && this.isActive) {
135
+ if((!this.$refs.modal?.contains(e.target) && !this.$refs.modal?.contains(e.relatedTarget)) && this.isActive) {
135
136
  this.$refs.modal.querySelector(
136
- "[tabindex], a, button, input, select, textarea"
137
+ "[tabindex], a, button, input, select, textarea"
137
138
  ).focus();
138
139
  }
139
140
  },
File without changes
File without changes
@@ -4,6 +4,7 @@
4
4
  <ib-select
5
5
  classList="report-limit-selector-select"
6
6
  :value="value"
7
+ :vertical="vertical"
7
8
  :options="prepareOptions"
8
9
  :is-multiple="false"
9
10
  :show-clear-button="false"
@@ -25,6 +26,9 @@ export default {
25
26
  value: {
26
27
  type: Number,
27
28
  },
29
+ vertical: {
30
+ type: String
31
+ },
28
32
  options: {
29
33
  type: Array,
30
34
  default: () => [10, 25, 50, 100],
@@ -3,14 +3,15 @@
3
3
  <ib-limit-selector
4
4
  @select="changeLimit"
5
5
  :value="limitValue"
6
+ :vertical="vertical"
6
7
  :label-select="labelSelect"
7
8
  ></ib-limit-selector>
8
9
 
9
10
  <div class="repot-pagination">
10
11
  <template v-if="showPaginationInput">
11
- <ib-label>{{ labelInput }}</ib-label>
12
+ <ib-label for="goToPage">{{ labelInput }}</ib-label>
12
13
  <div class="pagination-input">
13
- <ib-input type="number" :debounce="500" @input="onInput"></ib-input>
14
+ <ib-input id="goToPage" type="number" :debounce="500" @input="onInput"></ib-input>
14
15
  </div>
15
16
  </template>
16
17
 
@@ -104,6 +105,9 @@ export default {
104
105
  type: Boolean,
105
106
  default: true,
106
107
  },
108
+ vertical: {
109
+ type: String
110
+ }
107
111
  },
108
112
  data() {
109
113
  return {
@@ -117,6 +121,9 @@ export default {
117
121
  current(newVal) {
118
122
  this.onSelect(newVal);
119
123
  },
124
+ limitSelector(newVal) {
125
+ this.limitValue = newVal;
126
+ },
120
127
  limitValue() {
121
128
  this.currentPage = 1;
122
129
  },
File without changes
File without changes
@@ -4,10 +4,26 @@
4
4
  <div class="head-title">
5
5
  <slot name="title" />
6
6
  </div>
7
- <div class="divider"></div>
7
+
8
+ <div v-show="!hideHeaderDivider" class="divider"></div>
9
+
8
10
  <div class="head-content">
9
11
  <slot name="head-content" />
10
12
  </div>
13
+
14
+ <icon-button
15
+ v-if="showExpandButton"
16
+ :class="{
17
+ 'toggle-visible-button': true,
18
+ 'active': isOpenVal,
19
+ }"
20
+ kind="ghost"
21
+ type="button"
22
+ v-tooltip="expandButtonTooltip"
23
+ @click="isOpenVal = !isOpenVal"
24
+ >
25
+ <icon name="chevron-down-outline" />
26
+ </icon-button>
11
27
  </div>
12
28
  <Transition
13
29
  name="expand"
@@ -15,7 +31,7 @@
15
31
  @after-enter="afterEnter"
16
32
  @leave="leave"
17
33
  >
18
- <div v-show="isOpen" class="panel-body">
34
+ <div v-show="isOpenVal" class="panel-body">
19
35
  <slot name="body"></slot>
20
36
  </div>
21
37
  </Transition>
@@ -23,12 +39,23 @@
23
39
  </template>
24
40
 
25
41
  <script>
42
+ import IconButton from "../IconButton/IconButton.vue";
43
+ import Icon from "../Icon.vue";
26
44
  import expandAnimation from "../../mixins/expandAnimation";
45
+ import { TooltipDirective as Tooltip } from "../../directives/tooltip/tooltip";
27
46
 
28
47
  export default {
29
48
  name: "IbPanel",
30
49
  mixins: [expandAnimation],
31
50
  props: {
51
+ showExpandButton: {
52
+ type: Boolean,
53
+ default: false,
54
+ },
55
+ expandButtonTooltip: {
56
+ type: String,
57
+ default: "",
58
+ },
32
59
  isOpen: {
33
60
  type: Boolean,
34
61
  default: true,
@@ -37,7 +64,32 @@ export default {
37
64
  type: Boolean,
38
65
  default: false,
39
66
  },
67
+ hideHeaderDivider: {
68
+ type: Boolean,
69
+ default: false,
70
+ }
71
+ },
72
+ watch: {
73
+ isOpen() {
74
+ this.isOpenVal = this.isOpen;
75
+ },
76
+ isOpenVal() {
77
+ this.$emit("update:isOpen", this.isOpenVal);
78
+ },
79
+ },
80
+ data() {
81
+ return {
82
+ isOpenVal: this.isOpen,
83
+ };
40
84
  },
85
+ components: {
86
+ IconButton,
87
+ Icon,
88
+ },
89
+ directives: {
90
+ Tooltip,
91
+ },
92
+ emits: ["update:isOpen"],
41
93
  };
42
94
  </script>
43
95
 
@@ -69,6 +121,20 @@ $panel-divider-color: $gray-300;
69
121
  outline: 2px solid $panel-error-outline-color;
70
122
  }
71
123
 
124
+ .toggle-visible-button {
125
+ margin-left: 10px;
126
+
127
+ ion-icon {
128
+ transition: transform 0.5s;
129
+ }
130
+
131
+ &.active {
132
+ ion-icon {
133
+ transform: rotate(180deg);
134
+ }
135
+ }
136
+ }
137
+
72
138
  .panel-head {
73
139
  display: inline-flex;
74
140
  width: 100%;
@@ -33,10 +33,10 @@ export default {
33
33
  this.parentNode = this.$el.parentNode;
34
34
 
35
35
  if (!this.alwaysVisible) {
36
- this.parentNode.addEventListener("focus", this.showPopover, true);
37
- this.parentNode.addEventListener("blur", this.hidePopover, true);
38
- this.parentNode.addEventListener("mouseover", this.showPopover);
39
- this.parentNode.addEventListener("mouseleave", this.hidePopover);
36
+ this.parentNode?.addEventListener("focus", this.showPopover, true);
37
+ this.parentNode?.addEventListener("blur", this.hidePopover, true);
38
+ this.parentNode?.addEventListener("mouseover", this.showPopover);
39
+ this.parentNode?.addEventListener("mouseleave", this.hidePopover);
40
40
  }
41
41
  });
42
42
  },
File without changes
@@ -15,7 +15,7 @@ $shadow: $ib-shadow-3;
15
15
  color: $textColor;
16
16
  border-radius: 4px;
17
17
  box-shadow: $shadow;
18
- z-index: 1000;
18
+ z-index: 9998;
19
19
  text-align: start;
20
20
 
21
21
  &.ib {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes