@gitlab/ui 80.15.1 → 80.16.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 (37) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/components/base/icon/icon.js +14 -2
  3. package/dist/components/experimental/experiment_badge/experiment_badge.js +5 -3
  4. package/dist/index.css +1 -1
  5. package/dist/index.css.map +1 -1
  6. package/dist/tailwind.css +1 -1
  7. package/dist/tailwind.css.map +1 -1
  8. package/dist/tokens/build/js/tokens.dark.js +10 -1
  9. package/dist/tokens/build/js/tokens.js +10 -1
  10. package/dist/tokens/css/tokens.css +9 -0
  11. package/dist/tokens/css/tokens.dark.css +9 -0
  12. package/dist/tokens/js/tokens.dark.js +9 -0
  13. package/dist/tokens/js/tokens.js +9 -0
  14. package/dist/tokens/json/tokens.dark.json +202 -0
  15. package/dist/tokens/json/tokens.json +202 -0
  16. package/dist/tokens/scss/_tokens.dark.scss +9 -0
  17. package/dist/tokens/scss/_tokens.scss +9 -0
  18. package/dist/tokens/scss/_tokens_custom_properties.scss +9 -0
  19. package/dist/tokens/tailwind/tokens.cjs +20 -0
  20. package/dist/utils/constants.js +13 -1
  21. package/package.json +1 -1
  22. package/src/components/base/icon/icon.scss +0 -1
  23. package/src/components/base/icon/icon.vue +14 -2
  24. package/src/components/experimental/experiment_badge/experiment_badge.vue +5 -2
  25. package/src/tokens/build/css/tokens.css +9 -0
  26. package/src/tokens/build/css/tokens.dark.css +9 -0
  27. package/src/tokens/build/js/tokens.dark.js +9 -0
  28. package/src/tokens/build/js/tokens.js +9 -0
  29. package/src/tokens/build/json/tokens.dark.json +202 -0
  30. package/src/tokens/build/json/tokens.json +202 -0
  31. package/src/tokens/build/scss/_tokens.dark.scss +9 -0
  32. package/src/tokens/build/scss/_tokens.scss +9 -0
  33. package/src/tokens/build/scss/_tokens_custom_properties.scss +9 -0
  34. package/src/tokens/build/tailwind/tokens.cjs +20 -0
  35. package/src/tokens/icon.tokens.json +78 -0
  36. package/src/utils/constants.js +13 -0
  37. package/tailwind.defaults.js +7 -1
@@ -312,6 +312,15 @@ $gl-text-color-heading: $gl-color-neutral-950; // Used for headings level 1-6.
312
312
  $gl-text-color-strong: $gl-color-neutral-950; // Used for text with the highest contrast.
313
313
  $gl-text-color-subtle: $gl-color-neutral-600; // Used for supplemental text that doesn't need to be as prominent as other text.
314
314
  $gl-text-color-default: $gl-color-neutral-800; // Used for the default text color.
315
+ $gl-icon-color-success: $gl-color-green-600; // Used for an icon associated with success or validity.
316
+ $gl-icon-color-danger: $gl-color-red-600; // Used for an icon associated with an error or danger.
317
+ $gl-icon-color-warning: $gl-color-orange-600; // Used for an icon associated with a warning.
318
+ $gl-icon-color-info: $gl-color-blue-600; // Used for an icon associated with information or help.
319
+ $gl-icon-color-link: $gl-color-blue-600; // Used for an icon within a link.
320
+ $gl-icon-color-disabled: $gl-color-neutral-300; // Used for an icon within a disabled section.
321
+ $gl-icon-color-strong: $gl-color-neutral-900; // Used for an icon with the highest contrast.
322
+ $gl-icon-color-subtle: $gl-color-neutral-500; // Used for a static or decorational icon. Can be paired with subtle text.
323
+ $gl-icon-color-default: $gl-color-neutral-700; // Used for the default icon color. Can be paired with default text.
315
324
  $gl-background-color-disabled: $gl-color-neutral-10; // Used to identify a disabled section.
316
325
  $gl-background-color-strong: $gl-color-neutral-50; // Used to make the background easily stand out from the default.
317
326
  $gl-background-color-subtle: $gl-color-neutral-10; // Used to slightly differentiate the background from the default.
@@ -296,6 +296,15 @@ $t-white-a-02: var(--t-white-a-02);
296
296
  $t-white-a-04: var(--t-white-a-04);
297
297
  $t-white-a-06: var(--t-white-a-06);
298
298
  $t-white-a-08: var(--t-white-a-08);
299
+ $gl-icon-color-default: var(--gl-icon-color-default);
300
+ $gl-icon-color-subtle: var(--gl-icon-color-subtle);
301
+ $gl-icon-color-strong: var(--gl-icon-color-strong);
302
+ $gl-icon-color-disabled: var(--gl-icon-color-disabled);
303
+ $gl-icon-color-link: var(--gl-icon-color-link);
304
+ $gl-icon-color-info: var(--gl-icon-color-info);
305
+ $gl-icon-color-warning: var(--gl-icon-color-warning);
306
+ $gl-icon-color-danger: var(--gl-icon-color-danger);
307
+ $gl-icon-color-success: var(--gl-icon-color-success);
299
308
  $gl-line-height-12: var(--gl-line-height-12);
300
309
  $gl-line-height-16: var(--gl-line-height-16);
301
310
  $gl-line-height-20: var(--gl-line-height-20);
@@ -224,6 +224,18 @@ const backgroundColors = {
224
224
  disabled:
225
225
  'var(--gl-background-color-disabled, var(--gl-color-neutral-10, #fbfafd))',
226
226
  };
