@avakhula/ui 0.0.33 → 0.0.34-4.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.
Files changed (89) hide show
  1. package/.eslintrc.cjs +17 -10
  2. package/.storybook/preview-head.html +1 -0
  3. package/dist/index.js +9040 -7752
  4. package/dist/index.umd.cjs +87 -88
  5. package/dist/style.css +1 -1
  6. package/package.json +15 -15
  7. package/src/App.vue +138 -25
  8. package/src/assets/scss/mixins/dropdown-list-item.scss +8 -1
  9. package/src/assets/scss/mixins/tooltip-position.scss +1 -1
  10. package/src/assets/scss/variables/shadows.json +14 -30
  11. package/src/assets/scss/variables/shadows.scss +10 -15
  12. package/src/components/Accordion/Accordion.scss +4 -1
  13. package/src/components/Accordion/Accordion.vue +20 -3
  14. package/src/components/Accordion/Acordion.spec.js +75 -0
  15. package/src/components/Alert/Alert.spec.js +69 -0
  16. package/src/components/Alert/Alert.stories.js +1 -4
  17. package/src/components/Alert/Alert.vue +22 -3
  18. package/src/components/Alert/alert.scss +22 -0
  19. package/src/components/Alert/constants.js +1 -0
  20. package/src/components/Avatar/Avatar.stories.js +23 -0
  21. package/src/components/Avatar/Avatar.vue +125 -0
  22. package/src/components/Avatar/constants.js +4 -0
  23. package/src/components/Badge/Badge.spec.js +37 -0
  24. package/src/components/Badge/Badge.vue +1 -1
  25. package/src/components/Button/Button.spec.js +85 -0
  26. package/src/components/Button/Button.vue +14 -3
  27. package/src/components/Button/button.scss +5 -0
  28. package/src/components/Dropdown/Dropdown.vue +3 -3
  29. package/src/components/Dropdown/DropdownItem.vue +9 -3
  30. package/src/components/Form/Checkbox/Checkbox.scss +79 -53
  31. package/src/components/Form/Checkbox/Checkbox.stories.js +4 -2
  32. package/src/components/Form/Checkbox/Checkbox.vue +70 -48
  33. package/src/components/Form/CheckboxGroup/CheckboxGroup.vue +11 -0
  34. package/src/components/Form/CheckboxGroup/readme.mdx +2 -0
  35. package/src/components/Form/DatePicker/DatePicker.scss +259 -261
  36. package/src/components/Form/DatePicker/DatePicker.vue +1 -1
  37. package/src/components/Form/Input/Input.vue +69 -15
  38. package/src/components/Form/Input/constants.js +1 -0
  39. package/src/components/Form/Input/input.scss +33 -6
  40. package/src/components/Form/Label/Label.stories.js +7 -0
  41. package/src/components/Form/Label/Label.vue +43 -4
  42. package/src/components/Form/Label/readme.mdx +1 -0
  43. package/src/components/Form/PhoneInput/phoneInput.scss +3 -2
  44. package/src/components/Form/Radio/Radio.vue +31 -38
  45. package/src/components/Form/Radio/radio.scss +6 -3
  46. package/src/components/Form/Toggle/Toggle.vue +5 -1
  47. package/src/components/Form/Toggle/toggle.scss +4 -4
  48. package/src/components/IconButton/IconButton.scss +7 -0
  49. package/src/components/IconButton/IconButton.vue +10 -9
  50. package/src/components/List.vue +1 -1
  51. package/src/components/Modal/Modal.stories.js +6 -4
  52. package/src/components/Modal/Modal.vue +56 -11
  53. package/src/components/Pagination/LimitSelector.vue +3 -5
  54. package/src/components/Pagination/Pagination.vue +3 -0
  55. package/src/components/Pagination/pagination.scss +8 -14
  56. package/src/components/Panel/Panel.stories.js +0 -7
  57. package/src/components/Panel/Panel.vue +30 -29
  58. package/src/components/Popover/Popover.vue +43 -17
  59. package/src/components/Popover/constants.js +1 -1
  60. package/src/components/Popover/popover.scss +28 -8
  61. package/src/components/ProgressBar/ProgressBar.vue +14 -1
  62. package/src/components/ProgressBar/constants.js +1 -0
  63. package/src/components/ProgressBar/progressBar.scss +7 -0
  64. package/src/components/Sorting/Sorting.stories.js +12 -2
  65. package/src/components/Sorting/Sorting.vue +125 -37
  66. package/src/components/Sorting/sorting.scss +17 -14
  67. package/src/components/SplitButton/SplitButton.vue +8 -1
  68. package/src/components/SplitButton/splitButton.scss +3 -0
  69. package/src/components/StatusIndicator/icons.js +11 -11
  70. package/src/components/Tabs/Tabs.vue +25 -2
  71. package/src/components/Tabs/tabs.scss +1 -1
  72. package/src/components/ToggleTip/constants.js +1 -1
  73. package/src/components/ToggleTip/toggleTip.scss +2 -2
  74. package/src/components/Tooltip/Tooltip.vue +120 -4
  75. package/src/components/TreeSelect/Option.vue +36 -27
  76. package/src/components/TreeSelect/Select.stories.js +5 -90
  77. package/src/components/TreeSelect/Select.vue +254 -121
  78. package/src/components/TreeSelect/scss/option.scss +4 -0
  79. package/src/components/TreeSelect/scss/select.scss +51 -6
  80. package/src/directives/tooltip/TooltipController.js +184 -0
  81. package/src/directives/tooltip/readme.mdx +17 -0
  82. package/src/directives/tooltip/textOverflowTooltip.js +21 -49
  83. package/src/directives/tooltip/tooltip.js +57 -45
  84. package/src/directives/tooltip/tooltip.stories.js +39 -0
  85. package/src/helpers/removeEvents.js +2 -2
  86. package/src/index.js +1 -0
  87. package/src/main.js +1 -0
  88. package/src/scripts/parseScssVariables.js +23 -7
  89. package/src/components/Panel/constants.js +0 -4
