@gitlab/ui 97.2.0 → 97.3.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [97.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v97.2.1...v97.3.0) (2024-10-18)
2
+
3
+
4
+ ### Features
5
+
6
+ * **GlProgressBar:** Replace Bootstrap Background Class with Custom CSS ([3cec71c](https://gitlab.com/gitlab-org/gitlab-ui/commit/3cec71c0d9d6c52a5b40160b12e539e1fda8b6eb))
7
+
8
+ ## [97.2.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v97.2.0...v97.2.1) (2024-10-18)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **GlProgressBar:** adds accessible name ([dad2627](https://gitlab.com/gitlab-org/gitlab-ui/commit/dad262736cf44b04ffd04ce731960c23b23d0dc1)), closes [/gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/4125#note_1878259355](https://gitlab.com//gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/4125/issues/note_1878259355)
14
+
1
15
  # [97.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v97.1.0...v97.2.0) (2024-10-17)
2
16
 
3
17
 
@@ -1,10 +1,22 @@
1
+ import { translate } from '../../../utils/i18n';
1
2
  import { progressBarVariantOptions } from '../../../utils/constants';
2
3
  import { toFloat } from '../../../utils/number_utils';
3
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
4
5
 
6
+ const backgroundClasses = {
7
+ [progressBarVariantOptions.primary]: 'gl-progress-bar-primary',
8
+ [progressBarVariantOptions.success]: 'gl-progress-bar-success',
9
+ [progressBarVariantOptions.danger]: 'gl-progress-bar-danger',
10
+ [progressBarVariantOptions.warning]: 'gl-progress-bar-warning'
11
+ };
5
12
  var script = {
6
13
  name: 'GlProgressBar',
7
14
  props: {
15
+ ariaLabel: {
16
+ type: String,
17
+ required: false,
18
+ default: translate('GlProgressBar.ariaLabel', 'Progress bar')
19
+ },
8
20
  value: {
9
21
  type: [Number, String],
10
22
  required: false,
@@ -46,7 +58,7 @@ var script = {
46
58
  };
47
59
  },
48
60
  classes() {
49
- return ['gl-progress', `bg-${this.variant}`];
61
+ return ['gl-progress', backgroundClasses[this.variant]];
50
62
  }
51
63
  }
52
64
  };
@@ -55,7 +67,7 @@ var script = {
55
67
  const __vue_script__ = script;
56
68
 
57
69
  /* template */
58
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-progress-bar progress",style:(_vm.progressHeight)},[_c('div',{class:_vm.classes,style:(_vm.progressBarStyles),attrs:{"role":"progressbar","aria-valuemin":"0","aria-valuemax":String(_vm.computedMax),"aria-valuenow":_vm.computedValue}})])};
70
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-progress-bar progress",style:(_vm.progressHeight)},[_c('div',{class:_vm.classes,style:(_vm.progressBarStyles),attrs:{"role":"progressbar","aria-label":_vm.ariaLabel,"aria-valuemin":"0","aria-valuemax":String(_vm.computedMax),"aria-valuenow":_vm.computedValue}})])};
59
71
  var __vue_staticRenderFns__ = [];
60
72
 
61
73
  /* style */