227
+ const iconColors = {
228
+ default: 'var(--gl-icon-color-default, var(--gl-color-neutral-700, #535158))',
229
+ subtle: 'var(--gl-icon-color-subtle, var(--gl-color-neutral-500, #737278))',
230
+ strong: 'var(--gl-icon-color-strong, var(--gl-color-neutral-900, #333238))',
231
+ disabled:
232
+ 'var(--gl-icon-color-disabled, var(--gl-color-neutral-300, #a4a3a8))',
233
+ link: 'var(--gl-icon-color-link, var(--gl-color-blue-600, #1068bf))',
234
+ info: 'var(--gl-icon-color-info, var(--gl-color-blue-600, #1068bf))',
235
+ warning: 'var(--gl-icon-color-warning, var(--gl-color-orange-600, #9e5400))',
236
+ danger: 'var(--gl-icon-color-danger, var(--gl-color-red-600, #c91c00))',
237
+ success: 'var(--gl-icon-color-success, var(--gl-color-green-600, #217645))',
238
+ };
227
239
 
228
240
  const colors = {
229
241
  inherit: 'inherit',
@@ -241,6 +253,13 @@ const backgroundColor = {
241
253
  ...backgroundColors,
242
254
  };
243
255
 
256
+ const fill = {
257
+ ...colors,
258
+ icon: {
259
+ ...iconColors,
260
+ },
261
+ };
262
+
244
263
  const textColor = {
245
264
  ...colors,
246
265
  ...textColors,
@@ -253,4 +272,5 @@ module.exports = {
253
272
  colors,
254
273
  backgroundColor,
255
274
  textColor,
275
+ fill,
256
276
  };
@@ -0,0 +1,78 @@
1
+ {
2
+ "icon": {
3
+ "color": {
4
+ "default": {
5
+ "$value": {
6
+ "default": "{color.neutral.700}",
7
+ "dark": "{color.neutral.100}"
8
+ },
9
+ "$type": "color",
10
+ "$description": "Used for the default icon color. Can be paired with default text."
11
+ },
12
+ "subtle": {
13
+ "$value": {
14
+ "default": "{color.neutral.500}",
15
+ "dark": "{color.neutral.300}"
16
+ },
17
+ "$type": "color",
18
+ "$description": "Used for a static or decorational icon. Can be paired with subtle text."
19
+ },
20
+ "strong": {
21
+ "$value": {
22
+ "default": "{color.neutral.900}",
23
+ "dark": "{color.neutral.10}"
24
+ },
25
+ "$type": "color",
26
+ "$description": "Used for an icon with the highest contrast."
27
+ },
28
+ "disabled": {
29
+ "$value": {
30
+ "default": "{color.neutral.300}",
31
+ "dark": "{color.neutral.500}"
32
+ },
33
+ "$type": "color",
34
+ "$description": "Used for an icon within a disabled section."
35
+ },
36
+ "link": {
37
+ "$value": {
38
+ "default": "{color.blue.600}",
39
+ "dark": "{color.blue.300}"
40
+ },
41
+ "$type": "color",
42
+ "$description": "Used for an icon within a link."
43
+ },
44
+ "info": {
45
+ "$value": {
46
+ "default": "{color.blue.600}",
47
+ "dark": "{color.blue.300}"
48
+ },
49
+ "$type": "color",
50
+ "$description": "Used for an icon associated with information or help."
51
+ },
52
+ "warning": {
53
+ "$value": {
54
+ "default": "{color.orange.600}",
55
+ "dark": "{color.orange.300}"
56
+ },
57
+ "$type": "color",
58
+ "$description": "Used for an icon associated with a warning."
59
+ },
60
+ "danger": {
61
+ "$value": {
62
+ "default": "{color.red.600}",
63
+ "dark": "{color.red.300}"
64
+ },
65
+ "$type": "color",
66
+ "$description": "Used for an icon associated with an error or danger."
67
+ },
68
+ "success": {
69
+ "$value": {
70
+ "default": "{color.green.600}",
71
+ "dark": "{color.green.300}"
72
+ },
73
+ "$type": "color",
74
+ "$description": "Used for an icon associated with success or validity."
75
+ }
76
+ }
77
+ }
78
+ }
@@ -180,6 +180,19 @@ export const datepickerWidthOptionsMap = {
180
180
  // size options all have corresponding styles (e.g. .s12 defined in icon.scss)
181
181
  export const iconSizeOptions = [8, 12, 14, 16, 24, 32, 48, 72];
182
182
 
183
+ export const iconVariantOptions = {
184
+ current: 'gl-fill-current',
185
+ default: 'gl-fill-icon-default',
186
+ subtle: 'gl-fill-icon-subtle',
187
+ strong: 'gl-fill-icon-strong',
188
+ disabled: 'gl-fill-icon-disabled',
189
+ link: 'gl-fill-icon-link',
190
+ info: 'gl-fill-icon-info',
191
+ warning: 'gl-fill-icon-warning',
192
+ danger: 'gl-fill-icon-danger',
193
+ success: 'gl-fill-icon-success',
194
+ };
195
+
183
196
  export const triggerVariantOptions = {
184
197
  click: 'click',
185
198
  hover: 'hover',
@@ -1,4 +1,9 @@
1
- const { colors, backgroundColor, textColor } = require('./src/tokens/build/tailwind/tokens.cjs');
1
+ const {
2
+ colors,
3
+ backgroundColor,
4
+ fill,
5
+ textColor,
6
+ } = require('./src/tokens/build/tailwind/tokens.cjs');
2
7
 
3
8
  const gridSize = 0.5; // rem
4
9
  const spacing = {
@@ -49,6 +54,7 @@ module.exports = {
49
54
  },
50
55
  colors,
51
56
  backgroundColor,
57
+ fill,
52
58
  spacing,
53
59
  fontSize: {
54
60
  xs: '0.625rem',