@gitlab/ui 131.2.0 → 131.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.
Files changed (42) hide show
  1. package/dist/components/base/form/form_checkbox/form_checkbox.js +1 -2
  2. package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -1
  3. package/dist/components/base/form/form_radio/form_radio.js +1 -1
  4. package/dist/components/base/form/form_radio_group/form_radio_group.js +1 -1
  5. package/dist/index.css +1 -1
  6. package/dist/index.css.map +1 -1
  7. package/dist/utils/equality_utils.js +84 -0
  8. package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +20 -5
  9. package/dist/vendor/bootstrap-vue/src/components/button/button.js +36 -8
  10. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +12 -4
  11. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +16 -5
  12. package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +99 -23
  13. package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +20 -5
  14. package/dist/vendor/bootstrap-vue/src/components/form/form.js +20 -5
  15. package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +5 -2
  16. package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +10 -3
  17. package/dist/vendor/bootstrap-vue/src/components/table/td.js +28 -7
  18. package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +5 -2
  19. package/dist/vendor/bootstrap-vue/src/components/table/thead.js +5 -2
  20. package/dist/vendor/bootstrap-vue/src/components/table/tr.js +5 -2
  21. package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +51 -12
  22. package/package.json +8 -8
  23. package/src/components/base/form/form_checkbox/form_checkbox.vue +1 -2
  24. package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -1
  25. package/src/components/base/form/form_radio/form_radio.vue +1 -1
  26. package/src/components/base/form/form_radio_group/form_radio_group.vue +1 -1
  27. package/src/components/base/table/table.scss +8 -0
  28. package/src/utils/equality_utils.js +82 -0
  29. package/src/vendor/bootstrap-vue/src/components/button/button-close.js +20 -5
  30. package/src/vendor/bootstrap-vue/src/components/button/button.js +36 -8
  31. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +12 -4
  32. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +16 -5
  33. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +99 -24
  34. package/src/vendor/bootstrap-vue/src/components/form/form-text.js +20 -5
  35. package/src/vendor/bootstrap-vue/src/components/form/form.js +20 -5
  36. package/src/vendor/bootstrap-vue/src/components/layout/form-row.js +5 -2
  37. package/src/vendor/bootstrap-vue/src/components/table/tbody.js +10 -3
  38. package/src/vendor/bootstrap-vue/src/components/table/td.js +28 -7
  39. package/src/vendor/bootstrap-vue/src/components/table/tfoot.js +5 -2
  40. package/src/vendor/bootstrap-vue/src/components/table/thead.js +5 -2
  41. package/src/vendor/bootstrap-vue/src/components/table/tr.js +5 -2
  42. package/src/vendor/bootstrap-vue/src/components/tabs/tab.js +51 -12
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Performs a deep, type-coercing equality check between two values.
3
+ *
4
+ * Unlike strict equality (`===`) or lodash's `isEqual`, this function:
5
+ * - Compares objects and arrays by structure, not reference
6
+ * - Coerces types before comparing primitives (e.g. `123` equals `'123'`)
7
+ * - Compares Date objects by timestamp
8
+ * - Compares File objects by inherited properties (name, size, type, lastModified)
9
+ *
10
+ * Used in form components (radio, checkbox) to detect meaningful value changes
11
+ * in watchers, avoiding redundant event emissions when values are loosely equivalent.
12
+ *
13
+ * @param {*} a - First value to compare
14
+ * @param {*} b - Second value to compare
15
+ * @returns {boolean} Whether the two values are loosely equal
16
+ */
17
+ function looseEqual(a, b) {
18
+ if (a === b) {
19
+ return true;
20
+ }
21
+ let aValidType = a instanceof Date;
22
+ let bValidType = b instanceof Date;
23
+ if (aValidType || bValidType) {
24
+ return aValidType && bValidType ? a.getTime() === b.getTime() : false;
25
+ }
26
+ aValidType = Array.isArray(a);
27
+ bValidType = Array.isArray(b);
28
+ if (aValidType || bValidType) {
29
+ if (!aValidType || !bValidType || a.length !== b.length) {
30
+ return false;
31
+ }
32
+ // Compare arrays element by element
33
+ // Uses a for loop to handle sparse arrays (array.every doesn't handle sparse)
34
+ let equal = true;
35
+ for (let i = 0; equal && i < a.length; i += 1) {
36
+ equal = looseEqual(a[i], b[i]);
37
+ }
38
+ return equal;
39
+ }
40
+ aValidType = a !== null && typeof a === 'object';
41
+ bValidType = b !== null && typeof b === 'object';
42
+ if (aValidType || bValidType) {
43
+ if (!aValidType || !bValidType) {
44
+ return false;
45
+ }
46
+ const aKeysCount = Object.keys(a).length;
47
+ const bKeysCount = Object.keys(b).length;
48
+ if (aKeysCount !== bKeysCount) {
49
+ return false;
50
+ }
51
+ // Intentionally iterates inherited properties to compare complex types
52
+ // like File objects where properties are on the prototype
53
+ // eslint-disable-next-line guard-for-in
54
+ for (const key in a) {
55
+ const aHasKey = Object.prototype.hasOwnProperty.call(a, key);
56
+ const bHasKey = Object.prototype.hasOwnProperty.call(b, key);
57
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
58
+ return false;
59
+ }
60
+ }
61
+ }
62
+ return String(a) === String(b);
63
+ }
64
+
65
+ /**
66
+ * Finds the first index in an array where the element is loosely equal to the given value.
67
+ *
68
+ * Works like `Array.prototype.indexOf`, but uses {@link looseEqual} for comparison
69
+ * instead of strict equality.
70
+ *
71
+ * @param {Array} array - The array to search
72
+ * @param {*} value - The value to find
73
+ * @returns {number} The index of the first loosely matching element, or -1 if not found
74
+ */
75
+ function looseIndexOf(array, value) {
76
+ for (let i = 0; i < array.length; i += 1) {
77
+ if (looseEqual(array[i], value)) {
78
+ return i;
79
+ }
80
+ }
81
+ return -1;
82
+ }
83
+
84
+ export { looseEqual, looseIndexOf };
@@ -4,16 +4,31 @@ import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
4
4
  import { SLOT_NAME_DEFAULT } from '../../constants/slots';
