@gitlab/ui 79.4.1 → 80.0.1
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 +23 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +3 -1
- package/dist/components/base/new_dropdowns/disclosure/utils.js +22 -9
- package/dist/tokens/css/tokens.css +2 -2
- package/dist/tokens/css/tokens.dark.css +2 -2
- package/dist/tokens/js/tokens.dark.js +2 -2
- package/dist/tokens/js/tokens.js +2 -2
- package/dist/tokens/json/tokens.dark.json +2 -2
- package/dist/tokens/json/tokens.json +2 -2
- package/dist/tokens/scss/_tokens.dark.scss +2 -2
- package/dist/tokens/scss/_tokens.scss +2 -2
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +3 -3
- package/src/components/base/form/form_select/form_select.stories.js +26 -16
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.stories.js +1 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.vue +5 -1
- package/src/components/base/new_dropdowns/disclosure/utils.js +30 -6
- package/src/components/base/table/table.md +3 -3
- package/src/components/base/table/table.stories.js +3 -3
- package/src/components/base/table_lite/table_lite.md +3 -3
- package/src/components/base/table_lite/table_lite.stories.js +2 -2
- package/src/components/charts/stacked_column/stacked_column.md +1 -1
- package/src/scss/utilities.scss +0 -30
- package/src/scss/utility-mixins/spacing.scss +0 -18
- package/src/tokens/text.dark.tokens.json +1 -1
- package/src/tokens/text.tokens.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## [80.0.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v80.0.0...v80.0.1) (2024-05-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **Dropdown:** Fix disclosure dropdown a11y issues ([34d2c4d](https://gitlab.com/gitlab-org/gitlab-ui/commit/34d2c4d496f66c2c9e9129793e6a0c4189d77ec9))
|
|
7
|
+
|
|
8
|
+
# [80.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v79.4.1...v80.0.0) (2024-05-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **CSS:** remove `gl-gap-x/y-*` CSS utility classes ([1ad137a](https://gitlab.com/gitlab-org/gitlab-ui/commit/1ad137a008249acc4983c133e8d3d5136f9b9288))
|
|
14
|
+
* **DesignTokens:** Update to use default for deprecated text.primary ([24c8e3b](https://gitlab.com/gitlab-org/gitlab-ui/commit/24c8e3b8e2f0c753cedf8b37070c8145f8acc37f))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* **CSS:** these utility classes were using margin to adjust
|
|
20
|
+
spacing and were causing a conflict with Tailwind utility classes.
|
|
21
|
+
Usage of these utilities should be migrated to Tailwind `gap`
|
|
22
|
+
utilities.
|
|
23
|
+
|
|
1
24
|
## [79.4.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v79.4.0...v79.4.1) (2024-04-25)
|
|
2
25
|
|
|
3
26
|
|
|
@@ -218,7 +218,9 @@ var script = {
|
|
|
218
218
|
computed: {
|
|
219
219
|
disclosureTag() {
|
|
220
220
|
var _this$items;
|
|
221
|
-
if ((_this$items = this.items) !== null && _this$items !== void 0 && _this$items.length ||
|
|
221
|
+
if ((_this$items = this.items) !== null && _this$items !== void 0 && _this$items.length ||
|
|
222
|
+
// eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots
|
|
223
|
+
hasOnlyListItems(this.$scopedSlots.default || this.$slots.default)) {
|
|
222
224
|
return 'ul';
|
|
223
225
|
}
|
|
224
226
|
return 'div';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
1
2
|
import isFunction from 'lodash/isFunction';
|
|
3
|
+
import isString from 'lodash/isString';
|
|
2
4
|
import { DISCLOSURE_DROPDOWN_ITEM_NAME, DISCLOSURE_DROPDOWN_GROUP_NAME } from './constants';
|
|
3
5
|
|
|
4
6
|
const itemValidator = item => {
|
|
@@ -17,23 +19,34 @@ const isValidSlotTagVue2 = vNode => {
|
|
|
17
19
|
var _vNode$componentOptio;
|
|
18
20
|
return Boolean(vNode) && isListItem(((_vNode$componentOptio = vNode.componentOptions) === null || _vNode$componentOptio === void 0 ? void 0 : _vNode$componentOptio.tag) || vNode.tag);
|
|
19
21
|
};
|
|
20
|
-
const
|
|
22
|
+
const isValidSlotTagVue3 = vNode => {
|
|
21
23
|
var _vNode$type;
|
|
22
24
|
return [DISCLOSURE_DROPDOWN_ITEM_NAME, DISCLOSURE_DROPDOWN_GROUP_NAME].includes((_vNode$type = vNode.type) === null || _vNode$type === void 0 ? void 0 : _vNode$type.name) || vNode.type === 'li';
|
|
23
25
|
};
|
|
24
|
-
const
|
|
25
|
-
let {
|
|
26
|
-
default: defaultSlot
|
|
27
|
-
} = _ref;
|
|
28
|
-
if (!isFunction(defaultSlot)) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
26
|
+
const hasOnlyListItemsVue2 = defaultSlot => {
|
|
31
27
|
const nodes = defaultSlot();
|
|
32
28
|
if (!Array.isArray(nodes)) {
|
|
33
29
|
return false;
|
|
34
30
|
}
|
|
35
31
|
const tags = nodes.filter(vNode => vNode.tag);
|
|
36
|
-
return tags.length && tags.every(tag =>
|
|
32
|
+
return tags.length && tags.every(tag => isValidSlotTagVue2(tag));
|
|
33
|
+
};
|
|
34
|
+
const hasOnlyListItemsVue3 = defaultSlot => {
|
|
35
|
+
const nodes = defaultSlot();
|
|
36
|
+
const fragment = nodes.find(node => Array.isArray(node.children) && node.children.length);
|
|
37
|
+
const targetNodes = fragment ? fragment.children : nodes;
|
|
38
|
+
return targetNodes
|
|
39
|
+
// Remove empty text vNodes
|
|
40
|
+
.filter(vNode => !isString(vNode.text) || vNode.text.trim().length > 0).every(vNode => isValidSlotTagVue3(vNode));
|
|
41
|
+
};
|
|
42
|
+
const hasOnlyListItems = defaultSlot => {
|
|
43
|
+
if (!isFunction(defaultSlot)) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (Vue.version.startsWith('3')) {
|
|
47
|
+
return hasOnlyListItemsVue3(defaultSlot);
|
|
48
|
+
}
|
|
49
|
+
return hasOnlyListItemsVue2(defaultSlot);
|
|
37
50
|
};
|
|
38
51
|
|
|
39
52
|
export { hasOnlyListItems, isGroup, isItem, itemsValidator };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Thu,
|
|
3
|
+
* Generated on Thu, 02 May 2024 10:07:41 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--gl-text-color-default: #434248; /* Used for the default text color. */
|
|
15
15
|
--gl-text-tertiary: #89888d; /* Use text.color.disabled instead */
|
|
16
16
|
--gl-text-secondary: #737278; /* Use text.color.subtle instead */
|
|
17
|
-
--gl-text-primary: #333238; /* Use text.color.
|
|
17
|
+
--gl-text-primary: #333238; /* Use text.color.default instead */
|
|
18
18
|
--gl-line-height-52: 3.25rem;
|
|
19
19
|
--gl-line-height-44: 2.75rem;
|
|
20
20
|
--gl-line-height-42: 2.625rem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Thu,
|
|
3
|
+
* Generated on Thu, 02 May 2024 10:07:41 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root.gl-dark {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--gl-text-color-default: #ececef; /* Used for the default text color. */
|
|
13
13
|
--gl-text-tertiary: #737278; /* Use text.color.disabled instead */
|
|
14
14
|
--gl-text-secondary: #89888d; /* Use text.color.subtle instead */
|
|
15
|
-
--gl-text-primary: #ececef; /* Use text.color.
|
|
15
|
+
--gl-text-primary: #ececef; /* Use text.color.default instead */
|
|
16
16
|
--red-950: #fff4f3;
|
|
17
17
|
--red-900: #fcf1ef;
|
|
18
18
|
--red-800: #fdd4cd;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Thu,
|
|
3
|
+
* Generated on Thu, 02 May 2024 10:07:41 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export const DATA_VIZ_GREEN_50 = "#133a03";
|
|
@@ -199,7 +199,7 @@ export const RED_700 = "#fcb5aa";
|
|
|
199
199
|
export const RED_800 = "#fdd4cd";
|
|
200
200
|
export const RED_900 = "#fcf1ef";
|
|
201
201
|
export const RED_950 = "#fff4f3";
|
|
202
|
-
export const GL_TEXT_PRIMARY = "#ececef"; // Use text.color.
|
|
202
|
+
export const GL_TEXT_PRIMARY = "#ececef"; // Use text.color.default instead
|
|
203
203
|
export const GL_TEXT_SECONDARY = "#89888d"; // Use text.color.subtle instead
|
|
204
204
|
export const GL_TEXT_TERTIARY = "#737278"; // Use text.color.disabled instead
|
|
205
205
|
export const GL_TEXT_COLOR_DEFAULT = "#ececef"; // Used for the default text color.
|
package/dist/tokens/js/tokens.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Thu,
|
|
3
|
+
* Generated on Thu, 02 May 2024 10:07:41 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export const DATA_VIZ_GREEN_50 = "#ddfab7";
|
|
@@ -233,7 +233,7 @@ export const GL_LINE_HEIGHT_36 = "2.25rem";
|
|
|
233
233
|
export const GL_LINE_HEIGHT_42 = "2.625rem";
|
|
234
234
|
export const GL_LINE_HEIGHT_44 = "2.75rem";
|
|
235
235
|
export const GL_LINE_HEIGHT_52 = "3.25rem";
|
|
236
|
-
export const GL_TEXT_PRIMARY = "#333238"; // Use text.color.
|
|
236
|
+
export const GL_TEXT_PRIMARY = "#333238"; // Use text.color.default instead
|
|
237
237
|
export const GL_TEXT_SECONDARY = "#737278"; // Use text.color.subtle instead
|
|
238
238
|
export const GL_TEXT_TERTIARY = "#89888d"; // Use text.color.disabled instead
|
|
239
239
|
export const GL_TEXT_COLOR_DEFAULT = "#434248"; // Used for the default text color.
|
|
@@ -4800,7 +4800,7 @@
|
|
|
4800
4800
|
"primary": {
|
|
4801
4801
|
"value": "#ececef",
|
|
4802
4802
|
"$type": "color",
|
|
4803
|
-
"comment": "Use text.color.
|
|
4803
|
+
"comment": "Use text.color.default instead",
|
|
4804
4804
|
"deprecated": true,
|
|
4805
4805
|
"themeable": true,
|
|
4806
4806
|
"filePath": "/builds/gitlab-org/gitlab-ui/src/tokens/text.dark.tokens.json",
|
|
@@ -4808,7 +4808,7 @@
|
|
|
4808
4808
|
"original": {
|
|
4809
4809
|
"value": "#ececef",
|
|
4810
4810
|
"$type": "color",
|
|
4811
|
-
"comment": "Use text.color.
|
|
4811
|
+
"comment": "Use text.color.default instead",
|
|
4812
4812
|
"deprecated": true,
|
|
4813
4813
|
"themeable": true
|
|
4814
4814
|
},
|
|
@@ -4800,7 +4800,7 @@
|
|
|
4800
4800
|
"primary": {
|
|
4801
4801
|
"value": "#333238",
|
|
4802
4802
|
"$type": "color",
|
|
4803
|
-
"comment": "Use text.color.
|
|
4803
|
+
"comment": "Use text.color.default instead",
|
|
4804
4804
|
"deprecated": true,
|
|
4805
4805
|
"themeable": true,
|
|
4806
4806
|
"filePath": "/builds/gitlab-org/gitlab-ui/src/tokens/text.tokens.json",
|
|
@@ -4808,7 +4808,7 @@
|
|
|
4808
4808
|
"original": {
|
|
4809
4809
|
"value": "#333238",
|
|
4810
4810
|
"$type": "color",
|
|
4811
|
-
"comment": "Use text.color.
|
|
4811
|
+
"comment": "Use text.color.default instead",
|
|
4812
4812
|
"deprecated": true,
|
|
4813
4813
|
"themeable": true
|
|
4814
4814
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly
|
|
3
|
-
// Generated on Thu,
|
|
3
|
+
// Generated on Thu, 02 May 2024 10:07:41 GMT
|
|
4
4
|
|
|
5
5
|
$gl-text-color-disabled: #89888d !default; // Used for disabled text.
|
|
6
6
|
$gl-text-color-link: #63a6e9 !default; // Used for default text links.
|
|
@@ -10,7 +10,7 @@ $gl-text-color-subtle: #bfbfc3 !default; // Used for supplemental text that does
|
|
|
10
10
|
$gl-text-color-default: #ececef !default; // Used for the default text color.
|
|
11
11
|
$gl-text-tertiary: #737278 !default; // Use text.color.disabled instead
|
|
12
12
|
$gl-text-secondary: #89888d !default; // Use text.color.subtle instead
|
|
13
|
-
$gl-text-primary: #ececef !default; // Use text.color.
|
|
13
|
+
$gl-text-primary: #ececef !default; // Use text.color.default instead
|
|
14
14
|
$red-950: #fff4f3;
|
|
15
15
|
$red-900: #fcf1ef;
|
|
16
16
|
$red-800: #fdd4cd;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly
|
|
3
|
-
// Generated on Thu,
|
|
3
|
+
// Generated on Thu, 02 May 2024 10:07:41 GMT
|
|
4
4
|
|
|
5
5
|
$gl-text-color-disabled: #89888d !default; // Used for disabled text.
|
|
6
6
|
$gl-text-color-success: #217645 !default; // Used for text indicating success or validity.
|
|
@@ -12,7 +12,7 @@ $gl-text-color-subtle: #626168 !default; // Used for supplemental text that does
|
|
|
12
12
|
$gl-text-color-default: #434248 !default; // Used for the default text color.
|
|
13
13
|
$gl-text-tertiary: #89888d !default; // Use text.color.disabled instead
|
|
14
14
|
$gl-text-secondary: #737278 !default; // Use text.color.subtle instead
|
|
15
|
-
$gl-text-primary: #333238 !default; // Use text.color.
|
|
15
|
+
$gl-text-primary: #333238 !default; // Use text.color.default instead
|
|
16
16
|
$gl-line-height-52: 3.25rem;
|
|
17
17
|
$gl-line-height-44: 2.75rem;
|
|
18
18
|
$gl-line-height-42: 2.625rem;
|