@gitlab/ui 76.0.1 → 77.0.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 +24 -0
- package/dist/components/experimental/duo/chat/duo_chat.js +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/common_story_options.js +28 -8
- package/dist/tokens/css/tokens.css +4 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +4 -1
- package/dist/tokens/json/tokens.dark.grouped.json +4 -1
- package/dist/tokens/json/tokens.dark.json +56 -0
- package/dist/tokens/json/tokens.grouped.json +4 -1
- package/dist/tokens/json/tokens.json +56 -0
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +4 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +1 -1
- package/src/components/base/alert/alert.scss +7 -7
- package/src/components/base/badge/badge.scss +1 -1
- package/src/components/base/banner/banner.scss +3 -3
- package/src/components/base/button/button.scss +2 -2
- package/src/components/base/card/card.scss +1 -1
- package/src/components/base/datepicker/datepicker.scss +5 -5
- package/src/components/base/drawer/drawer.scss +10 -10
- package/src/components/base/dropdown/dropdown_item.scss +1 -1
- package/src/components/base/filtered_search/filtered_search_suggestion_list.scss +1 -1
- package/src/components/base/form/form_checkbox/form_checkbox.scss +3 -3
- package/src/components/base/label/label.scss +1 -1
- package/src/components/base/loading_icon/loading_icon.scss +1 -1
- package/src/components/base/modal/modal.scss +1 -1
- package/src/components/base/new_dropdowns/dropdown.scss +1 -1
- package/src/components/base/new_dropdowns/dropdown_item.scss +1 -1
- package/src/components/base/new_dropdowns/listbox/listbox.scss +3 -3
- package/src/components/base/path/path.scss +8 -8
- package/src/components/base/search_box_by_click/search_box_by_click.scss +7 -7
- package/src/components/base/search_box_by_type/search_box_by_type.scss +5 -5
- package/src/components/base/tabs/tabs/tabs.scss +5 -5
- package/src/components/base/toast/toast.scss +5 -5
- package/src/components/base/toggle/toggle.scss +4 -4
- package/src/components/charts/heatmap/heatmap.scss +1 -1
- package/src/components/charts/legend/legend.scss +3 -3
- package/src/components/charts/tooltip/tooltip.scss +1 -1
- package/src/components/experimental/duo/chat/components/duo_chat_message/duo_chat_message.scss +3 -3
- package/src/components/experimental/duo/chat/duo_chat.vue +2 -2
- package/src/scss/tailwind.css +1 -0
- package/src/scss/utilities.scss +24 -430
- package/src/scss/utility-mixins/{appearance.scss → deprecated.scss} +9 -0
- package/src/scss/utility-mixins/index.scss +3 -2
- package/src/tokens/common_story_options.js +25 -5
- package/src/tokens/text.tokens.json +19 -0
- package/src/tokens/text.tokens.stories.js +15 -0
- package/src/scss/utility-mixins/position.scss +0 -223
|
@@ -9,21 +9,36 @@ const methods = {
|
|
|
9
9
|
isAlpha(value) {
|
|
10
10
|
return value.startsWith('rgba(');
|
|
11
11
|
},
|
|
12
|
+
isBackgroundColor(property) {
|
|
13
|
+
return property === 'backgroundColor';
|
|
14
|
+
},
|
|
12
15
|
getTokenName(token) {
|
|
13
16
|
return token.path.filter(Boolean).join('.');
|
|
14
17
|
},
|
|
15
|
-
|
|
18
|
+
getClasses(property, value) {
|
|
16
19
|
if (this.isAlpha(value)) return '';
|
|
20
|
+
if (!this.isBackgroundColor(property)) return '';
|
|
17
21
|
const textColorVariant = colorFromBackground(value, 4.5);
|
|
18
22
|
return {
|
|
19
23
|
'gl-text-gray-950': textColorVariant === 'dark',
|
|
20
24
|
'gl-text-white': textColorVariant === 'light'
|
|
21
25
|
};
|
|
26
|
+
},
|
|
27
|
+
getStyle(property, value) {
|
|
28
|
+
if (this.isBackgroundColor(property)) {
|
|
29
|
+
return {
|
|
30
|
+
backgroundColor: value
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
color: value
|
|
35
|
+
};
|
|
22
36
|
}
|
|
23
37
|
};
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
let
|
|
38
|
+
const colorTemplate = function () {
|
|
39
|
+
let property = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'backgroundColor';
|
|
40
|
+
let lightBackground = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : WHITE;
|
|
41
|
+
let darkBackground = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : GRAY_950;
|
|
27
42
|
return `
|
|
28
43
|
<ul
|
|
29
44
|
class="gl-list-style-none gl-m-0 gl-p-0"
|
|
@@ -32,8 +47,8 @@ const template = function () {
|
|
|
32
47
|
v-for="token in tokens"
|
|
33
48
|
:key="token.name"
|
|
34
49
|
class="gl-display-flex gl-flex-wrap gl-align-items-center gl-justify-content-space-between gl-gap-3 gl-p-3"
|
|
35
|
-
:class="
|
|
36
|
-
:style="{
|
|
50
|
+
:class="getClasses('${property}', token.value)"
|
|
51
|
+
:style="getStyle('${property}', token.value)"
|
|
37
52
|
>
|
|
38
53
|
<code class="gl-reset-color">{{ getTokenName(token) }}</code>
|
|
39
54
|
<div class="gl-display-flex gl-align-items-center gl-gap-3">
|
|
@@ -48,7 +63,12 @@ const template = function () {
|
|
|
48
63
|
const colorTokenStoryOptions = {
|
|
49
64
|
components,
|
|
50
65
|
methods,
|
|
51
|
-
template:
|
|
66
|
+
template: colorTemplate('backgroundColor')
|
|
67
|
+
};
|
|
68
|
+
const colorTextTokenStoryOptions = {
|
|
69
|
+
components,
|
|
70
|
+
methods,
|
|
71
|
+
template: colorTemplate('color')
|
|
52
72
|
};
|
|
53
73
|
|
|
54
|
-
export { colorTokenStoryOptions, components, methods
|
|
74
|
+
export { colorTextTokenStoryOptions, colorTokenStoryOptions, components, methods };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Tue, 27 Feb 2024
|
|
3
|
+
* Generated on Tue, 27 Feb 2024 15:36:15 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -234,4 +234,7 @@
|
|
|
234
234
|
--data-viz-green-200: #b0d97b;
|
|
235
235
|
--data-viz-green-100: #c6ed94;
|
|
236
236
|
--data-viz-green-50: #ddfab7;
|
|
237
|
+
--gl-text-tertiary: var(--gray-400);
|
|
238
|
+
--gl-text-secondary: var(--gray-500);
|
|
239
|
+
--gl-text-primary: var(--gray-900);
|
|
237
240
|
}
|
package/dist/tokens/js/tokens.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Tue, 27 Feb 2024
|
|
3
|
+
* Generated on Tue, 27 Feb 2024 15:36:15 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export const DATA_VIZ_GREEN_50 = "#ddfab7";
|
|
@@ -233,3 +233,6 @@ 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";
|
|
237
|
+
export const GL_TEXT_SECONDARY = "#737278";
|
|
238
|
+
export const GL_TEXT_TERTIARY = "#89888d";
|
|
@@ -219,7 +219,10 @@
|
|
|
219
219
|
"t-white-a-02": "rgba(255, 255, 255, 0.02)",
|
|
220
220
|
"t-white-a-04": "rgba(255, 255, 255, 0.04)",
|
|
221
221
|
"t-white-a-06": "rgba(255, 255, 255, 0.06)",
|
|
222
|
-
"t-white-a-08": "rgba(255, 255, 255, 0.08)"
|
|
222
|
+
"t-white-a-08": "rgba(255, 255, 255, 0.08)",
|
|
223
|
+
"text-primary": "#ececef",
|
|
224
|
+
"text-secondary": "#89888d",
|
|
225
|
+
"text-tertiary": "#737278"
|
|
223
226
|
},
|
|
224
227
|
"dimension": {
|
|
225
228
|
"line-height-12": "0.75rem",
|
|
@@ -4795,5 +4795,61 @@
|
|
|
4795
4795
|
"52"
|
|
4796
4796
|
]
|
|
4797
4797
|
}
|
|
4798
|
+
},
|
|
4799
|
+
"text": {
|
|
4800
|
+
"primary": {
|
|
4801
|
+
"value": "#ececef",
|
|
4802
|
+
"$type": "color",
|
|
4803
|
+
"themeable": true,
|
|
4804
|
+
"filePath": "/builds/gitlab-org/gitlab-ui/src/tokens/text.tokens.json",
|
|
4805
|
+
"isSource": false,
|
|
4806
|
+
"original": {
|
|
4807
|
+
"value": "{gray.900}",
|
|
4808
|
+
"$type": "color",
|
|
4809
|
+
"themeable": true
|
|
4810
|
+
},
|
|
4811
|
+
"name": "TEXT_PRIMARY",
|
|
4812
|
+
"attributes": {},
|
|
4813
|
+
"path": [
|
|
4814
|
+
"text",
|
|
4815
|
+
"primary"
|
|
4816
|
+
]
|
|
4817
|
+
},
|
|
4818
|
+
"secondary": {
|
|
4819
|
+
"value": "#89888d",
|
|
4820
|
+
"$type": "color",
|
|
4821
|
+
"themeable": true,
|
|
4822
|
+
"filePath": "/builds/gitlab-org/gitlab-ui/src/tokens/text.tokens.json",
|
|
4823
|
+
"isSource": false,
|
|
4824
|
+
"original": {
|
|
4825
|
+
"value": "{gray.500}",
|
|
4826
|
+
"$type": "color",
|
|
4827
|
+
"themeable": true
|
|
4828
|
+
},
|
|
4829
|
+
"name": "TEXT_SECONDARY",
|
|
4830
|
+
"attributes": {},
|
|
4831
|
+
"path": [
|
|
4832
|
+
"text",
|
|
4833
|
+
"secondary"
|
|
4834
|
+
]
|
|
4835
|
+
},
|
|
4836
|
+
"tertiary": {
|
|
4837
|
+
"value": "#737278",
|
|
4838
|
+
"$type": "color",
|
|
4839
|
+
"themeable": true,
|
|
4840
|
+
"filePath": "/builds/gitlab-org/gitlab-ui/src/tokens/text.tokens.json",
|
|
4841
|
+
"isSource": false,
|
|
4842
|
+
"original": {
|
|
4843
|
+
"value": "{gray.400}",
|
|
4844
|
+
"$type": "color",
|
|
4845
|
+
"themeable": true
|
|
4846
|
+
},
|
|
4847
|
+
"name": "TEXT_TERTIARY",
|
|
4848
|
+
"attributes": {},
|
|
4849
|
+
"path": [
|
|
4850
|
+
"text",
|
|
4851
|
+
"tertiary"
|
|
4852
|
+
]
|
|
4853
|
+
}
|
|
4798
4854
|
}
|
|
4799
4855
|
}
|
|
@@ -219,7 +219,10 @@
|
|
|
219
219
|
"t-white-a-02": "rgba(255, 255, 255, 0.02)",
|
|
220
220
|
"t-white-a-04": "rgba(255, 255, 255, 0.04)",
|
|
221
221
|
"t-white-a-06": "rgba(255, 255, 255, 0.06)",
|
|
222
|
-
"t-white-a-08": "rgba(255, 255, 255, 0.08)"
|
|
222
|
+
"t-white-a-08": "rgba(255, 255, 255, 0.08)",
|
|
223
|
+
"text-primary": "#333238",
|
|
224
|
+
"text-secondary": "#737278",
|
|
225
|
+
"text-tertiary": "#89888d"
|
|
223
226
|
},
|
|
224
227
|
"dimension": {
|
|
225
228
|
"line-height-12": "0.75rem",
|
|
@@ -4795,5 +4795,61 @@
|
|
|
4795
4795
|
"52"
|
|
4796
4796
|
]
|
|
4797
4797
|
}
|
|
4798
|
+
},
|
|
4799
|
+
"text": {
|
|
4800
|
+
"primary": {
|
|
4801
|
+
"value": "#333238",
|
|
4802
|
+
"$type": "color",
|
|
4803
|
+
"themeable": true,
|
|
4804
|
+
"filePath": "/builds/gitlab-org/gitlab-ui/src/tokens/text.tokens.json",
|
|
4805
|
+
"isSource": false,
|
|
4806
|
+
"original": {
|
|
4807
|
+
"value": "{gray.900}",
|
|
4808
|
+
"$type": "color",
|
|
4809
|
+
"themeable": true
|
|
4810
|
+
},
|
|
4811
|
+
"name": "TEXT_PRIMARY",
|
|
4812
|
+
"attributes": {},
|
|
4813
|
+
"path": [
|
|
4814
|
+
"text",
|
|
4815
|
+
"primary"
|
|
4816
|
+
]
|
|
4817
|
+
},
|
|
4818
|
+
"secondary": {
|
|
4819
|
+
"value": "#737278",
|
|
4820
|
+
"$type": "color",
|
|
4821
|
+
"themeable": true,
|
|
4822
|
+
"filePath": "/builds/gitlab-org/gitlab-ui/src/tokens/text.tokens.json",
|
|
4823
|
+
"isSource": false,
|
|
4824
|
+
"original": {
|
|
4825
|
+
"value": "{gray.500}",
|
|
4826
|
+
"$type": "color",
|
|
4827
|
+
"themeable": true
|
|
4828
|
+
},
|
|
4829
|
+
"name": "TEXT_SECONDARY",
|
|
4830
|
+
"attributes": {},
|
|
4831
|
+
"path": [
|
|
4832
|
+
"text",
|
|
4833
|
+
"secondary"
|
|
4834
|
+
]
|
|
4835
|
+
},
|
|
4836
|
+
"tertiary": {
|
|
4837
|
+
"value": "#89888d",
|
|
4838
|
+
"$type": "color",
|
|
4839
|
+
"themeable": true,
|
|
4840
|
+
"filePath": "/builds/gitlab-org/gitlab-ui/src/tokens/text.tokens.json",
|
|
4841
|
+
"isSource": false,
|
|
4842
|
+
"original": {
|
|
4843
|
+
"value": "{gray.400}",
|
|
4844
|
+
"$type": "color",
|
|
4845
|
+
"themeable": true
|
|
4846
|
+
},
|
|
4847
|
+
"name": "TEXT_TERTIARY",
|
|
4848
|
+
"attributes": {},
|
|
4849
|
+
"path": [
|
|
4850
|
+
"text",
|
|
4851
|
+
"tertiary"
|
|
4852
|
+
]
|
|
4853
|
+
}
|
|
4798
4854
|
}
|
|
4799
4855
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly
|
|
3
|
-
// Generated on Tue, 27 Feb 2024
|
|
3
|
+
// Generated on Tue, 27 Feb 2024 15:36:15 GMT
|
|
4
4
|
|
|
5
5
|
$gl-line-height-52: 3.25rem;
|
|
6
6
|
$gl-line-height-44: 2.75rem;
|
|
@@ -232,3 +232,6 @@ $data-viz-green-300: #94c25e !default;
|
|
|
232
232
|
$data-viz-green-200: #b0d97b !default;
|
|
233
233
|
$data-viz-green-100: #c6ed94 !default;
|
|
234
234
|
$data-viz-green-50: #ddfab7 !default;
|
|
235
|
+
$gl-text-tertiary: $gray-400 !default;
|
|
236
|
+
$gl-text-secondary: $gray-500 !default;
|
|
237
|
+
$gl-text-primary: $gray-900 !default;
|