5
5
  import { stopEvent } from '../../utils/events';
6
6
  import { isEvent } from '../../utils/inspect';
7
- import { makeProp } from '../../utils/props';
8
7
  import { hasNormalizedSlot, normalizeSlot } from '../../utils/normalize-slot';
9
8
 
10
9
  // --- Props ---
11
10
 
12
11
  const props = {
13
- ariaLabel: makeProp(PROP_TYPE_STRING, 'Close'),
14
- content: makeProp(PROP_TYPE_STRING, '&times;'),
15
- disabled: makeProp(PROP_TYPE_BOOLEAN, false),
16
- textVariant: makeProp(PROP_TYPE_STRING)
12
+ ariaLabel: {
13
+ type: PROP_TYPE_STRING,
14
+ required: false,
15
+ default: 'Close'
16
+ },
17
+ content: {
18
+ type: PROP_TYPE_STRING,
19
+ required: false,
20
+ default: '&times;'
21
+ },
22
+ disabled: {
23
+ type: PROP_TYPE_BOOLEAN,
24
+ required: false,
25
+ default: false
26
+ },
27
+ textVariant: {
28
+ type: PROP_TYPE_STRING,
29
+ required: false,
30
+ default: undefined
31
+ }
17
32
  };
18
33
 
19
34
  // --- Main component ---
@@ -7,7 +7,7 @@ import { isTag, addClass, removeClass } from '../../utils/dom';
7
7
  import { stopEvent } from '../../utils/events';
8
8
  import { isBoolean, isEvent, isFunction } from '../../utils/inspect';
9
9
  import { omit, sortKeys } from '../../utils/object';
