@gitlab/ui 70.0.1 → 71.1.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,23 @@
1
+ # [71.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v71.0.0...v71.1.0) (2023-11-24)
2
+
3
+
4
+ ### Features
5
+
6
+ * **css:** Add gl-line-clamp-{value} utility class ([304a508](https://gitlab.com/gitlab-org/gitlab-ui/commit/304a508af5933ebe33de9f30f7e0aca4c871654a))
7
+
8
+ # [71.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v70.0.1...v71.0.0) (2023-11-22)
9
+
10
+
11
+ ### Features
12
+
13
+ * **GlFormInput, GlFormSelect, GlDatepicker:** remove deprecated props ([72ff245](https://gitlab.com/gitlab-org/gitlab-ui/commit/72ff245417250b78514b60fb0a85fbde64a5d7c7))
14
+
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ * **GlFormInput, GlFormSelect, GlDatepicker:** Removes the legacy property "size" from GlFormInput,
19
+ GlFormSelect & GlDatepicker.
20
+
1
21
  ## [70.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v70.0.0...v70.0.1) (2023-11-21)
2
22
 
3
23
 
@@ -1,6 +1,6 @@
1
1
  import isString from 'lodash/isString';
2
2
  import Pikaday from 'pikaday';
3
- import { defaultDateFormat, datepickerWidthOptionsMap, datepickerSizeOptionsMap } from '../../../utils/constants';
3
+ import { defaultDateFormat, datepickerWidthOptionsMap } from '../../../utils/constants';
4
4
  import { areDatesEqual } from '../../../utils/datetime_utility';
5
5
  import GlButton from '../button/button';
6
6
  import GlFormInput from '../form/form_input/form_input';
@@ -181,20 +181,6 @@ var script = {
181
181
  required: false,
182
182
  default: null,
183
183
  validator: value => Object.keys(datepickerWidthOptionsMap).includes(value)
184
- },
185
- /**
186
- * ⚠️ DEPRECATED:
187
- *
188
- * Will be replaced by the
189
- * property width
190
- *
191
- * Maximum width of the Datepicker
192
- */
193
- size: {
194
- type: String,
195
- required: false,
196
- default: null,
197
- validator: value => Object.keys(datepickerSizeOptionsMap).includes(value)
198
184
  }
199
185
  },
200
186
  data() {
@@ -233,9 +219,6 @@ var script = {
233
219
  computedWidth() {
234
220
  if (this.width) {
235
221
  return this.width;
236
- // eslint-disable-next-line no-else-return
237
- } else if (this.size) {
238
- return datepickerSizeOptionsMap[this.size];
239
222
  }
240
223
  return 'md';
241
224
  }
@@ -1,6 +1,6 @@
1
1
  import isObject from 'lodash/isObject';
2
2
  import { BFormInput } from 'bootstrap-vue/esm/index.js';
3
- import { formInputSizes } from '../../../../utils/constants';
3
+ import { formInputWidths } from '../../../../utils/constants';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
6
  const MODEL_PROP = 'value';
@@ -25,46 +25,26 @@ var script = {
25
25
  default: null,
26
26
  validator: value => {
27
27
  const widths = isObject(value) ? Object.values(value) : [value];
28
- return widths.every(width => Object.values(formInputSizes).includes(width));
29
- }
30
- },
31
- /**
32
- * ⚠️ DEPRECATED:
33
- *
34
- * Will be replaced by the
35
- * property width
36
- *
37
- * Maximum width of the input
38
- */
39
- size: {
40
- type: [String, Object],
41
- required: false,
42
- default: null,
43
- validator: value => {
44
- const sizes = isObject(value) ? Object.values(value) : [value];
45
- return sizes.every(size => Object.values(formInputSizes).includes(size));
28
+ return widths.every(width => Object.values(formInputWidths).includes(width));
46
29
  }
47
30
  }
48
31
  },
49
32
  computed: {
50
- computedWidth() {
51
- return this.width ? this.width : this.size;
52
- },
53
33
  cssClasses() {
54
- if (this.computedWidth === null) {
34
+ if (this.width === null) {
55
35
  return [];
56
36
  }
57
- if (isObject(this.computedWidth)) {
37
+ if (isObject(this.width)) {
58
38
  const {
59
- default: defaultSize,
60
- ...nonDefaultSizes
61
- } = this.computedWidth;
62
- return [...(defaultSize ? [`gl-form-input-${defaultSize}`] : []), ...Object.entries(nonDefaultSizes).map(_ref => {
63
- let [breakpoint, size] = _ref;
64
- return `gl-${breakpoint}-form-input-${size}`;
39
+ default: defaultWidth,
40
+ ...nonDefaultWidths
41
+ } = this.width;
42
+ return [...(defaultWidth ? [`gl-form-input-${defaultWidth}`] : []), ...Object.entries(nonDefaultWidths).map(_ref => {
43
+ let [breakpoint, width] = _ref;
44
+ return `gl-${breakpoint}-form-input-${width}`;
65
45
  })];
66
46
  }
67
- return [`gl-form-input-${this.computedWidth}`];
47
+ return [`gl-form-input-${this.width}`];
68
48
  },
69
49
  listeners() {
70
50
  var _this = this;
@@ -1,6 +1,6 @@
1
1
  import { BFormSelect } from 'bootstrap-vue/esm/index.js';
2
2
  import isObject from 'lodash/isObject';
3
- import { formInputSizes } from '../../../../utils/constants';
3
+ import { formInputWidths } from '../../../../utils/constants';
4
4
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
5
5
 
6
6
  var script = {
@@ -19,46 +19,26 @@ var script = {
19
19
  default: null,
20
20
  validator: value => {
21
21
  const widths = isObject(value) ? Object.values(value) : [value];
22
- return widths.every(width => Object.values(formInputSizes).includes(width));
23
- }
24
- },
25
- /**
26
- * ⚠️ DEPRECATED:
27
- *
28
- * Will be replaced by the
29
- * property width
30
- *
31
- * Maximum width of the Select
32
- */
33
- size: {
34
- type: [String, Object],
35
- required: false,
36
- default: null,
37
- validator: value => {
38
- const sizes = isObject(value) ? Object.values(value) : [value];
39
- return sizes.every(size => Object.values(formInputSizes).includes(size));
22
+ return widths.every(width => Object.values(formInputWidths).includes(width));
40
23
  }
41
24
  }
42
25
  },
43
26
  computed: {
44
- computedWidth() {
45
- return this.width ? this.width : this.size;
46
- },
47
27
  cssClasses() {
48
- if (this.computedWidth === null) {
28
+ if (this.width === null) {
49
29
  return [];
50
30
  }
51
- if (isObject(this.computedWidth)) {
31
+ if (isObject(this.width)) {
52
32
  const {
53
- default: defaultSize,
54
- ...nonDefaultSizes
55
- } = this.computedWidth;
56
- return [...(defaultSize ? [`gl-form-select-${defaultSize}`] : []), ...Object.entries(nonDefaultSizes).map(_ref => {
57
- let [breakpoint, size] = _ref;
58
- return `gl-${breakpoint}-form-select-${size}`;
33
+ default: defaultWidth,
34
+ ...nonDefaultWidths
35
+ } = this.width;
36
+ return [...(defaultWidth ? [`gl-form-select-${defaultWidth}`] : []), ...Object.entries(nonDefaultWidths).map(_ref => {
37
+ let [breakpoint, width] = _ref;
38
+ return `gl-${breakpoint}-form-select-${width}`;
59
39
  })];
60
40
  }
61
- return [`gl-form-select-${this.computedWidth}`];
41
+ return [`gl-form-select-${this.width}`];
62
42
  }
63
43
  }
64
44
  };