@gitlab/ui 59.3.1 → 59.4.0
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 +1 -1
- package/dist/components/base/skeleton_loader/skeleton_loader.js +8 -5
- package/dist/components/base/table/table.js +1 -1
- package/dist/components/charts/area/area.js +6 -0
- 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.vue +2 -1
- 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/components/charts/area/area.spec.js +61 -29
- package/src/components/charts/area/area.stories.js +22 -0
- package/src/components/charts/area/area.vue +7 -0
- 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.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v59.3.2...v59.4.0) (2023-04-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlAreaChart:** add legend-series-info prop ([6e855cc](https://gitlab.com/gitlab-org/gitlab-ui/commit/6e855cc1260c00a4a5821003b2dd0ec8d082d7bd))
|
|
7
|
+
|
|
8
|
+
## [59.3.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v59.3.1...v59.3.2) (2023-04-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **GlSkeletonLoader:** Disable animation for reduced motion ([a70e810](https://gitlab.com/gitlab-org/gitlab-ui/commit/a70e8104361a4f51f36076d4466989df2de53f94))
|
|
14
|
+
|
|
1
15
|
## [59.3.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v59.3.0...v59.3.1) (2023-04-05)
|
|
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: {
|
|
@@ -207,7 +207,7 @@ var script = {
|
|
|
207
207
|
checkToggleFocusable() {
|
|
208
208
|
if (!isElementFocusable(this.toggleElement) && !isElementTabbable(this.toggleElement)) {
|
|
209
209
|
logWarning(`GlDisclosureDropdown/GlCollapsibleListbox: Toggle is missing a 'tabindex' and cannot be focused.
|
|
210
|
-
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);
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
213
|
async toggle() {
|
|
@@ -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
|
};
|
|
@@ -89,6 +89,11 @@ var script = {
|
|
|
89
89
|
type: [Number, String],
|
|
90
90
|
required: false,
|
|
91
91
|
default: null
|
|
92
|
+
},
|
|
93
|
+
legendSeriesInfo: {
|
|
94
|
+
type: Array,
|
|
95
|
+
required: false,
|
|
96
|
+
default: () => []
|
|
92
97
|
}
|
|
93
98
|
},
|
|
94
99
|
data() {
|
|
@@ -194,6 +199,7 @@ var script = {
|
|
|
194
199
|
};
|
|
195
200
|
},
|
|
196
201
|
seriesInfo() {
|
|
202
|
+
if (this.legendSeriesInfo.length > 0) return this.legendSeriesInfo;
|
|
197
203
|
return this.compiledOptions.series.reduce((acc, series, index) => {
|
|
198
204
|
if (series.type === 'line') {
|
|
199
205
|
acc.push({
|