10
- import { makeProp, pluckProps } from '../../utils/props';
10
+ import { pluckProps } from '../../utils/props';
11
11
  import { isLink as isLink$1 } from '../../utils/router';
12
12
  import { props as props$1, BLink } from '../link/link';
13
13
 
@@ -18,15 +18,43 @@ delete linkProps.href.default;
18
18
  delete linkProps.to.default;
19
19
  const props = sortKeys({
20
20
  ...linkProps,
21
- block: makeProp(PROP_TYPE_BOOLEAN, false),
22
- disabled: makeProp(PROP_TYPE_BOOLEAN, false),
21
+ block: {
22
+ type: PROP_TYPE_BOOLEAN,
23
+ required: false,
24
+ default: false
25
+ },
26
+ disabled: {
27
+ type: PROP_TYPE_BOOLEAN,
28
+ required: false,
29
+ default: false
30
+ },
23
31
  // Tri-state: `true`, `false` or `null`
24
32
  // => On, off, not a toggle
25
- pressed: makeProp(PROP_TYPE_BOOLEAN, null),
26
- size: makeProp(PROP_TYPE_STRING),
27
- tag: makeProp(PROP_TYPE_STRING, 'button'),
28
- type: makeProp(PROP_TYPE_STRING, 'button'),
29
- variant: makeProp(PROP_TYPE_STRING, 'secondary')
33
+ pressed: {
34
+ type: PROP_TYPE_BOOLEAN,
35
+ required: false,
36
+ default: null
37
+ },
38
+ size: {
39
+ type: PROP_TYPE_STRING,
40
+ required: false,
41
+ default: undefined
42
+ },
43
+ tag: {
44
+ type: PROP_TYPE_STRING,
45
+ required: false,
46
+ default: 'button'
47
+ },
48
+ type: {
49
+ type: PROP_TYPE_STRING,
50
+ required: false,
51
+ default: 'button'
52
+ },
53
+ variant: {
54
+ type: PROP_TYPE_STRING,
55
+ required: false,
56
+ default: 'secondary'
57
+ }
30
58
  });
31
59
 
32
60
  // --- Helper methods ---
@@ -1,10 +1,10 @@
1
1
  import { extend } from '../../vue';
2
2
  import { NAME_DROPDOWN_ITEM } from '../../constants/components';
3
3
  import { EVENT_NAME_CLICK } from '../../constants/events';
4
- import { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../constants/props';
4
+ import { PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING } from '../../constants/props';
5
5
  import { requestAF } from '../../utils/dom';
6
6
  import { omit, sortKeys } from '../../utils/object';
7
- import { makeProp, pluckProps } from '../../utils/props';
7
+ import { pluckProps } from '../../utils/props';
8
8
  import { attrsMixin } from '../../mixins/attrs';
9
9
  import { normalizeSlotMixin } from '../../mixins/normalize-slot';
10
10
  import { props as props$1, BLink } from '../link/link';
@@ -14,8 +14,16 @@ import { props as props$1, BLink } from '../link/link';
14
14
  const linkProps = omit(props$1, ['event', 'routerTag']);
15
15
  const props = sortKeys({
16
16
  ...linkProps,
17
- linkClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
18
- variant: makeProp(PROP_TYPE_STRING)
17
+ linkClass: {
18
+ type: [PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING],
19
+ required: false,
20
+ default: undefined
21
+ },
22
+ variant: {
23
+ type: PROP_TYPE_STRING,
24
+ required: false,
25
+ default: undefined
26
+ }
19
27
  });
20
28
 
21
29
  // --- Main component ---
@@ -1,15 +1,26 @@
1
1
  import { extend, mergeData } from '../../vue';
2
2
  import { NAME_DROPDOWN_TEXT } from '../../constants/components';
3
- import { PROP_TYPE_STRING, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props';
3
+ import { PROP_TYPE_STRING, PROP_TYPE_ARRAY, PROP_TYPE_OBJECT } from '../../constants/props';
4
4
  import { omit } from '../../utils/object';
5
- import { makeProp } from '../../utils/props';
6
5
 
7
6
  // --- Props ---
8
7
 
9
8
  const props = {
10
- tag: makeProp(PROP_TYPE_STRING, 'p'),
11
- textClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
12
- variant: makeProp(PROP_TYPE_STRING)
9
+ tag: {
10
+ type: PROP_TYPE_STRING,
11
+ required: false,
12
+ default: 'p'
13
+ },
14
+ textClass: {
15
+ type: [PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING],
16
+ required: false,
17
+ default: undefined
18
+ },
19
+ variant: {
20
+ type: PROP_TYPE_STRING,
21
+ required: false,
22
+ default: undefined
23
+ }
13
24
  };
14
25
 
15
26
  // --- Main component ---
@@ -1,10 +1,9 @@
1
1
  import { extend } from '../../vue';
2
2
  import { NAME_DROPDOWN } from '../../constants/components';
3
- import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_OBJECT_STRING, PROP_TYPE_OBJECT } from '../../constants/props';
3
+ import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_ARRAY, PROP_TYPE_OBJECT } from '../../constants/props';
4
4
  import { SLOT_NAME_BUTTON_CONTENT, SLOT_NAME_DEFAULT } from '../../constants/slots';