@@ -1,11 +1,10 @@
1
1
  <template>
2
2
  <ib-button
3
- @click="onClick"
4
3
  v-bind="attrs"
5
4
  :href="href"
6
5
  :kind="kind"
7
6
  :disabled="disabled"
8
- :tabindex="disabledFocus ? -1 : 0"
7
+ :prevent-default="preventDefault"
9
8
  >
10
9
  <slot></slot>
11
10
  <ib-tooltip v-if="helpText.length" :text="helpText" />
@@ -16,7 +15,6 @@
16
15
  import IbButton from "../Button/Button.vue";
17
16
  import IbTooltip from "../Tooltip/Tooltip.vue";
18
17
  import { iconButtonKindOptions, iconButtonSize } from "./constants.js";
19
- import removeEvents from "../../helpers/removeEvents";
20
18
 
21
19
  export default {
22
20
  name: "IbIconButton",
@@ -53,17 +51,16 @@ export default {
53
51
  type: Boolean,
54
52
  default: false,
55
53
  },
54
+ preventDefault: {
55
+ type: Boolean,
56
+ default: false,
57
+ },
56
58
  },
57
59
  data() {
58
60
  return {
59
61
  tooltipVisible: false,
60
62
  };
61
63
  },
62
- methods: {
63
- onClick(e) {
64
- this.$emit("click", e);
65
- },
66
- },
67
64
  computed: {
68
65
  classes() {
69
66
  const classList = ["ib-icon-button"];
@@ -81,9 +78,13 @@ export default {
81
78
  return classList;
82
79
  },
83
80
  attrs() {
84
- const attrsList = { ...removeEvents({ ...this.$attrs }) };
81
+ const attrsList = {...this.$attrs};
85
82
  attrsList.class = [...this.classes, attrsList.class];
86
83
 
84
+ if (this.disabledFocus) {
85
+ attrsList["tabindex"] = "-1";
86
+ }
87
+
87
88
  return attrsList;
88
89
  },
89
90
  },
@@ -119,7 +119,7 @@ $item-hover-bg: $gray-100;
119
119
  }
120
120
  }
121
121
 
