@gitlab/ui 32.14.0 → 32.18.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.
Files changed (23) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/base/skeleton_loading/skeleton_loading.documentation.js +2 -14
  3. package/dist/components/base/skeleton_loading/skeleton_loading.js +3 -0
  4. package/dist/components/charts/stacked_column/stacked_column.js +16 -6
  5. package/dist/index.css +2 -2
  6. package/dist/index.css.map +1 -1
  7. package/documentation/documented_stories.js +1 -0
  8. package/package.json +11 -11
  9. package/src/components/base/datepicker/datepicker.scss +14 -1
  10. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.spec.js +2 -2
  11. package/src/components/base/skeleton_loading/skeleton_loading.documentation.js +0 -11
  12. package/src/components/base/skeleton_loading/skeleton_loading.md +0 -2
  13. package/src/components/base/skeleton_loading/skeleton_loading.stories.js +30 -18
  14. package/src/components/base/skeleton_loading/skeleton_loading.vue +3 -0
  15. package/src/components/charts/stacked_column/__snapshots__/stacked_column.spec.js.snap +256 -0
  16. package/src/components/charts/stacked_column/stacked_column.spec.js +42 -0
  17. package/src/components/charts/stacked_column/stacked_column.vue +13 -7
  18. package/dist/components/base/skeleton_loading/examples/index.js +0 -19
  19. package/dist/components/base/skeleton_loading/examples/skeleton_loading.basic.example.js +0 -38
  20. package/dist/components/base/skeleton_loading/examples/skeleton_loading.one_line.example.js +0 -38
  21. package/src/components/base/skeleton_loading/examples/index.js +0 -22
  22. package/src/components/base/skeleton_loading/examples/skeleton_loading.basic.example.vue +0 -3
  23. package/src/components/base/skeleton_loading/examples/skeleton_loading.one_line.example.vue +0 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # [32.18.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.17.0...v32.18.0) (2021-10-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * **Datepicker:** Add hover and disabled styles ([d5e1a81](https://gitlab.com/gitlab-org/gitlab-ui/commit/d5e1a8180f24a1238c5d86725d490b7e4829f6e7))