5
5
  import { arrayIncludes } from '../../utils/array';
6
6
  import { htmlOrText } from '../../utils/html';
7
- import { makeProp } from '../../utils/props';
8
7
  import { toString } from '../../utils/string';
9
8
  import { props as props$2, dropdownMixin } from '../../mixins/dropdown';
10
9
  import { props as props$1, idMixin } from '../../mixins/id';
@@ -17,29 +16,106 @@ import { sortKeys } from '../../utils/object';
17
16
  const props = sortKeys({
18
17
  ...props$1,
19
18
  ...props$2,
20
- block: makeProp(PROP_TYPE_BOOLEAN, false),
21
- html: makeProp(PROP_TYPE_STRING),
19
+ block: {
20
+ type: PROP_TYPE_BOOLEAN,
21
+ required: false,
22
+ default: false
23
+ },
24
+ html: {
25
+ type: PROP_TYPE_STRING,
26
+ required: false,
27
+ default: undefined
28
+ },
22
29
  // If `true`, only render menu contents when open
23
- lazy: makeProp(PROP_TYPE_BOOLEAN, false),
24
- menuClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
25
- noCaret: makeProp(PROP_TYPE_BOOLEAN, false),
26
- role: makeProp(PROP_TYPE_STRING, 'menu'),
27
- size: makeProp(PROP_TYPE_STRING),
28
- split: makeProp(PROP_TYPE_BOOLEAN, false),
29
- splitButtonType: makeProp(PROP_TYPE_STRING, 'button', value => {
30
- return arrayIncludes(['button', 'submit', 'reset'], value);
31
- }),
32
- splitClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
33
- splitHref: makeProp(PROP_TYPE_STRING),
34
- splitTo: makeProp(PROP_TYPE_OBJECT_STRING),
35
- splitVariant: makeProp(PROP_TYPE_STRING),
36
- text: makeProp(PROP_TYPE_STRING),
37
- toggleAttrs: makeProp(PROP_TYPE_OBJECT, {}),
38
- toggleClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),
39
- toggleTag: makeProp(PROP_TYPE_STRING, 'button'),
30
+ lazy: {
31
+ type: PROP_TYPE_BOOLEAN,
32
+ required: false,
33
+ default: false
34
+ },
35
+ menuClass: {
36
+ type: [PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING],
37
+ required: false,
38
+ default: undefined
39
+ },
40
+ noCaret: {
41
+ type: PROP_TYPE_BOOLEAN,
42
+ required: false,
43
+ default: false
44
+ },
45
+ role: {
46
+ type: PROP_TYPE_STRING,
47
+ required: false,
48
+ default: 'menu'
49
+ },
50
+ size: {
51
+ type: PROP_TYPE_STRING,
52
+ required: false,
53
+ default: undefined
54
+ },
55
+ split: {
56
+ type: PROP_TYPE_BOOLEAN,
57
+ required: false,
58
+ default: false
59
+ },
60
+ splitButtonType: {
61
+ type: PROP_TYPE_STRING,
62
+ required: false,
63
+ default: 'button',
64
+ validator: value => {
65
+ return arrayIncludes(['button', 'submit', 'reset'], value);
66
+ }
67
+ },
68
+ splitClass: {
69
+ type: [PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING],
70
+ required: false,
71
+ default: undefined
72
+ },
73
+ splitHref: {
74
+ type: PROP_TYPE_STRING,
75
+ required: false,
76
+ default: undefined
77
+ },
78
+ splitTo: {
79
+ type: [PROP_TYPE_OBJECT, PROP_TYPE_STRING],
80
+ required: false,
81
+ default: undefined
82
+ },
83
+ splitVariant: {
84
+ type: PROP_TYPE_STRING,
85
+ required: false,
86
+ default: undefined
87
+ },
88
+ text: {
89
+ type: PROP_TYPE_STRING,
90
+ required: false,
91
+ default: undefined
92
+ },
93
+ toggleAttrs: {
94
+ type: PROP_TYPE_OBJECT,
95
+ required: false,
96
+ default: () => ({})
97
+ },
98
+ toggleClass: {
99
+ type: [PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING],
100
+ required: false,
101
+ default: undefined
102
+ },
103
+ toggleTag: {
104
+ type: PROP_TYPE_STRING,
105
+ required: false,
106
+ default: 'button'
107
+ },
40
108
  // TODO: This really should be `toggleLabel`
41
- toggleText: makeProp(PROP_TYPE_STRING, 'Toggle dropdown'),
42
- variant: makeProp(PROP_TYPE_STRING, 'secondary')
109
+ toggleText: {
110
+ type: PROP_TYPE_STRING,
111
+ required: false,
112
+ default: 'Toggle dropdown'
113
+ },
114
+ variant: {
115
+ type: PROP_TYPE_STRING,
116
+ required: false,
117
+ default: 'secondary'
118
+ }
43
119
  });
