@gitlab/ui 59.3.0 → 59.3.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.
- package/CHANGELOG.md +14 -0
- package/dist/components/base/button/button.js +1 -1
- package/dist/components/base/modal/modal.js +1 -1
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +5 -4
- package/dist/components/base/skeleton_loader/skeleton_loader.js +8 -5
- package/dist/components/base/table/table.js +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/dist/utils/utils.js +3 -1
- package/package.json +3 -3
- package/src/components/base/button/button.vue +4 -1
- package/src/components/base/modal/modal.vue +2 -1
- package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.spec.js +7 -0
- package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +3 -2
- package/src/components/base/skeleton_loader/skeleton_loader.spec.js +24 -2
- package/src/components/base/skeleton_loader/skeleton_loader.vue +64 -59
- package/src/components/base/table/table.spec.js +1 -1
- package/src/components/base/table/table.vue +1 -1
- package/src/scss/utilities.scss +8 -0
- package/src/scss/utility-mixins/svg.scss +4 -0
- package/src/utils/utils.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [59.3.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v59.3.1...v59.3.2) (2023-04-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **GlSkeletonLoader:** Disable animation for reduced motion ([a70e810](https://gitlab.com/gitlab-org/gitlab-ui/commit/a70e8104361a4f51f36076d4466989df2de53f94))
|
|
7
|
+
|
|
8
|
+
## [59.3.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v59.3.0...v59.3.1) (2023-04-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **base_dropdown:** conditional chaining to destroy popper ([05cf79e](https://gitlab.com/gitlab-org/gitlab-ui/commit/05cf79e0fdaf55d9403fcdaba062d416294b3815))
|
|
14
|
+
|
|
1
15
|
# [59.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v59.2.0...v59.3.0) (2023-04-04)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -106,7 +106,7 @@ var script = {
|
|
|
106
106
|
mounted() {
|
|
107
107
|
// eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots
|
|
108
108
|
if (!this.$slots.default && !this.$attrs['aria-label'] && !this.$props.label) {
|
|
109
|
-
logWarning('[gl-button]: Accessible name missing. Please add inner text or aria-label.');
|
|
109
|
+
logWarning('[gl-button]: Accessible name missing. Please add inner text or aria-label.', this.$el);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
};
|
|
@@ -102,7 +102,7 @@ var script = {
|
|
|
102
102
|
},
|
|
103
103
|
mounted() {
|
|
104
104
|
if (!this.ariaLabel && !this.title) {
|
|
105
|
-
logWarning('[gl-modal]: Accessible name for modal missing. Please add title prop or aria-label.');
|
|
105
|
+
logWarning('[gl-modal]: Accessible name for modal missing. Please add title prop or aria-label.', this.$el);
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
methods: {
|
|
@@ -200,19 +200,20 @@ var script = {
|
|
|
200
200
|
this.checkToggleFocusable();
|
|
201
201
|
},
|
|
202
202
|
beforeDestroy() {
|
|
203
|
-
|
|
203
|
+
var _this$popper;
|
|
204
|
+
(_this$popper = this.popper) === null || _this$popper === void 0 ? void 0 : _this$popper.destroy();
|
|
204
205
|
},
|
|
205
206
|
methods: {
|
|
206
207
|
checkToggleFocusable() {
|
|
207
208
|
if (!isElementFocusable(this.toggleElement) && !isElementTabbable(this.toggleElement)) {
|
|
208
209
|
logWarning(`GlDisclosureDropdown/GlCollapsibleListbox: Toggle is missing a 'tabindex' and cannot be focused.
|
|
209
|
-
Use 'a' or 'button' element instead or make sure to add 'role="button"' along with 'tabindex' otherwise
|
|
210
|
+
Use 'a' or 'button' element instead or make sure to add 'role="button"' along with 'tabindex' otherwise.`, this.$el);
|
|
210
211
|
}
|
|
211
212
|
},
|
|
212
213
|
async toggle() {
|
|
213
214
|
this.visible = !this.visible;
|
|
214
215
|
if (this.visible) {
|
|
215
|
-
var _this$
|
|
216
|
+
var _this$popper2;
|
|
216
217
|
/* Initially dropdown is hidden with `display="none"`.
|
|
217
218
|
When `visible` prop is toggled ON, with the `nextTick` we wait for the DOM update -
|
|
218
219
|
dropdown's `display="block"` is set (adding CSS class `show`).
|
|
@@ -224,7 +225,7 @@ var script = {
|
|
|
224
225
|
e.g. set focus.
|
|
225
226
|
*/
|
|
226
227
|
await this.$nextTick();
|
|
227
|
-
await ((_this$
|
|
228
|
+
await ((_this$popper2 = this.popper) === null || _this$popper2 === void 0 ? void 0 : _this$popper2.update());
|
|
228
229
|
this.$emit(GL_DROPDOWN_SHOWN);
|
|
229
230
|
} else {
|
|
230
231
|
this.$emit(GL_DROPDOWN_HIDDEN);
|
|
@@ -97,6 +97,7 @@ var script = {
|
|
|
97
97
|
}
|
|
98
98
|
return `${DEFAULT_LINE_WIDTH_PERCENTAGES[index % DEFAULT_LINE_WIDTH_PERCENTAGES.length]}%`;
|
|
99
99
|
};
|
|
100
|
+
const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
100
101
|
const svg = createElement('svg', {
|
|
101
102
|
class: {
|
|
102
103
|
'gl-skeleton-loader': true,
|
|
@@ -108,15 +109,17 @@ var script = {
|
|
|
108
109
|
preserveAspectRatio: props.preserveAspectRatio
|
|
109
110
|
}
|
|
110
111
|
}, [createElement('title', {}, ['Loading']), createElement('rect', {
|
|
111
|
-
style: {
|
|
112
|
-
fill: `url(${props.baseUrl}#${props.uniqueKey}-idGradient)`
|
|
113
|
-
},
|
|
114
112
|
attrs: {
|
|
115
113
|
'clip-path': `url(${props.baseUrl}#${props.uniqueKey}-idClip)`,
|
|
116
114
|
x: 0,
|
|
117
115
|
y: 0,
|
|
118
116
|
width: width(),
|
|
119
|
-
height: height()
|
|
117
|
+
height: height(),
|
|
118
|
+
...(reducedMotion ? {
|
|
119
|
+
class: 'gl-fill-gray-100'
|
|
120
|
+
} : {
|
|
121
|
+
fill: `url(${props.baseUrl}#${props.uniqueKey}-idGradient)`
|
|
122
|
+
})
|
|
120
123
|
}
|
|
121
124
|
}), createElement('defs', {}, [createElement('clipPath', {
|
|
122
125
|
attrs: {
|
|
@@ -130,7 +133,7 @@ var script = {
|
|
|
130
133
|
height: DEFAULT_LINE_HEIGHT,
|
|
131
134
|
rx: 4
|
|
132
135
|
}
|
|
133
|
-
}))), createElement('linearGradient', {
|
|
136
|
+
}))), !reducedMotion && createElement('linearGradient', {
|
|
134
137
|
attrs: {
|
|
135
138
|
id: `${props.uniqueKey}-idGradient`
|
|
136
139
|
}
|
|
@@ -31,7 +31,7 @@ var script = {
|
|
|
31
31
|
// logWarning will call isDev before logging any message
|
|
32
32
|
// this additional call to isDev is being made to exit the condition early when run in production
|
|
33
33
|
if (isDev() && !shouldUseFullTable(this)) {
|
|
34
|
-
logWarning(glTableLiteWarning);
|
|
34
|
+
logWarning(glTableLiteWarning, this.$el);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
};
|