@avakhula/ui 0.1.19 → 0.1.21

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 (89) hide show
  1. package/dist/index.css +1 -0
  2. package/dist/index.js +13657 -12664
  3. package/dist/index.umd.cjs +92 -84
  4. package/package.json +6 -5
  5. package/src/App.vue +6 -2
  6. package/src/assets/scss/mixins/dropdown-list-item.scss +3 -3
  7. package/src/assets/scss/mixins/tooltip-position.scss +7 -0
  8. package/src/assets/scss/mixins.scss +2 -2
  9. package/src/assets/scss/style.scss +4 -4
  10. package/src/assets/scss/typography.scss +3 -3
  11. package/src/components/Accordion/Accordion.scss +3 -3
  12. package/src/components/Accordion/Accordion.vue +2 -2
  13. package/src/components/Alert/Alert.vue +1 -1
  14. package/src/components/Alert/alert.scss +2 -2
  15. package/src/components/Avatar/Avatar.vue +2 -2
  16. package/src/components/Badge/Badge.vue +2 -2
  17. package/src/components/Breadcrumbs/Breadcrumbs.vue +7 -2
  18. package/src/components/Breadcrumbs/breadcrumbs.scss +5 -5
  19. package/src/components/Button/Button.vue +2 -2
  20. package/src/components/Button/button.scss +3 -3
  21. package/src/components/Chips/Chips.vue +3 -3
  22. package/src/components/Dropdown/Dropdown.spec.js +0 -0
  23. package/src/components/Dropdown/Dropdown.vue +104 -27
  24. package/src/components/Dropdown/DropdownDivider.vue +1 -1
  25. package/src/components/Dropdown/DropdownItem.vue +1 -1
  26. package/src/components/Dropdown/DropdownList.vue +16 -2
  27. package/src/components/Form/CharactersCount.vue +2 -2
  28. package/src/components/Form/Checkbox/Checkbox.scss +4 -4
  29. package/src/components/Form/Checkbox/Checkbox.vue +1 -1
  30. package/src/components/Form/DatePicker/DatePicker.scss +4 -4
  31. package/src/components/Form/DatePicker/DatePicker.vue +1 -1
  32. package/src/components/Form/FormGroup/FormGroup.vue +2 -2
  33. package/src/components/Form/FormGroup/FormGroupSet.vue +1 -1
  34. package/src/components/Form/Input/Input.vue +7 -4
  35. package/src/components/Form/Input/input.scss +3 -3
  36. package/src/components/Form/Label/Label.vue +2 -2
  37. package/src/components/Form/PhoneInput/PhoneInput.vue +56 -21
  38. package/src/components/Form/PhoneInput/phoneInput.scss +4 -4
  39. package/src/components/Form/Radio/Radio.vue +1 -1
  40. package/src/components/Form/Radio/radio.scss +3 -3
  41. package/src/components/Form/TextEditor/TextEditor.vue +27 -168
  42. package/src/components/Form/TextEditor/Toolbar.vue +723 -0
  43. package/src/components/Form/TextEditor/icons/toolbarIcons.js +8 -0
  44. package/src/components/Form/TextEditor/plugins/imageBlot.js +23 -0
  45. package/src/components/Form/TextEditor/setupTextEditor.js +71 -0
  46. package/src/components/Form/TextEditor/textEditor.scss +9 -357
  47. package/src/components/Form/Textarea/Textarea.spec.js +0 -0
  48. package/src/components/Form/Textarea/Textarea.vue +2 -1
  49. package/src/components/Form/Textarea/textarea.scss +3 -3
  50. package/src/components/Form/Toggle/Toggle.vue +1 -1
  51. package/src/components/Form/Toggle/toggle.scss +3 -3
  52. package/src/components/IconButton/IconButton.scss +2 -2
  53. package/src/components/IconButton/IconButton.vue +6 -4
  54. package/src/components/List.vue +1 -1
  55. package/src/components/Modal/Modal.vue +85 -49
  56. package/src/components/Pagination/Pagination.vue +28 -3
  57. package/src/components/Pagination/pagination.scss +20 -4
  58. package/src/components/Panel/Panel.vue +4 -4
  59. package/src/components/Popover/Popover.vue +7 -2
  60. package/src/components/Popover/popover.scss +3 -3
  61. package/src/components/ProgressBar/ProgressBar.vue +1 -1
  62. package/src/components/ProgressBar/progressBar.scss +1 -1
  63. package/src/components/Sorting/Sorting.vue +1 -1
  64. package/src/components/Sorting/sorting.scss +5 -5
  65. package/src/components/SplitButton/SplitButton.vue +1 -1
  66. package/src/components/SplitButton/SplitButtonItem.vue +1 -1
  67. package/src/components/SplitButton/splitButton.scss +3 -3
  68. package/src/components/StatusIndicator/StatusIndicator.vue +2 -2
  69. package/src/components/Table/Cells/Cell.vue +2 -2
  70. package/src/components/Table/Cells/CheckboxCell.vue +0 -0
  71. package/src/components/Table/Row.vue +1 -1
  72. package/src/components/Table/Table.stories.js +0 -0
  73. package/src/components/Table/Table.vue +0 -0
  74. package/src/components/Tabs/Tab.vue +0 -0
  75. package/src/components/Tabs/TabDropdown.vue +1 -1
  76. package/src/components/Tabs/Tabs.vue +9 -5
  77. package/src/components/Tabs/tabs.scss +4 -4
  78. package/src/components/TagPill/TagPill.vue +2 -2
  79. package/src/components/ToggleTip/ToggleTip.vue +1 -1
  80. package/src/components/ToggleTip/toggleTip.scss +5 -5
  81. package/src/components/Tooltip/Tooltip.vue +3 -3
  82. package/src/components/TreeSelect/Option.vue +16 -14
  83. package/src/components/TreeSelect/Select.vue +200 -132
  84. package/src/components/TreeSelect/scss/option.scss +6 -6
  85. package/src/components/TreeSelect/scss/select.scss +53 -4
  86. package/src/directives/tooltip/tooltip.js +46 -0
  87. package/src/index.js +6 -1
  88. package/vite.config.js +0 -0
  89. package/dist/style.css +0 -1