44
120
 
45
121
  // --- Main component ---
@@ -1,15 +1,30 @@
1
1
  import { extend, mergeData } from '../../vue';
2
2
  import { NAME_FORM_TEXT } from '../../constants/components';
3
3
  import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
4
- import { makeProp } from '../../utils/props';
5
4
 
6
5
  // --- Props ---
7
6
 
8
7
  const props = {
9
- id: makeProp(PROP_TYPE_STRING),
10
- inline: makeProp(PROP_TYPE_BOOLEAN, false),
11
- tag: makeProp(PROP_TYPE_STRING, 'small'),
12
- textVariant: makeProp(PROP_TYPE_STRING, 'muted')
8
+ id: {
9
+ type: PROP_TYPE_STRING,
10
+ required: false,
11
+ default: undefined
12
+ },
13
+ inline: {
14
+ type: PROP_TYPE_BOOLEAN,
15
+ required: false,
16
+ default: false
17
+ },
18
+ tag: {
19
+ type: PROP_TYPE_STRING,
20
+ required: false,
21
+ default: 'small'
22
+ },
23
+ textVariant: {
24
+ type: PROP_TYPE_STRING,
25
+ required: false,
26
+ default: 'muted'
27
+ }
13
28
  };
14
29
 
15
30
  // --- Main component ---
@@ -1,15 +1,30 @@
1
1
  import { extend, mergeData } from '../../vue';
2
2
  import { NAME_FORM } from '../../constants/components';