122
- .ib-checkbox {
122
+ .ib-checkbox-wrapper {
123
123
  transition: background-color 0.3s;
124
124
 
125
125
  .ib-checkbox-body {
@@ -29,9 +29,7 @@ const Template = (args) => ({
29
29
  },
30
30
  template: `
31
31
  <ib-modal v-bind="args">
32
- <template #trigger>
33
- <ib-button>Show modal</ib-button>
34
- </template>
32
+
35
33
  <template #header>
36
34
  Remove
37
35
  </template>
@@ -47,7 +45,11 @@ const Template = (args) => ({
47
45
  </ib-button-group>
48
46
  </template>
49
47
  </ib-modal>
48
+
49
+ <ib-button>Show modal</ib-button>
50
50
  `,
51
51
  });
52
52
 
53
- export const Default = Template.bind({});
53
+ export const Default = Template.bind({
54
+ active: true,
55
+ });
@@ -11,7 +11,7 @@
11
11
 
12
12
  <Teleport to="body">
13
13
  <div class="modal" :class="classList" v-show="isActive" ref="modal">
14
- <div class="modal-body" :style="bodyStyles" v-outside="clickOutside">
14
+ <div :class="bodyClassList" :style="bodyStyles" v-outside="clickOutside">
15
15
  <ib-icon-button
16
16
  v-if="showCloseButton"
17
17
  class="modal-close-icon"
@@ -100,11 +100,8 @@ export default {
100
100
  }
101
101
  );
102
102
 
103
- document.addEventListener("keydown", (e) => {
104
- if (e.keyCode === ESC_KEY_CODE && !this.stopPropagation) {
105
- this.close();
106
- }
107
- });
103
+ document.addEventListener("keydown", this.onKeydown);
104
+ document.addEventListener("blur", this.setFocusOnModal, true);
108
105
  },