@@ -9,8 +9,8 @@
9
9
  <slot name="trigger"></slot>
10
10
  </div>
11
11
 
12
- <Teleport to="body">
13
- <div :class="classes" v-show="isActive" ref="modal">
12
+ <Teleport to="body" v-if="isActive">
13
+ <div :class="classes" ref="modal">
14
14
  <div :class="bodyClassList" :style="bodyStyles" v-outside="clickOutside">
15
15
  <ib-icon-button
16
16
  v-if="showCloseButton"
@@ -76,32 +76,18 @@ export default {
76
76
  watch: {
77
77
  active(val) {
78
78
  this.isActive = val;
79
- },
80
- },
81
- mounted() {
82
- const focusableItems = this.$refs?.modal?.querySelectorAll(
83
- "[tabindex], a, button, input, select, textarea"
84
- );
85
-
86
- focusableItems[0]?.addEventListener("keydown", (e) => {
87
- if (e.keyCode === TAB_KEY_CODE && e.shiftKey) {
88
- e.preventDefault();
89
- focusableItems[focusableItems.length - 1].focus();
90
- }
91
- });
92
-
93
- focusableItems[focusableItems.length - 1]?.addEventListener(
94
- "keydown",
95
- (e) => {
96
- if (e.keyCode === TAB_KEY_CODE && !e.shiftKey) {
97
- e.preventDefault();
98
- focusableItems[0].focus();
99
- }
79
+ if (val) {
80
+ this.$nextTick(() => {
81
+ this.setupFocusTrap();
82
+ });
83
+ document.addEventListener("keydown", this.onKeydown);
84
+ document.addEventListener("blur", this.setFocusOnModal, true);
85
+ } else {
86
+ this.cleanupFocusTrap();
87
+ document.removeEventListener("keydown", this.onKeydown);
88
+ document.removeEventListener("blur", this.setFocusOnModal, true);
100
89
  }
101
- );
102
-
103
- document.addEventListener("keydown", this.onKeydown);
104
- document.addEventListener("blur", this.setFocusOnModal, true);
90
+ },
105
91
  },
106
92
  data() {
107
93
  return {
@@ -109,6 +95,53 @@ export default {
109
95
  };
110
96
  },
111
97
  methods: {
98
+ setupFocusTrap() {
99
+ this.focusableItems =
100
+ this.$refs?.modal?.querySelectorAll(
101
+ "[tabindex], a, button, input, select, textarea"
102
+ ) || [];
103
+
104
+ if (this.focusableItems.length === 0) return;
105
+
106
+ const firstItem = this.focusableItems[0];
107
+ const lastItem = this.focusableItems[this.focusableItems.length - 1];
108
+
109
+ this.firstFocusableHandler = (e) => {
110
+ if (e.keyCode === TAB_KEY_CODE && e.shiftKey) {
111
+ e.preventDefault();
112
+ lastItem.focus();
113
+ }
114
+ };
115
+
116
+ this.lastFocusableHandler = (e) => {
117
+ if (e.keyCode === TAB_KEY_CODE && !e.shiftKey) {
118
+ e.preventDefault();
119
+ firstItem.focus();
120
+ }
121
+ };
122
+
123
+ firstItem.addEventListener("keydown", this.firstFocusableHandler);
124
+ lastItem.addEventListener("keydown", this.lastFocusableHandler);
125
+
126
+ firstItem.focus();
127
+ },
128
+ cleanupFocusTrap() {
129
+ if (this.focusableItems.length === 0) return;
130
+
131
+ const firstItem = this.focusableItems[0];
132
+ const lastItem = this.focusableItems[this.focusableItems.length - 1];
133
+
134
+ if (this.firstFocusableHandler) {
135
+ firstItem?.removeEventListener("keydown", this.firstFocusableHandler);
136
+ }
137
+ if (this.lastFocusableHandler) {
138
+ lastItem?.removeEventListener("keydown", this.lastFocusableHandler);
139
+ }
140
+
141
+ this.firstFocusableHandler = null;
142
+ this.lastFocusableHandler = null;
143
+ this.focusableItems = [];
144
+ },
112
145
  showModal(value) {
113
146
  if (value) {
114
147
  this.open();
@@ -117,7 +150,7 @@ export default {
117
150
  }
118
151
  },
119
152
  onTriggerBlur(e) {
120
- if (!this.$refs.modal?.contains(e.relatedTarget) && this.isActive ) {
153
+ if (!this.$refs.modal?.contains(e.relatedTarget) && this.isActive) {
121
154
  this.$refs.modal?.querySelector("a, button, [tabindex]")?.focus();
122
155
  }
123
156
  },
@@ -135,21 +168,20 @@ export default {
135
168
  if (!this.isActive) return;
136
169
 
137
170
  const openModals = Array.from(
138
- document.querySelectorAll('.modal.is-active')
171
+ document.querySelectorAll(".modal.is-active")
139
172
  );
140
173
 
141
174
  const topModal = openModals
142
- .sort((a, b) =>
143
- +(getComputedStyle(a).zIndex || 0) - +(getComputedStyle(b).zIndex || 0)
175
+ .sort(
176
+ (a, b) =>
177
+ +(getComputedStyle(a).zIndex || 0) -
178
+ +(getComputedStyle(b).zIndex || 0)
144
179
  )
145
180
  .at(-1);
146
181
 
147
- if (topModal !== (this.$refs.modal)) return;
182
+ if (topModal !== this.$refs.modal) return;
148
183
 
149
- if (
150
- !topModal.contains(e.target) &&
151
- !topModal.contains(e.relatedTarget)
152
- ) {
184
+ if (!topModal.contains(e.target) && !topModal.contains(e.relatedTarget)) {
153
185
  const focusable = topModal.querySelector(
154
186
  `a[href], button:not([disabled]),
155
187
  textarea, input:not([type="hidden"]),
@@ -168,24 +200,28 @@ export default {
168
200
  }
169
201
  },
170
202
  onKeydown(e) {
171
- if (e.keyCode === ESC_KEY_CODE && !this.stopPropagation && this.isActive) {
203
+ if (
204
+ e.keyCode === ESC_KEY_CODE &&
205
+ !this.stopPropagation &&
206
+ this.isActive
207
+ ) {
172
208
  this.close();
173
209
  }
174
- }
210
+ },
175
211
  },
176
212
  computed: {
177
213
  classes() {
178
- const classList = ["modal"];
214
+ const classList = ["modal"];
179
215
 
180
- if (this.classList.length) {
181
- classList.push(this.classList);
182
- }
216
+ if (this.classList.length) {
217
+ classList.push(this.classList);
218
+ }
183
219
 
184
- if (this.isActive) {
185
- classList.push("is-active");
186
- }
220
+ if (this.isActive) {
221
+ classList.push("is-active");
222
+ }
187
223
 
188
- return classList;
224
+ return classList;
189
225
  },
190
226
  bodyStyles() {
191
227
  const styleList = {};
@@ -259,9 +295,9 @@ export default {
259
295
  </script>
260
296
 
261
297
  <style lang="scss" scoped>
262
- @import "../../assets/scss/variables/colors.scss";
263
- @import "../../assets/scss/variables/shadows.scss";
264
- @import "../../assets/scss/typography.scss";
298
+ @use "../../assets/scss/variables/colors.scss" as *;
299
+ @use "../../assets/scss/variables/shadows.scss" as *;
300
+ @use "../../assets/scss/typography.scss" as *;
265
301
 
266
302
  $backdrop-bg: $black-t20;
267
303
  $modal-title-color: $neutral-900;
@@ -1,6 +1,7 @@
1
1
  <template>
2
- <div class="report-controls">
2
+ <div ref="paginationControl" class="report-controls" :class="{ 'simple-pagination': !showLimitSelector }">
3
3
  <ib-limit-selector
4
+ v-if="showLimitSelector"
4
5
  @select="changeLimit"
5
6
  :value="limitValue"
6
7
  :vertical="vertical"
@@ -29,7 +30,10 @@
29
30
  <ib-tooltip v-if="tooltipTextPrev" :text="tooltipTextPrev"></ib-tooltip>
30
31
  </ib-icon-button>
31
32
 
32
- <ul class="pagination-wrapper">
33
+ <p v-if="isShort" class="pagination-text">
34
+ {{ currentPage }} Page
35
+ </p>
36
+ <ul v-else class="pagination-wrapper">
33
37
  <li
34
38
  v-for="(item, index) of countPagePagination"
35
39
  v-show="showItem(index + 1)"
@@ -69,6 +73,9 @@ import IbInput from "../Form/Input/Input.vue";
69
73
  import IbLabel from "../Form/Label/Label.vue";
70
74
  import IbIcon from "../Icon.vue";
71
75
  import IbTooltip from "../Tooltip/Tooltip.vue";
76
+
77
+ const MIN_FULL_WIDTH = 475;
78
+
72
79
  export default {
73
80
  name: "IbPagination",
74
81
  props: {
@@ -105,12 +112,18 @@ export default {
105
112
  type: Boolean,
106
113
  default: true,
107
114
  },
115
+ showLimitSelector: {
116
+ type: Boolean,
117
+ default: true,
118
+ },
108
119
  vertical: {
109
120
  type: String
110
121
  }
111
122
  },
112
123
  data() {
113
124
  return {
125
+ isShort: false,
126
+ resizeObserver: null,
114
127
  currentPage: this.current,
115
128
  indexSpaceLeft: null,
116
129
  indexSpaceRight: null,
@@ -128,7 +141,15 @@ export default {
128
141
  this.currentPage = 1;
129
142
  },
130
143
  },
144
+ mounted() {
145
+ this.handleResize();
146
+ this.resizeObserver = new ResizeObserver(this.handleResize);
147
+ this.resizeObserver.observe(this.$refs.paginationControl);
148
+ },
131
149
  methods: {
150
+ handleResize() {
151
+ this.isShort = this.$refs.paginationControl.clientWidth < MIN_FULL_WIDTH;
152
+ },
132
153
  changeLimit(val) {
133
154
  if (Number.isInteger(val)) {
134
155
  this.limitValue = val;
@@ -229,6 +250,10 @@ export default {
229
250
  return Math.ceil(this.countRows / this.limitValue);
230
251
  },
231
252
  },
253
+ beforeUnmount() {
254
+ this.resizeObserver.disconnect();
255
+ this.resizeObserver = null;
256
+ },
232
257
  components: {
233
258
  IbIconButton,
234
259
  IbIcon,
@@ -240,5 +265,5 @@ export default {
240
265
  };
241
266
  </script>
242
267
  <style lang="scss">
243
- @import "./pagination.scss";
268
+ @use "./pagination.scss" as *;
244
269
  </style>
@@ -1,6 +1,6 @@
1
- @import "../../assets/scss/variables/colors.scss";
2
- @import "../../assets/scss/typography.scss";
3
- @import "../../assets/scss/mixins.scss";
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
  .report-limit-selector {
6
6
  display: flex;
@@ -29,12 +29,28 @@
29
29
  justify-content: space-between;
30
30
  align-items: center;
31
31
 
32
+ &.simple-pagination {
33
+ width: 100%;
34
+
35
+ .repot-pagination {
36
+ width: 100%;
37
+ }
38
+
39
+ .row-count {
40
+ margin-right: auto;
41
+ }
42
+ }
32
43
  .row-count {
33
44
  margin-right: 10px;
34
45
  @include Ib-H4-regular;
35
46
  color: $gray-600;
36
47
  }
37
48
 
49
+ .pagination-text {
50
+ @include Ib-H4-regular;
51
+ color: $gray-600;
52
+ margin: 0 8px;
53
+ }
38
54
  .repot-pagination {
39
55
  display: flex;
40
56
  align-items: center;
@@ -180,4 +196,4 @@
180
196
  }
181
197
  }
182
198
  }
183
- }
199
+ }
@@ -94,8 +94,8 @@ export default {
94
94
  </script>
95
95
 
96
96
  <style lang="scss" scoped>
97
- @import "../../assets/scss/variables/colors.scss";
98
- @import "../../assets/scss/typography.scss";
97
+ @use "../../assets/scss/variables/colors.scss" as *;
98
+ @use "../../assets/scss/typography.scss" as *;
99
99
 
100
100
  .expand-enter-active,
101
101
  .expand-leave-active {
@@ -164,8 +164,8 @@ $panel-divider-color: $gray-300;
164
164
  </style>
165
165
 
166
166
  <style lang="scss">
167
- @import "../../assets/scss/variables/colors.scss";
168
- @import "../../assets/scss/typography.scss";
167
+ @use "../../assets/scss/variables/colors.scss" as *;
168
+ @use "../../assets/scss/typography.scss" as *;
169
169
 
170
170
  $description-color: $gray-700;
171
171
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Teleport to="body" v-if="attachToBody">
2
+ <Teleport :to="attachToBody ? 'body' : attachTo" v-if="attachToBody || attachTo">
3
3
  <Transition>
4
4
  <div ref="popover" v-show="isVisible" :class="classes">
5
5
  <slot></slot>
@@ -32,6 +32,10 @@ export default {
32
32
  type: Boolean,
33
33
  default: false,
34
34
  },
35
+ attachTo: {
36
+ type: String,
37
+ default: null
38
+ }
35
39
  },
36
40
  data() {
37
41
  return {
@@ -105,6 +109,8 @@ export default {
105
109
  </script>
106
110
 
107
111
  <style lang="scss" scoped>
112
+ @use "./popover.scss" as *;
113
+
108
114
  // Transition
109
115
  .v-enter-active,
110
116
  .v-leave-active {
@@ -115,5 +121,4 @@ export default {
115
121
  .v-leave-to {
116
122
  opacity: 0;
117
123
  }
118
- @import "./popover.scss";
119
124
  </style>
@@ -1,6 +1,6 @@
1
- @import "../../assets/scss/typography.scss";
2
- @import "../../assets/scss/variables/colors.scss";
3
- @import "../../assets/scss/variables/shadows.scss";
1
+ @use "../../assets/scss/typography.scss" as *;
2
+ @use "../../assets/scss/variables/colors.scss" as *;
3
+ @use "../../assets/scss/variables/shadows.scss" as *;
4
4
 
5
5
  $background: $white;
6
6
  $textColor: $neutral-900;
@@ -67,5 +67,5 @@ export default {
67
67
  </script>
68
68
 
69
69
  <style lang="scss" scoped>
70
- @import "./progressBar.scss";
70
+ @use "./progressBar.scss" as *;
71
71
  </style>
@@ -1,4 +1,4 @@
1
- @import "../../assets/scss/variables/colors.scss";
1
+ @use "../../assets/scss/variables/colors.scss" as *;
2
2
 
3
3
  $progress-bar-bg: $gray-300;
4
4
  $progress-bar-gradient: linear-gradient(
@@ -210,5 +210,5 @@ export default {
210
210
  };
211
211
  </script>
212
212
  <style lang="scss" scoped>
213
- @import "./sorting.scss";
213
+ @use "./sorting.scss" as *;
214
214
  </style>
@@ -1,7 +1,7 @@
1
- @import "../../assets/scss/typography.scss";
2
- @import "../../assets/scss/variables/colors.scss";
3
- @import "../../assets/scss/reset.scss";
4
- @import "../../assets/scss/mixins.scss";
1
+ @use "../../assets/scss/typography.scss" as *;
2
+ @use "../../assets/scss/variables/colors.scss" as *;
3
+ @use "../../assets/scss/reset.scss" as *;
4
+ @use "../../assets/scss/mixins.scss" as *;
5
5
 
6
6
  button {
7
7
  padding: 0;
@@ -87,4 +87,4 @@ button {
87
87
  @include focus(2px);
88
88
  }
89
89
  }
90
- }
90
+ }
@@ -178,5 +178,5 @@ export default {
178
178
  </script>
179
179
 
180
180
  <style lang="scss">
181
- @import "./splitButton.scss";
181
+ @use "./splitButton.scss" as *;
182
182
  </style>
@@ -41,6 +41,6 @@ export default {
41
41
  };
42
42
  </script>
43
43
  <style lang="scss" scoped>
44
- @import "../../assets/scss/mixins/dropdown-list-item.scss";
44
+ @use "../../assets/scss/mixins/dropdown-list-item.scss" as *;
45
45
  @include DropdownListItem;
46
46
  </style>
@@ -1,6 +1,6 @@
1
- @import "../../assets/scss/variables/colors.scss";
2
- @import "../../assets/scss/typography.scss";
3
- @import "../../assets/scss/mixins.scss";
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
  $split-button-color: $white;
6
6
  $split-button-disabled-color: $neutral-500;
@@ -24,8 +24,8 @@ export default {
24
24
  </script>
25
25
 
26
26
  <style lang="scss" scoped>
27
- @import "../../assets/scss/variables/colors.scss";
28
- @import "../../assets/scss//typography.scss";
27
+ @use "../../assets/scss/variables/colors.scss" as *;
28
+ @use "../../assets/scss//typography.scss" as *;
29
29
 
30
30
  @keyframes loader {
31
31
  from {
@@ -43,8 +43,8 @@ export default {
43
43
  </script>
44
44
 
45
45
  <style lang="scss" scoped>
46
- @import "../../../assets/scss/typography.scss";
47
- @import "../../../assets/scss/variables/colors.scss";
46
+ @use "../../../assets/scss/typography.scss" as *;
47
+ @use "../../../assets/scss/variables/colors.scss" as *;
48
48
 
49
49
  .ib-cell {
50
50
  @include Ib-H4-regular;
File without changes
@@ -11,7 +11,7 @@ export default {
11
11
  </script>
12
12
 
13
13
  <style lang="scss">
14
- @import "../../assets/scss/variables/colors.scss";
14
+ @use "../../assets/scss/variables/colors.scss" as *;
15
15
  .ib-tr {
16
16
  .ib-cell {
17
17
  background-color: $white;
File without changes
File without changes
File without changes
@@ -89,5 +89,5 @@ export default {
89
89
  };
90
90
  </script>
91
91
  <style lang="scss">
92
- @import "./tabs.scss";
92
+ @use "./tabs.scss" as *;
93
93
  </style>
@@ -3,23 +3,23 @@
3
3
  <ul class="tabs-list">
4
4
  <li class="tab-item" v-for="(tab, index) in tabs" :key="index">
5
5
  <div v-if="!tab.name" class="wrapper-tab-link">
6
- <a
6
+ <component
7
+ :is="setHref ? 'a' : 'div'"
8
+ v-bind="setHref ? { href: createHref(tab.id), target: '_self' } : {}"
7
9
  class="tab-link"
8
10
  :class="{
9
11
  active: selectedTab === tab.id,
10
12
  disabled: tab.disabled,
11
13
  }"
12
- :href="createHref(tab.id)"
13
14
  :tabindex="tab.disabled ? -1 : 0"
14
15
  @click="selectTab(tab.id)"
15
- target="_self"
16
16
  >
17
17
  <ib-icon class="tab-icon" v-if="tab.icon" :name="tab.icon" />
18
18
 
19
19
  <template v-if="showTitle">
20
20
  {{ tab.title }}
21
21
  </template>
22
- </a>
22
+ </component>
23
23
  </div>
24
24
  <ib-tab-dropdown
25
25
  v-else
@@ -51,6 +51,10 @@ export default {
51
51
  type: String,
52
52
  default: "",
53
53
  },
54
+ setHref: {
55
+ type: Boolean,
56
+ default: false,
57
+ }
54
58
  },
55
59
  data() {
56
60
  return {
@@ -124,5 +128,5 @@ export default {
124
128
  };
125
129
  </script>
126
130
  <style lang="scss" scoped>
127
- @import "./tabs.scss";
131
+ @use "./tabs.scss" as *;
128
132
  </style>
@@ -1,7 +1,7 @@
1
- @import "../../assets/scss/variables/colors.scss";
2
- @import "../../assets/scss/typography.scss";
3
- @import "../../assets/scss/mixins.scss";
4
- @import "../../assets/scss/reset.scss";
1
+ @use "../../assets/scss/variables/colors.scss" as *;
2
+ @use "../../assets/scss/typography.scss" as *;
3
+ @use "../../assets/scss/mixins.scss" as *;
4
+ @use "../../assets/scss/reset.scss" as *;
5
5
 
6
6
  .tabs {
7
7
 
@@ -56,8 +56,8 @@ export default {
56
56
  </script>
57
57
 
58
58
  <style lang="scss" scoped>
59
- @import "../../assets/scss/typography.scss";
60
- @import "../../assets/scss/variables/colors.scss";
59
+ @use "../../assets/scss/typography.scss" as *;
60
+ @use "../../assets/scss/variables/colors.scss" as *;
61
61
 
62
62
  $neutral-tag-bg: $gray-100;
63
63
  $neutral-tag-color: $neutral-600;
@@ -95,7 +95,7 @@ export default {
95
95
  </script>
96
96
 
97
97
  <style lang="scss">
98
- @import "./toggleTip.scss";
98
+ @use "./toggleTip.scss" as *;
99
99
  </style>
100
100
 
101
101
  <style lang="scss" scoped>
@@ -1,7 +1,7 @@
1
- @import "../../assets/scss/typography.scss";
2
- @import "../../assets/scss/mixins/tooltip-position.scss";
3
- @import "../../assets/scss/variables/colors.scss";
4
- @import "../../assets/scss/variables/shadows.scss";
1
+ @use "../../assets/scss/typography.scss" as *;
2
+ @use "../../assets/scss/mixins/tooltip-position.scss" as *;
3
+ @use "../../assets/scss/variables/colors.scss" as *;
4
+ @use "../../assets/scss/variables/shadows.scss" as *;
5
5
 
6
6
  $background: $white;
7
7
  $textColor: $neutral-900;
@@ -19,7 +19,7 @@ $shadow: $ib-shadow-3;
19
19
  bottom: auto;
20
20
  left: auto;
21
21
  right: auto;
22
- z-index: 100;
22
+ z-index: 100;
23
23
  @include TooltipPosition;
24
24
 
25
25
  &-head {
@@ -45,9 +45,9 @@ export default {
45
45
  </script>
46
46
 
47
47
  <style lang="scss" scoped>
48
- @import "../../assets/scss/typography.scss";
49
- @import "../../assets/scss/variables/shadows.scss";
50
- @import "../../assets/scss/mixins.scss";
48
+ @use "../../assets/scss/typography.scss" as *;
49
+ @use "../../assets/scss/variables/shadows.scss" as *;
50
+ @use "../../assets/scss/mixins.scss" as *;
51
51
 
52
52
  .ib-tooltip {
53
53
  padding: 10px;