3
3
  import { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
4
- import { makeProp } from '../../utils/props';
5
4
 
6
5
  // --- Props ---
7
6
 
8
7
  const props = {
9
- id: makeProp(PROP_TYPE_STRING),
10
- inline: makeProp(PROP_TYPE_BOOLEAN, false),
11
- novalidate: makeProp(PROP_TYPE_BOOLEAN, false),
12
- validated: makeProp(PROP_TYPE_BOOLEAN, false)
8
+ id: {
9
+ type: PROP_TYPE_STRING,
10
+ required: false,
11
+ default: undefined
12
+ },
13
+ inline: {
14
+ type: PROP_TYPE_BOOLEAN,
15
+ required: false,
16
+ default: false
17
+ },
18
+ novalidate: {
19
+ type: PROP_TYPE_BOOLEAN,
20
+ required: false,
21
+ default: false
22
+ },
23
+ validated: {
24
+ type: PROP_TYPE_BOOLEAN,
25
+ required: false,
26
+ default: false
27
+ }
13
28
  };
14
29
 
15
30
  // --- Main component ---
@@ -1,12 +1,15 @@
1
1
  import { extend, mergeData } from '../../vue';
2
2
  import { NAME_FORM_ROW } from '../../constants/components';
3
3
  import { PROP_TYPE_STRING } from '../../constants/props';
4
- import { makeProp } from '../../utils/props';
5
4
 
6
5
  // --- Props ---
7
6
 
8
7
  const props = {
9
- tag: makeProp(PROP_TYPE_STRING, 'div')
8
+ tag: {
9
+ type: PROP_TYPE_STRING,
10
+ required: false,
11
+ default: 'div'
12
+ }
10
13
  };
11
14
 
12
15
  // --- Main component ---
@@ -1,7 +1,6 @@
1
1
  import { extend } from '../../vue';
2
2
  import { NAME_TBODY } from '../../constants/components';
3
3
  import { PROP_TYPE_OBJECT } from '../../constants/props';
4
- import { makeProp } from '../../utils/props';
5
4
  import { attrsMixin } from '../../mixins/attrs';
6
5
  import { listenersMixin } from '../../mixins/listeners';
7
6
  import { normalizeSlotMixin } from '../../mixins/normalize-slot';
@@ -9,8 +8,16 @@ import { normalizeSlotMixin } from '../../mixins/normalize-slot';
9
8
  // --- Props ---
10
9
 
11
10
  const props = {
12
- tbodyTransitionHandlers: makeProp(PROP_TYPE_OBJECT),
13
- tbodyTransitionProps: makeProp(PROP_TYPE_OBJECT)
11
+ tbodyTransitionHandlers: {
12
+ type: PROP_TYPE_OBJECT,
13
+ required: false,
14
+ default: undefined
15
+ },
16
+ tbodyTransitionProps: {
17
+ type: PROP_TYPE_OBJECT,
18
+ required: false,
19
+ default: undefined
20
+ }
14
21
  };
15
22
 
16
23
  // --- Main component ---
@@ -1,10 +1,9 @@
1
1
  import { extend } from '../../vue';
2
2
  import { NAME_TABLE_CELL } from '../../constants/components';
3
- import { PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
3
+ import { PROP_TYPE_NUMBER, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';
4
4
  import { isTag } from '../../utils/dom';
5
5
  import { isUndefinedOrNull } from '../../utils/inspect';
6
6
  import { toInteger } from '../../utils/number';
7
- import { makeProp } from '../../utils/props';
8
7
  import { toString } from '../../utils/string';
9
8
  import { attrsMixin } from '../../mixins/attrs';
10
9
  import { listenersMixin } from '../../mixins/listeners';
@@ -24,11 +23,33 @@ const spanValidator = value => isUndefinedOrNull(value) || parseSpan(value) > 0;
24
23
  // --- Props ---
25
24
 
26
25
  const props = {
27
- colspan: makeProp(PROP_TYPE_NUMBER_STRING, null, spanValidator),
28
- rowspan: makeProp(PROP_TYPE_NUMBER_STRING, null, spanValidator),
29
- stackedHeading: makeProp(PROP_TYPE_STRING),
30
- stickyColumn: makeProp(PROP_TYPE_BOOLEAN, false),
31
- variant: makeProp(PROP_TYPE_STRING)
26
+ colspan: {
27
+ type: [PROP_TYPE_NUMBER, PROP_TYPE_STRING],
28
+ required: false,
29
+ default: null,
30
+ validator: spanValidator
31
+ },
32
+ rowspan: {
33
+ type: [PROP_TYPE_NUMBER, PROP_TYPE_STRING],
34
+ required: false,
35
+ default: null,
36
+ validator: spanValidator
37
+ },
38
+ stackedHeading: {
39
+ type: PROP_TYPE_STRING,
40
+ required: false,
41
+ default: undefined
42
+ },
43
+ stickyColumn: {
44
+ type: PROP_TYPE_BOOLEAN,
45
+ required: false,
46
+ default: false
47
+ },
48
+ variant: {
49
+ type: PROP_TYPE_STRING,
50
+ required: false,
51
+ default: undefined
52
+ }
32
53
  };
33
54
 
34
55
  // --- Main component ---
@@ -1,7 +1,6 @@
1
1
  import { extend } from '../../vue';
2
2
  import { NAME_TFOOT } from '../../constants/components';
3
3
  import { PROP_TYPE_STRING } from '../../constants/props';
4
- import { makeProp } from '../../utils/props';
5
4
  import { attrsMixin } from '../../mixins/attrs';
6
5
  import { listenersMixin } from '../../mixins/listeners';
7
6
  import { normalizeSlotMixin } from '../../mixins/normalize-slot';
@@ -10,7 +9,11 @@ import { normalizeSlotMixin } from '../../mixins/normalize-slot';
10
9
 
11
10
  const props = {
12
11
  // Supported values: 'lite', 'dark', or null
13
- footVariant: makeProp(PROP_TYPE_STRING)
12
+ footVariant: {
13
+ type: PROP_TYPE_STRING,
14
+ required: false,
15
+ default: undefined
16
+ }
14
17
  };
15
18
 
16
19
  // --- Main component ---
@@ -1,7 +1,6 @@
1
1
  import { extend } from '../../vue';
2
2
  import { NAME_THEAD } from '../../constants/components';
3
3
  import { PROP_TYPE_STRING } from '../../constants/props';
4
- import { makeProp } from '../../utils/props';
5
4
  import { attrsMixin } from '../../mixins/attrs';
6
5
  import { listenersMixin } from '../../mixins/listeners';
7
6
  import { normalizeSlotMixin } from '../../mixins/normalize-slot';
@@ -11,7 +10,11 @@ import { normalizeSlotMixin } from '../../mixins/normalize-slot';
11
10
  const props = {
12
11
  // Also sniffed by `<b-tr>` / `<b-td>` / `<b-th>`
13
12
  // Supported values: 'lite', 'dark', or `null`
14
- headVariant: makeProp(PROP_TYPE_STRING)
13
+ headVariant: {
14
+ type: PROP_TYPE_STRING,
15
+ required: false,
16
+ default: undefined
17
+ }
15
18
  };
16
19
 
17
20
  // --- Main component ---
@@ -1,7 +1,6 @@
1
1
  import { extend } from '../../vue';
2
2
  import { NAME_TR } from '../../constants/components';
3
3
  import { PROP_TYPE_STRING } from '../../constants/props';
4
- import { makeProp } from '../../utils/props';
5
4
  import { attrsMixin } from '../../mixins/attrs';
6
5
  import { listenersMixin } from '../../mixins/listeners';
7
6
  import { normalizeSlotMixin } from '../../mixins/normalize-slot';
@@ -14,7 +13,11 @@ const DARK = 'dark';
14
13
  // --- Props ---
15
14
 
16
15
  const props = {
17
- variant: makeProp(PROP_TYPE_STRING)
16
+ variant: {
17
+ type: PROP_TYPE_STRING,
18
+ required: false,
19
+ default: undefined
20
+ }
18
21
  };
19
22
 
20
23
  // --- Main component ---