109
106
  data() {
110
107
  return {
@@ -133,6 +130,13 @@ export default {
133
130
  document.body.classList.remove("modal-open");
134
131
  this.$emit("close");
135
132
  },
133
+ setFocusOnModal(e) {
134
+ if(!this.$refs.modal?.contains(e.target) && this.isActive) {
135
+ this.$refs.modal.querySelector(
136
+ "[tabindex], a, button, input, select, textarea"
137
+ ).focus();
138
+ }
139
+ },
136
140
  clickOutside(e) {
137
141
  if (this.stopPropagation) {
138
142
  return;
@@ -142,6 +146,11 @@ export default {
142
146
  this.close();
143
147
  }
144
148
  },
149
+ onKeydown(e) {
150
+ if (e.keyCode === ESC_KEY_CODE && !this.stopPropagation && this.isActive) {
151
+ this.close();
152
+ }
153
+ }
145
154
  },
146
155
  computed: {
147
156
  bodyStyles() {
@@ -172,6 +181,25 @@ export default {
172
181
 
173
182
  return styleList;
174
183
  },
184
+ bodyClassList() {
185
+ const classList = ["modal-body"];
186
+ if (this.size === modalSizes.S) {
187
+ classList.push("modal-body-s");
188
+ }
189
+
190
+ if (this.size === modalSizes.M) {
191
+ classList.push("modal-body-m");
192
+ }
193
+
194
+ if (this.size === modalSizes.L) {
195
+ classList.push("modal-body-l");
196
+ }
197
+
198
+ if (this.size === modalSizes.XL) {
199
+ classList.push("modal-body-xl");
200
+ }
201
+ return classList;
202
+ },
175
203
  hasTrigger() {
176
204
  return !!this.$slots.trigger;
177
205
  },
@@ -190,6 +218,9 @@ export default {
190
218
  if (this.isActive) {
191
219
  this.close();
192
220
  }
221
+
222
+ document.removeEventListener("keydown", this.onKeydown);
223
+ document.removeEventListener("blur", this.setFocusOnModal, true);
193
224
  },
194
225
  };
195
226
  </script>
@@ -202,7 +233,9 @@ export default {
202
233
  $backdrop-bg: $black-t20;
203
234
  $modal-title-color: $neutral-900;
204
235
  $modal-bg: $white;
205
- $modal-shadow: $ib-shadow-6;
236
+ $modal-small-shadow: $ib-shadow-5;
237
+ $modal-large-shadow: $ib-shadow-6;
238
+
206
239
  body.modal-open {
207
240
  overflow: hidden;
208
241
  }
@@ -234,19 +267,31 @@ body.modal-open {
234
267
  min-width: 380px;
235
268
  border-radius: 8px;
236
269
  max-width: calc(100% - 40px);
237
- box-shadow: $modal-shadow;
238
270
  display: flex;
239
271
  flex-direction: column;
240
272
 
273
+ &.modal-body-s,
274
+ &.modal-body-m {
275
+ box-shadow: $modal-small-shadow;
276
+ }
277
+
278
+ &.modal-body-l,
279
+ &.modal-body-xl {
280
+ box-shadow: $modal-large-shadow;
281
+ }
282
+
241
283
  .modal-header {
242
284
  @include Ib-H2-medium;
243
285
  color: $modal-title-color;
244
286
  margin-bottom: 15px;
287
+ padding-right: 25px;
245
288
  }
246
289
 
247
- .modal-content.without-title {
248
- padding-right: 25px;
249
- padding-top: 4px;
290
+ .modal-content {
291
+ .without-title {
292
+ padding-right: 25px;
293
+ padding-top: 4px;
294
+ }
250
295
  }
251
296
 
252
297
  .modal-close-icon {
@@ -2,7 +2,7 @@
2
2
  <div class="report-limit-selector">
3
3
  <ib-label>{{ labelSelect }}</ib-label>
4
4
  <ib-select
5
- class="report-limit-selector-select"
5
+ classList="report-limit-selector-select"
6
6
  :value="value"
7
7
  :options="prepareOptions"
8
8
  :is-multiple="false"
@@ -64,10 +64,8 @@ export default {
64
64
  </script>
65
65
  <style lang="scss">
66
66
  .report-limit-selector {
67
- .report-limit-selector-select {
68
- .tree-choice {
69
- width: auto;
70
- }
67
+ .tree-select {
68
+ width: fit-content;
71
69
  }
72
70
  }
73
71
  </style>
@@ -117,6 +117,9 @@ export default {
117
117
  current(newVal) {
118
118
  this.onSelect(newVal);
119
119
  },
120
+ limitSelector(newVal) {
121
+ this.limitValue = newVal;
122
+ },
120
123
  limitValue() {
121
124
  this.currentPage = 1;
122
125
  },
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  .report-controls {
28
- display: flex;
28
+ display: flex;
29
29
  justify-content: space-between;
30
30
  align-items: center;
31
31
 
@@ -62,7 +62,6 @@
62
62
  input[type=number] {
63
63
  -moz-appearance: textfield;
64
64
  }
65
-
66
65
  }
67
66
 
68
67
  .button-prev {
@@ -87,13 +86,12 @@
87
86
  .icon-button-wrapper.button-prev {
88
87
  &.disabled {
89
88
  pointer-events: none;
90
-
89
+
91
90
  button {
92
91
  color: $neutral-500;
93
92
  }
94
93
  }
95
94
  }
96
-
97
95
 
98
96
  .pagination-wrapper {
99
97
  display: flex;
@@ -101,14 +99,13 @@
101
99
  margin: 0;
102
100
  position: relative;
103
101
 
104
-
105
-
106
102
  .pagination-item {
107
103
  list-style: none;
108
104
  @include Ib-H4-medium;
109
105
  margin: 0 5px;
110
106
  height: 36px;
111
- width: 36px;
107
+ min-width: 36px;
108
+ width: fit-content;
112
109
  background: $gray-100;
113
110
  border-radius: 4px;
114
111
  @include Ib-H4-medium;
@@ -117,7 +114,7 @@
117
114
  &.dots-left {
118
115
  position: relative;
119
116
  margin-left: 29px;
120
-
117
+
121
118
  &::before {
122
119
  content: '...';
123
120
  position: absolute;
@@ -128,13 +125,12 @@
128
125
  transform: translateX(-50%);
129
126
  width: 14px;
130
127
  }
131
-
132
128
  }
133
129
 
134
130
  &.dots-right {
135
131
  position: relative;
136
132
  margin-right: 29px;
137
-
133
+
138
134
  &::after {
139
135
  content: '...';
140
136
  position: absolute;
@@ -145,7 +141,6 @@
145
141
  transform: translateX(50%);
146
142
  width: 14px;
147
143
  }
148
-
149
144
  }
150
145
 
151
146
  &.active button {
@@ -155,7 +150,7 @@
155
150
 
156
151
  button {
157
152
  height: inherit;
158
- width: inherit;
153
+ width: 100%;
159
154
  border: none;
160
155
  background: $gray-100;
161
156
  border-radius: 4px;
@@ -171,7 +166,7 @@
171
166
  color: $blue-700;
172
167
  background: $blue-100;
173
168
  }
174
-
169
+
175
170
  &:active {
176
171
  border-color: transparent;
177
172
  color: $blue-900;
@@ -181,7 +176,6 @@
181
176
  &:focus {
182
177
  @include focus(2px);
183
178
  }
184
-
185
179
  }
186
180
  }
187
181
  }
@@ -1,15 +1,8 @@
1
1
  import IbPanel from "./Panel.vue";
2
- import { panelVariant } from "./constants";
3
2
 
4
3
  export default {
5
4
  title: "Panel",
6
5
  component: IbPanel,
7
- argTypes: {
8
- variant: {
9
- control: { type: "select" },
10
- options: Object.values(panelVariant),
11
- },
12
- },
13
6
  };
14
7
 
15
8
  const Template = (args) => ({
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="classList">
2
+ <div class="ib-panel" :class="{ 'panel-error': error }">
3
3
  <div class="panel-head">
4
4
  <div class="head-title">
5
5
  <slot name="title" />
@@ -24,7 +24,6 @@
24
24
 
25
25
  <script>
26
26
  import expandAnimation from "../../mixins/expandAnimation";
27
- import { panelVariant } from "./constants";
28
27
 
29
28
  export default {
30
29
  name: "IbPanel",
@@ -34,22 +33,18 @@ export default {
34
33
  type: Boolean,
35
34
  default: true,
36
35
  },
37
- variant: {
38
- type: String,
39
- default: panelVariant.primary,
40
- },
41
- },
42
- computed: {
43
- classList() {
44
- const classList = ["panel", `panel-${this.variant}`];
45
-
46
- return classList;
36
+ error: {
37
+ type: Boolean,
38
+ default: false,
47
39
  },
48
40
  },
49
41
  };
50
42
  </script>
51
43
 
52
44
  <style lang="scss" scoped>
45
+ @import "../../assets/scss/variables/colors.scss";
46
+ @import "../../assets/scss/typography.scss";
47
+
53
48
  .expand-enter-active,
54
49
  .expand-leave-active {
55
50
  transition: height 1s ease-in-out;
@@ -61,25 +56,25 @@ export default {
61
56
  height: 0;
62
57
  }
63
58
 
64
- @import "../../assets/scss/variables/colors.scss";
65
- @import "../../assets/scss/typography.scss";
66
-
67
59
  $panel-border-color: $gray-200;
60
+ $panel-error-outline-color: $red-800;
68
61
  $panel-title-color: $neutral-900;
69
- $panel-divider-color: $gray-200;
70
- $description-color: $gray-600;
71
- $panel-primary-body-bg: $gray-50;
72
- $panel-secondary-body-bg: $white;
62
+ $panel-divider-color: $gray-300;
73
63
 
74
- .panel {
64
+ .ib-panel {
75
65
  border: 1px solid $panel-border-color;
76
66
  border-radius: 4px;
77
67
 
68
+ &.panel-error {
69
+ outline: 2px solid $panel-error-outline-color;
70
+ }
71
+
78
72
  .panel-head {
79
73
  display: inline-flex;
80
74
  width: 100%;
81
75
  align-items: center;
82
76
  padding: 15px;
77
+ background-color: $gray-50;
83
78
 
84
79
  .head-title {
85
80
  @include Ib-H3-medium;
@@ -95,19 +90,25 @@ $panel-secondary-body-bg: $white;
95
90
  }
96
91
 
97
92
  .head-content {
93
+ width: 100%;
98
94
  @include Ib-H4-regular;
99
- color: $description-color;
100
- }
101
- }
102
- &.panel-primary {
103
- .panel-body {
104
- background-color: $panel-primary-body-bg;
105
95
  }
106
96
  }
97
+ }
98
+ </style>
107
99
 
108
- &.panel-secondary {
109
- .panel-body {
110
- background-color: $panel-secondary-body-bg;
100
+ <style lang="scss">
101
+ @import "../../assets/scss/variables/colors.scss";
102
+ @import "../../assets/scss/typography.scss";
103
+
104
+ $description-color: $gray-700;
105
+
106
+ .ib-panel {
107
+ .head-content {
108
+ width: 100%;
109
+ @include Ib-H4-regular;
110
+ p {
111
+ color: $description-color;
111
112
  }
112
113
  }
113
114
  }
@@ -1,45 +1,69 @@
1
1
  <template>
2
2
  <Transition>
3
- <div v-show="isVisible" :class="classes">
3
+ <div ref="popover" v-show="isVisible" :class="classes">
4
4
  <slot></slot>
5
5
  </div>
6
6
  </Transition>
7
7
  </template>
8
8
 
9
9
  <script>
10
- import { popoverPosition } from "./constants";
10
+ import { computePosition, autoPlacement } from '@floating-ui/dom';
11
11
 
12
12
  export default {
13
13
  name: "IbPopover",
14
14
  props: {
15
15
  position: {
16
- type: String,
17
- default: popoverPosition.topCenter,
16
+ type: [String, Array],
17
+ default: 'top',
18
+ },
19
+ alwaysVisible: {
20
+ type: Boolean,
21
+ default: false,
18
22
  },
19
23
  },
20
24
  data() {
21
25
  return {
22
26
  parentNode: null,
23
- isVisible: false,
27
+ isVisible: this.alwaysVisible ? true : false,
28
+ activePosition: null,
24
29
  };
25
30
  },
26
31
  mounted() {
27
32
  this.$nextTick(() => {
28
33
  this.parentNode = this.$el.parentNode;
29
34
 
30
- if (getComputedStyle(this.parentNode).position !== "absolute") {
31
- this.parentNode.style.position = "relative";
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);
32
40
  }
33
-
34
- this.parentNode.addEventListener("focus", this.showPopover, true);
35
- this.parentNode.addEventListener("blur", this.hidePopover, true);
36
- this.parentNode.addEventListener("mouseover", this.showPopover, true);
37
- this.parentNode.addEventListener("mouseleave", this.hidePopover, true);
38
41
  });
39
42
  },
40
43
  methods: {
41
44
  showPopover() {
45
+ if (this.isVisible) return;
42
46
  this.isVisible = true;
47
+
48
+ computePosition(
49
+ this.parentNode,
50
+ this.$refs.popover,
51
+ {
52
+ middleware: [
53
+ autoPlacement({
54
+ allowedPlacements: this.position,
55
+ })
56
+ ]
57
+ }
58
+ )
59
+ .then(({x, y, placement }) => {
60
+ this.activePosition = placement;
61
+
62
+ Object.assign(this.$refs.popover.style, {
63
+ left: `${x}px`,
64
+ top: `${y}px`,
65
+ });
66
+ });
43
67
  },
44
68
  hidePopover() {
45
69
  this.isVisible = false;
@@ -48,7 +72,7 @@ export default {
48
72
  computed: {
49
73
  classes() {
50
74
  const classList = ["ib-popover"];
51
- classList.push(`ib-${this.position}`);
75
+ classList.push(`ib-${this.activePosition}`);
52
76
 
53
77
  if (this.isVisible) {
54
78
  classList.push("active");
@@ -58,10 +82,12 @@ export default {
58
82
  },
59
83
  },
60
84
  beforeUnmount() {
61
- this.parentNode.removeEventListener("focus", this.showPopover, true);
62
- this.parentNode.removeEventListener("blur", this.hidePopover, true);
63
- this.parentNode.removeEventListener("mouseover", this.showPopover, true);
64
- this.parentNode.removeEventListener("mouseleave", this.hidePopover, true);
85
+ if (!this.alwaysVisible && this.parentNode) {
86
+ this.parentNode.removeEventListener("focus", this.showPopover, true);
87
+ this.parentNode.removeEventListener("blur", this.hidePopover, true);
88
+ this.parentNode.removeEventListener("mouseover", this.showPopover, true);
89
+ this.parentNode.removeEventListener("mouseleave", this.hidePopover, true);
90
+ }
65
91
  },
66
92
  };
67
93
  </script>
@@ -1,5 +1,5 @@
1
1
  export const popoverPosition = {
2
- topLeft: "top-Left",
2
+ topLeft: "top-left",
3
3
  topCenter: "top-center",
4
4
  topRight: "top-right",
5
5
  rightTop: "right-top",
@@ -1,11 +1,10 @@
1
1
  @import "../../assets/scss/typography.scss";
2
- @import "../../assets/scss/mixins/tooltip-position.scss";
3
2
  @import "../../assets/scss/variables/colors.scss";
4
3
  @import "../../assets/scss/variables/shadows.scss";
5
4
 
6
5
  $background: $white;
7
6
  $textColor: $neutral-900;
8
- $shadow: $ib-shadow-4;
7
+ $shadow: $ib-shadow-3;
9
8
 
10
9
  .ib-popover {
11
10
  position: absolute;
@@ -16,11 +15,32 @@ $shadow: $ib-shadow-4;
16
15
  color: $textColor;
17
16
  border-radius: 4px;
18
17
  box-shadow: $shadow;
19
- top: auto;
20
- bottom: auto;
21
- left: auto;
22
- right: auto;
23
- @include TooltipPosition;
24
- z-index: 100;
18
+ z-index: 9998;
25
19
  text-align: start;
20
+
21
+ &.ib {
22
+ &-right,
23
+ &-right-start,
24
+ &-right-end {
25
+ margin-left: 7px;
26
+ }
27
+
28
+ &-left,
29
+ &-left-start,
30
+ &-left-end {
31
+ margin-left: -7px;
32
+ }
33
+
34
+ &-top,
35
+ &-top-start,
36
+ &-top-end {
37
+ margin-top: -7px;
38
+ }
39
+
40
+ &-bottom,
41
+ &-bottom-start,
42
+ &-bottom-end {
43
+ margin-bottom: -7px;
44
+ }
45
+ }
26
46
  }
@@ -1,7 +1,15 @@
1
1
  <template>
2
2
  <div class="ib-progress-bar-wrapper">
3
3
  <div :class="classes">
4
- <div class="progress" :style="{ width: progress + '%' }">
4
+ <div
5
+ class="progress"
6
+ role="meter"
7
+ :aria-label="ariaLabel"
8
+ aria-valuemin="0"
9
+ aria-valuemax="100"
10
+ :aria-valuenow="progress"
11
+ :style="{ width: progress + '%' }"
12
+ >
5
13
  <div class="gradient"></div>
6
14
  </div>
7
15
  <div></div>
@@ -24,6 +32,10 @@ export default {
24
32
  type: [String, Number],
25
33
  default: 0,
26
34
  },
35
+ ariaLabel: {
36
+ type: String,
37
+ required: true
38
+ }
27
39
  },
28
40
  computed: {
29
41
  classes() {
@@ -39,6 +51,7 @@ export default {
39
51
 
40
52
  if (
41
53
  this.states === progressBarStates.FAILED ||
54
+ this.states === progressBarStates.CANCELING ||
42
55
  this.states === progressBarStates.CANCELED
43
56
  ) {
44
57
  return "close-circle";
@@ -2,5 +2,6 @@ export const progressBarStates = {
2
2
  PROGRESS: "progress",
3
3
  SUCCESS: "success",
4
4
  FAILED: "failed",
5
+ CANCELING: "canceling",
5
6
  CANCELED: "canceled",
6
7
  };