7
+
8
+ # [32.17.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.16.0...v32.17.0) (2021-10-04)
9
+
10
+
11
+ ### Features
12
+
13
+ * **GlStackedColumn:** Add custom palette ([b6fb842](https://gitlab.com/gitlab-org/gitlab-ui/commit/b6fb8421f56fdd64f573213eb26cf6e8fceda6ff))
14
+
15
+ # [32.16.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.15.0...v32.16.0) (2021-10-04)
16
+
17
+
18
+ ### Features
19
+
20
+ * **Datepicker:** Add hover state to month/year dropdowns ([5093b38](https://gitlab.com/gitlab-org/gitlab-ui/commit/5093b388267fb842ed2ea3217a14a1937386db0a))
21
+
22
+ # [32.15.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.14.0...v32.15.0) (2021-10-01)
23
+
24
+
25
+ ### Features
26
+
27
+ * **deps:** Update bootstrap-vue to 2.19.0 ([03af642](https://gitlab.com/gitlab-org/gitlab-ui/commit/03af64275f2f066964c6c79d553fcc541385631d))
28
+
1
29
  # [32.14.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.13.0...v32.14.0) (2021-10-01)
2
30
 
3
31
 
@@ -1,19 +1,7 @@
1
- import examples from './examples';
2
-
3
- var description = "# (Deprecated) Skeleton Loading\n\nThe Skeleton Loading component has been deprecated, please use [Skeleton Loader](https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-skeleton-loader--default).\n\nHow to replace this component with [Skeleton Loader](https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-skeleton-loader--default):\n\n1. Update imports\n - `import { GlSkeletonLoading } from '@gitlab/ui'` -> `import { GlSkeletonLoader } from '@gitlab/ui'`\n2. Update component definitions\n - `components: { GlSkeletonLoading }` -> `components: { GlSkeletonLoader }`\n3. Update template\n - `<gl-skeleton-loading />` -> `<gl-skeleton-loader />`\n";
1
+ var description = "The Skeleton Loading component has been deprecated, please use [Skeleton Loader](https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-skeleton-loader--default).\n\nHow to replace this component with [Skeleton Loader](https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-skeleton-loader--default):\n\n1. Update imports\n - `import { GlSkeletonLoading } from '@gitlab/ui'` -> `import { GlSkeletonLoader } from '@gitlab/ui'`\n2. Update component definitions\n - `components: { GlSkeletonLoading }` -> `components: { GlSkeletonLoader }`\n3. Update template\n - `<gl-skeleton-loading />` -> `<gl-skeleton-loader />`\n";
4
2
 
5
3
  var skeleton_loading_documentation = {
6
- description,
7
- examples,
8
- propsInfo: {
9
- lines: {
10
- validation: {
11
- type: 'range',
12
- min: 1,
13
- max: 3
14
- }
15
- }
16
- }
4
+ description
17
5
  };
18
6
 
19
7
  export default skeleton_loading_documentation;
@@ -2,6 +2,9 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
2
2
 
3
3
  var script = {
4
4
  props: {
5
+ /**
6
+ * Controls the number of lines.
7
+ */
5
8
  lines: {
6
9
  type: Number,
7
10
  required: false,
@@ -114,6 +114,11 @@ var script = {
114
114
  type: Function,
115
115
  required: false,
116
116
  default: null
117
+ },
118
+ customPalette: {
119
+ type: Array,
120
+ required: false,
121
+ default: null
117
122
  }
118
123
  },
119
124
 
@@ -142,7 +147,7 @@ var script = {
142
147
  data
143
148
  }, index) => {
144
149
  const stack = this.presentation === 'stacked' ? this.groupBy : null;
145
- const color = colorFromDefaultPalette(index);
150
+ const color = this.getColor(index);
146
151
  return generateBarSeries({
147
152
  stack,
148
153
  name,
@@ -158,7 +163,7 @@ var script = {
158
163
  name,
159
164
  data
160
165
  }, index) => {
161
- const color = colorFromDefaultPalette(offset + index);
166
+ const color = this.getColor(offset + index);
162
167
  return generateLineSeries({
163
168
  name,
164
169
  data,
@@ -175,7 +180,7 @@ var script = {
175
180
  type,
176
181
  stack = columnOptions.tiled
177
182
  }, index) => {
178
- const color = colorFromDefaultPalette(offset + index);
183
+ const color = this.getColor(offset + index);
179
184
  return type === CHART_TYPE_LINE ? generateLineSeries({
180
185
  color,
181
186
  name,
@@ -248,7 +253,7 @@ var script = {
248
253
  acc.push({
249
254
  name: series.name,
250
255
  type: series.type,
251
- color: colorFromDefaultPalette(index),
256
+ color: this.getColor(index),
252
257
  data: series.data.map(data => data),
253
258
  yAxisIndex: series.yAxisIndex
254
259
  });
@@ -264,6 +269,12 @@ var script = {
264
269
  },
265
270
 
266
271
  methods: {
272
+ getColor(index) {
273
+ var _this$customPalette;
274
+
275
+ return this.customPalette ? (_this$customPalette = this.customPalette) === null || _this$customPalette === void 0 ? void 0 : _this$customPalette[index] : colorFromDefaultPalette(index);
276
+ },
277
+
267
278
  moveShowTooltip(mouseEvent) {
268
279
  this.tooltipPosition = {
269
280
  left: `${mouseEvent.zrX}px`,
@@ -283,11 +294,10 @@ var script = {
283
294
  const {
284
295
  tooltipContent
285
296
  } = params.seriesData.reverse().reduce((acc, bar) => {
286
- const barColor = colorFromDefaultPalette(bar.seriesIndex);
287
297
  acc.tooltipContent[bar.seriesName] = {
288
298
  value: bar.value,
289
299
  index: bar.seriesIndex,
290
- color: barColor
300
+ color: this.getColor(bar.seriesIndex)
291
301
  };
292
302
  return acc;
293
303
  }, {