@gitlab/ui 38.12.0 → 39.2.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,33 @@
1
+ # [39.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v39.1.0...v39.2.0) (2022-04-25)
2
+
3
+
4
+ ### Features
5
+
6
+ * **GlAlert:** Add support for hiding variant icon ([2c5f3a6](https://gitlab.com/gitlab-org/gitlab-ui/commit/2c5f3a67babfc3ddd6f1b5940e11154fdef5902d))
7
+
8
+ # [39.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v39.0.0...v39.1.0) (2022-04-22)
9
+
10
+
11
+ ### Features
12
+
13
+ * **GlTable:** Add vertical-align: top to table th and td ([4dc5c31](https://gitlab.com/gitlab-org/gitlab-ui/commit/4dc5c318a9c6693e393dce6d12073ad296db928e)), closes [/gitlab.com/gitlab-org/gitlab-ui/-/issues/1759#note_900275198](https://gitlab.com//gitlab.com/gitlab-org/gitlab-ui/-/issues/1759/issues/note_900275198)
14
+ * **GlTable:** Update text color and borders ([1379638](https://gitlab.com/gitlab-org/gitlab-ui/commit/137963838f99427ddb271bd7e4204a92dd438fae))
15
+
16
+ # [39.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v38.12.0...v39.0.0) (2022-04-21)
17
+
18
+
19
+ ### Reverts
20
+
21
+ * add character counter to gl-form-textarea ([70a7a3f](https://gitlab.com/gitlab-org/gitlab-ui/commit/70a7a3fd9c2729b739020d167043490da72a556b))
22
+
23
+
24
+ ### BREAKING CHANGES
25
+
26
+ * The feature added in
27
+ https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2738 has been
28
+ removed, as it causes complications regarding a validator used in
29
+ GitLab. This feature will be reconsidered and re-implemented later.
30
+
1
31
  # [38.12.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v38.11.0...v38.12.0) (2022-04-21)
2
32
 
3
33
 
@@ -26,6 +26,15 @@ var script = {
26
26
  default: true
27
27
  },
28
28
 
29
+ /**
30
+ * Shows icon based on variant.
31
+ */
32
+ showIcon: {
33
+ type: Boolean,
34
+ required: false,
35
+ default: true
36
+ },
37
+
29
38
  /**
30
39
  * Dismiss button's aria-label.
31
40
  */
@@ -175,7 +184,8 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
175
184
  'gl-alert',
176
185
  { 'gl-alert-sticky': _vm.sticky },
177
186
  { 'gl-alert-not-dismissible': !_vm.dismissible },
178
- _vm.variantClass ]},[_c('gl-icon',{class:{ 'gl-alert-icon': true, 'gl-alert-icon-no-title': !_vm.title },attrs:{"name":_vm.iconName}}),_vm._v(" "),_c('div',{staticClass:"gl-alert-content",attrs:{"role":"alert"}},[(_vm.title)?_c('h4',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",_vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])}))],2):_vm._e()]),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
187
+ { 'gl-alert-no-icon': !_vm.showIcon },
188
+ _vm.variantClass ]},[(_vm.showIcon)?_c('gl-icon',{class:{ 'gl-alert-icon': true, 'gl-alert-icon-no-title': !_vm.title },attrs:{"name":_vm.iconName}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-content",attrs:{"role":"alert"}},[(_vm.title)?_c('h4',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",_vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])}))],2):_vm._e()]),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
179
189
  var __vue_staticRenderFns__ = [];
180
190
 
181
191
  /* style */
@@ -1,6 +1,4 @@
1
1
  import { BFormTextarea } from 'bootstrap-vue/esm/index.js';
2
- import GlSprintf from '../../../utilities/sprintf/sprintf';
3
- import { textareaCountOptions } from '../../../../utils/constants';
4
2
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
3
 
6
4
  const model = {
@@ -9,8 +7,7 @@ const model = {
9
7
  };
10
8
  var script = {
11
9
  components: {
12
- BFormTextarea,
13
- GlSprintf
10
+ BFormTextarea
14
11
  },
15
12
  inheritAttrs: false,
16
13
  model,
@@ -31,27 +28,6 @@ var script = {
31
28
  type: Boolean,
32
29
  required: false,
33
30
  default: false
34
- },
35
- count: {
36
- type: Number,
37
- required: false,
38
- default: 0
39
- },
40
- countType: {
41
- required: false,
42
- type: String,
43
- default: textareaCountOptions.max,
44
- validator: value => Object.keys(textareaCountOptions).includes(value)
45
- },
46
- characterCountText: {
47
- required: false,
48
- type: String,
49
- default: ''
50
- },
51
- characterCountOverLimitText: {
52
- required: false,
53
- type: String,
54
- default: ''
55
31
  }
56
32
  },
57
33
  computed: {
@@ -88,42 +64,6 @@ var script = {
88
64
 
89
65
  keypressEvent() {
90
66
  return this.submitOnEnter ? 'keyup' : null;
91
- },
92
-
93
- characters() {
94
- return this.value.length;
95
- },
96
-
97
- remainingCharacters() {
98
- if (this.count) {
99
- return Math.abs(this.count - this.characters);
100
- }
101
-
102
- return null;
103
- },
104
-
105
- characterCountClasses() {
106
- switch (this.countType) {
107
- case textareaCountOptions.max:
108
- return {
109
- 'gl-text-red-500': this.value.length > this.count,
110
- 'gl-text-gray-500': this.value.length <= this.count
111
- };
112
-
113
- case textareaCountOptions.recommended:
114
- return 'gl-text-gray-500';
115
-
116
- default:
117
- return {};
118
- }
119
- },
120
-
121
- hasCount() {
122
- return this.remainingCharacters != null;
123
- },
124
-
125
- characterCountMessage() {
126
- return this.characters > this.count ? this.characterCountOverLimitText : this.characterCountText;
127
67
  }
128
68
 
129
69
  },
@@ -141,7 +81,7 @@ var script = {
141
81
  const __vue_script__ = script;
142
82
 
143
83
  /* template */
144
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-form-textarea',_vm._g(_vm._b({ref:"textarea",staticClass:"gl-form-input gl-form-textarea",attrs:{"no-resize":_vm.noResize,"value":_vm.value},nativeOn:_vm._d({},[_vm.keypressEvent,function($event){return _vm.handleKeyPress($event)}])},'b-form-textarea',_vm.$attrs,false),_vm.listeners)),_vm._v(" "),(_vm.hasCount)?_c('div',[_c('small',{class:_vm.characterCountClasses,attrs:{"aria-live":"polite"}},[_c('gl-sprintf',{attrs:{"message":_vm.characterCountMessage},scopedSlots:_vm._u([{key:"count",fn:function(){return [_vm._v(_vm._s(_vm.remainingCharacters))]},proxy:true}],null,false,2559963941)})],1)]):_vm._e()],1)};
84
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-textarea',_vm._g(_vm._b({staticClass:"gl-form-input gl-form-textarea",attrs:{"no-resize":_vm.noResize,"value":_vm.value},nativeOn:_vm._d({},[_vm.keypressEvent,function($event){return _vm.handleKeyPress($event)}])},'b-form-textarea',_vm.$attrs,false),_vm.listeners))};
145
85
  var __vue_staticRenderFns__ = [];
146
86
 
147
87
  /* style */