@gitlab/ui 108.8.0 → 108.9.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.
@@ -247,15 +247,15 @@ const borderColors = {
247
247
  transparent: 'var(--gl-border-color-transparent, var(--gl-color-alpha-0, transparent))',
248
248
  };
249
249
  const iconColors = {
250
- default: 'var(--gl-icon-color-default, var(--gl-color-neutral-700, #4c4b51))',
251
- subtle: 'var(--gl-icon-color-subtle, var(--gl-color-neutral-500, #737278))',
252
- strong: 'var(--gl-icon-color-strong, var(--gl-color-neutral-900, #28272d))',
253
- disabled: 'var(--gl-icon-color-disabled, var(--gl-color-neutral-300, #a4a3a8))',
254
- link: 'var(--gl-icon-color-link, var(--gl-color-blue-700, #0b5cad))',
250
+ default: 'var(--gl-icon-color-default, var(--gl-text-color-default, #3a383f))',
251
+ subtle: 'var(--gl-icon-color-subtle, var(--gl-text-color-subtle, #626168))',
252
+ strong: 'var(--gl-icon-color-strong, var(--gl-text-color-strong, #18171d))',
253
+ disabled: 'var(--gl-icon-color-disabled, var(--gl-text-color-disabled, #89888d))',
254
+ link: 'var(--gl-icon-color-link, var(--gl-text-color-link, #0b5cad))',
255
255
  info: 'var(--gl-icon-color-info, var(--gl-color-blue-700, #0b5cad))',
256
- warning: 'var(--gl-icon-color-warning, var(--gl-color-orange-600, #9e5400))',
257
- danger: 'var(--gl-icon-color-danger, var(--gl-color-red-600, #c91c00))',
258
- success: 'var(--gl-icon-color-success, var(--gl-color-green-600, #217645))',
256
+ warning: 'var(--gl-icon-color-warning, var(--gl-text-color-warning, #9e5400))',
257
+ danger: 'var(--gl-icon-color-danger, var(--gl-text-color-danger, #c91c00))',
258
+ success: 'var(--gl-icon-color-success, var(--gl-text-color-success, #217645))',
259
259
  };
260
260
  const alphaDarkColors = {
261
261
  2: 'var(--gl-color-alpha-dark-2, rgba(05, 05, 06, 0.02))',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "108.8.0",
3
+ "version": "108.9.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -144,7 +144,7 @@
144
144
  "axe-playwright": "^2.1.0",
145
145
  "babel-jest": "29.0.1",
146
146
  "babel-loader": "^8.0.5",
147
- "cypress": "14.0.0",
147
+ "cypress": "14.0.2",
148
148
  "cypress-axe": "^1.4.0",
149
149
  "cypress-real-events": "^1.11.0",
150
150
  "dompurify": "^3.1.2",
@@ -3,3 +3,5 @@ export const POSITION = {
3
3
  MIDDLE: 'middle',
4
4
  END: 'end',
5
5
  };
6
+
7
+ export const ZERO_WIDTH_SPACE = '\u200b';
@@ -2,7 +2,7 @@
2
2
  <script>
3
3
  import { GlTooltipDirective } from '../../../directives/tooltip';
4
4
  import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
5
- import { POSITION } from './constants';
5
+ import { POSITION, ZERO_WIDTH_SPACE } from './constants';
6
6
 
7
7
  export default {
8
8
  name: 'GlTruncate',
@@ -47,8 +47,53 @@ export default {
47
47
  return Math.floor(this.text.length / 2);
48
48
  },
49
49
 
50
+ preventWhitespaceCollapse() {
51
+ // We don't use `\s` here since it includes non-breaking spaces and other
52
+ // non-collapsible whitespace characters.
53
+ // See https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
54
+ // and https://infra.spec.whatwg.org/#ascii-whitespace.
55
+ const collapsibleWhitespaceChar = /^[ \n\t\r\f]$/;
56
+ const { text, middleIndex } = this;
57
+ const lastCharOfFirstIsCollapsibleWhitespace = collapsibleWhitespaceChar.test(
58
+ text.charAt(middleIndex - 1)
59
+ );
60
+ const firstCharOfLastIsCollapsibleWhitespace = collapsibleWhitespaceChar.test(
61
+ text.charAt(middleIndex)
62
+ );
63
+
64
+ return lastCharOfFirstIsCollapsibleWhitespace && !firstCharOfLastIsCollapsibleWhitespace;
65
+ },
50
66
  first() {
51
- return this.text.slice(0, this.middleIndex);
67
+ const first = this.text.slice(0, this.middleIndex);
68
+
69
+ if (this.preventWhitespaceCollapse) {
70
+ // Because this component's root element has an internal flex layout,
71
+ // whitespace at the end of the first child span and at the beginning
72
+ // of the second child span would be ignored (i.e., totally collapsed).
73
+ //
74
+ // This means that strings with a space character in the middle would
75
+ // render as if there were no space, which would be incorrect (e.g.,
76
+ // "Gap here" would render as "Gaphere").
77
+ //
78
+ // So, in that case, we insert a zero-width space at the end of the
79
+ // first child span to prevent that whitespace from being totally
80
+ // collapsed. In other words:
81
+ // 'first-part-with-space ' → 'first-part-with-space &ZeroWidthSpace;'
82
+ //
83
+ // If there's a whitespace character at the begging of the second child
84
+ // span, we do *not* do this, since the left-to-right mark (&lrm;) just
85
+ // before `{{ last }}` in the template prevents the collapse of any
86
+ // whitespace at the start of `last`. If we ignored this edge case,
87
+ // we'd render a double space, which wouldn't correspond to how the
88
+ // string would normally render.
89
+ //
90
+ // See
91
+ // https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Whitespace#whitespace_in_block_formatting_contexts
92
+ // for more information on how browsers treat whitespace.
93
+ return `${first}${ZERO_WIDTH_SPACE}`;
94
+ }
95
+
96
+ return first;
52
97
  },
53
98
  last() {
54
99
  return this.text.slice(this.middleIndex);
@@ -827,15 +827,7 @@
827
827
  --gl-feedback-danger-text-color: var(--gl-color-red-700); /* Used for the text of a danger feedback item when notifying about a critical issue that has just occurred and requires immediate attention. */
828
828
  --gl-feedback-danger-icon-color: var(--gl-color-red-600); /* Used for the icon of a danger feedback item when notifying about a critical issue that has just occurred and requires immediate attention. */
829
829
  --gl-focus-ring-outer-color: var(--gl-color-blue-500); /* Used for the outer color portion of the focus ring. */
830
- --gl-icon-color-default: var(--gl-color-neutral-700); /* Used for the default icon color. Can be paired with default text. */
831
- --gl-icon-color-subtle: var(--gl-color-neutral-500); /* Used for a static or decorational icon. Can be paired with subtle text. */
832
- --gl-icon-color-strong: var(--gl-color-neutral-900); /* Used for an icon with the highest contrast. */
833
- --gl-icon-color-disabled: var(--gl-color-neutral-300); /* Used for an icon within a disabled section. */
834
- --gl-icon-color-link: var(--gl-color-blue-700); /* Used for an icon within a link. */
835
830
  --gl-icon-color-info: var(--gl-color-blue-700); /* Used for an icon associated with information or help. */
836
- --gl-icon-color-warning: var(--gl-color-orange-600); /* Used for an icon associated with a warning. */
837
- --gl-icon-color-danger: var(--gl-color-red-600); /* Used for an icon associated with an error or danger. */
838
- --gl-icon-color-success: var(--gl-color-green-600); /* Used for an icon associated with success or validity. */
839
831
  --gl-shadow-color-default: var(--gl-color-alpha-dark-16); /* Used for the default shadow color. */
840
832
  --gl-status-neutral-background-color: var(--gl-color-neutral-100); /* Used for the background of a neutral status item when the status is neither positive nor negative, or when indicating a special but stable state. */
841
833
  --gl-status-neutral-text-color: var(--gl-color-neutral-700); /* Used for the text of a neutral status item when the status is neither positive nor negative, or when indicating a special but stable state. */
@@ -991,6 +983,14 @@
991
983
  --gl-control-text-color-valid: var(--gl-text-color-success); /* Used for the helper text when the input is valid. */
992
984
  --gl-control-placeholder-color: var(--gl-text-color-disabled); /* Used for placeholder text within inputs. */
993
985
  --gl-focus-ring-inner-color: var(--gl-background-color-default); /* Used for the inner neutral portion of the focus ring. */
986
+ --gl-icon-color-default: var(--gl-text-color-default); /* Used for the default icon color. Can be paired with default text. */
987
+ --gl-icon-color-subtle: var(--gl-text-color-subtle); /* Used for a static or decorational icon. Can be paired with subtle text. */
988
+ --gl-icon-color-strong: var(--gl-text-color-strong); /* Used for an icon with the highest contrast. */
989
+ --gl-icon-color-disabled: var(--gl-text-color-disabled); /* Used for an icon within a disabled section. */
990
+ --gl-icon-color-link: var(--gl-text-color-link); /* Used for an icon within a link. */
991
+ --gl-icon-color-warning: var(--gl-text-color-warning); /* Used for an icon associated with a warning. */
992
+ --gl-icon-color-danger: var(--gl-text-color-danger); /* Used for an icon associated with an error or danger. */
993
+ --gl-icon-color-success: var(--gl-text-color-success); /* Used for an icon associated with success or validity. */
994
994
  --gl-action-selected-foreground-color-focus: var(--gl-action-selected-foreground-color-hover); /* Used for the foreground of a selected action in the focus state. */
995
995
  --gl-action-selected-border-color-focus: var(--gl-action-selected-background-color-focus); /* Used for the border of a selected action in the focus state. */
996
996
  --gl-action-strong-confirm-foreground-color-focus: var(--gl-action-strong-confirm-foreground-color-hover); /* Used for the foreground of a strong confirm action in the focus state. */
@@ -827,15 +827,7 @@
827
827
  --gl-feedback-danger-text-color: var(--gl-color-red-200); /* Used for the text of a danger feedback item when notifying about a critical issue that has just occurred and requires immediate attention. */
828
828
  --gl-feedback-danger-icon-color: var(--gl-color-red-300); /* Used for the icon of a danger feedback item when notifying about a critical issue that has just occurred and requires immediate attention. */
829
829
  --gl-focus-ring-outer-color: var(--gl-color-blue-400); /* Used for the outer color portion of the focus ring. */
830
- --gl-icon-color-default: var(--gl-color-neutral-100); /* Used for the default icon color. Can be paired with default text. */
831
- --gl-icon-color-subtle: var(--gl-color-neutral-300); /* Used for a static or decorational icon. Can be paired with subtle text. */
832
- --gl-icon-color-strong: var(--gl-color-neutral-10); /* Used for an icon with the highest contrast. */
833
- --gl-icon-color-disabled: var(--gl-color-neutral-500); /* Used for an icon within a disabled section. */
834
- --gl-icon-color-link: var(--gl-color-blue-200); /* Used for an icon within a link. */
835
830
  --gl-icon-color-info: var(--gl-color-blue-200); /* Used for an icon associated with information or help. */
836
- --gl-icon-color-warning: var(--gl-color-orange-300); /* Used for an icon associated with a warning. */
837
- --gl-icon-color-danger: var(--gl-color-red-300); /* Used for an icon associated with an error or danger. */
838
- --gl-icon-color-success: var(--gl-color-green-300); /* Used for an icon associated with success or validity. */
839
831
  --gl-shadow-color-default: var(--gl-color-alpha-dark-40); /* Used for the default shadow color. */
840
832
  --gl-status-neutral-background-color: var(--gl-color-neutral-800); /* Used for the background of a neutral status item when the status is neither positive nor negative, or when indicating a special but stable state. */
841
833
  --gl-status-neutral-text-color: var(--gl-color-neutral-200); /* Used for the text of a neutral status item when the status is neither positive nor negative, or when indicating a special but stable state. */
@@ -991,6 +983,14 @@
991
983
  --gl-control-text-color-valid: var(--gl-text-color-success); /* Used for the helper text when the input is valid. */
992
984
  --gl-control-placeholder-color: var(--gl-text-color-disabled); /* Used for placeholder text within inputs. */
993
985
  --gl-focus-ring-inner-color: var(--gl-background-color-default); /* Used for the inner neutral portion of the focus ring. */
986
+ --gl-icon-color-default: var(--gl-text-color-default); /* Used for the default icon color. Can be paired with default text. */
987
+ --gl-icon-color-subtle: var(--gl-text-color-subtle); /* Used for a static or decorational icon. Can be paired with subtle text. */
988
+ --gl-icon-color-strong: var(--gl-text-color-strong); /* Used for an icon with the highest contrast. */
989
+ --gl-icon-color-disabled: var(--gl-text-color-disabled); /* Used for an icon within a disabled section. */
990
+ --gl-icon-color-link: var(--gl-text-color-link); /* Used for an icon within a link. */
991
+ --gl-icon-color-warning: var(--gl-text-color-warning); /* Used for an icon associated with a warning. */
992
+ --gl-icon-color-danger: var(--gl-text-color-danger); /* Used for an icon associated with an error or danger. */
993
+ --gl-icon-color-success: var(--gl-text-color-success); /* Used for an icon associated with success or validity. */
994
994
  --gl-action-selected-foreground-color-focus: var(--gl-action-selected-foreground-color-hover); /* Used for the foreground of a selected action in the focus state. */
995
995
  --gl-action-selected-border-color-focus: var(--gl-action-selected-background-color-focus); /* Used for the border of a selected action in the focus state. */
996
996
  --gl-action-strong-confirm-foreground-color-focus: var(--gl-action-strong-confirm-foreground-color-hover); /* Used for the foreground of a strong confirm action in the focus state. */
@@ -988,10 +988,10 @@ export const GL_FEEDBACK_DANGER_TEXT_COLOR = '#fcb5aa';
988
988
  export const GL_FEEDBACK_DANGER_ICON_COLOR = '#f6806d';
989
989
  export const GL_FOCUS_RING_OUTER_COLOR = '#428fdc';
990
990
  export const GL_FOCUS_RING_INNER_COLOR = '#18171d';
991
- export const GL_ICON_COLOR_DEFAULT = '#dcdcde';
992
- export const GL_ICON_COLOR_SUBTLE = '#a4a3a8';
993
- export const GL_ICON_COLOR_STRONG = '#fbfafd';
994
- export const GL_ICON_COLOR_DISABLED = '#737278';
991
+ export const GL_ICON_COLOR_DEFAULT = '#ececef';
992
+ export const GL_ICON_COLOR_SUBTLE = '#bfbfc3';
993
+ export const GL_ICON_COLOR_STRONG = '#fff';
994
+ export const GL_ICON_COLOR_DISABLED = '#89888d';
995
995
  export const GL_ICON_COLOR_LINK = '#9dc7f1';
996
996
  export const GL_ICON_COLOR_INFO = '#9dc7f1';
997
997
  export const GL_ICON_COLOR_WARNING = '#d99530';
@@ -988,10 +988,10 @@ export const GL_FEEDBACK_DANGER_TEXT_COLOR = '#ae1800';
988
988
  export const GL_FEEDBACK_DANGER_ICON_COLOR = '#c91c00';
989
989
  export const GL_FOCUS_RING_OUTER_COLOR = '#1f75cb';
990
990
  export const GL_FOCUS_RING_INNER_COLOR = '#fff';
991
- export const GL_ICON_COLOR_DEFAULT = '#4c4b51';
992
- export const GL_ICON_COLOR_SUBTLE = '#737278';
993
- export const GL_ICON_COLOR_STRONG = '#28272d';
994
- export const GL_ICON_COLOR_DISABLED = '#a4a3a8';
991
+ export const GL_ICON_COLOR_DEFAULT = '#3a383f';
992
+ export const GL_ICON_COLOR_SUBTLE = '#626168';
993
+ export const GL_ICON_COLOR_STRONG = '#18171d';
994
+ export const GL_ICON_COLOR_DISABLED = '#89888d';
995
995
  export const GL_ICON_COLOR_LINK = '#0b5cad';
996
996
  export const GL_ICON_COLOR_INFO = '#0b5cad';
997
997
  export const GL_ICON_COLOR_WARNING = '#9e5400';
@@ -22676,16 +22676,13 @@
22676
22676
  "icon": {
22677
22677
  "color": {
22678
22678
  "default": {
22679
- "$value": "#dcdcde",
22679
+ "$value": "#ececef",
22680
22680
  "$type": "color",
22681
22681
  "$description": "Used for the default icon color. Can be paired with default text.",
22682
22682
  "filePath": "src/tokens/icon.tokens.json",
22683
22683
  "isSource": true,
22684
22684
  "original": {
22685
- "$value": {
22686
- "default": "{color.neutral.700}",
22687
- "dark": "{color.neutral.100}"
22688
- },
22685
+ "$value": "{text.color.default}",
22689
22686
  "$type": "color",
22690
22687
  "$description": "Used for the default icon color. Can be paired with default text."
22691
22688
  },
@@ -22698,16 +22695,13 @@
22698
22695
  ]
22699
22696
  },
22700
22697
  "subtle": {
22701
- "$value": "#a4a3a8",
22698
+ "$value": "#bfbfc3",
22702
22699
  "$type": "color",
22703
22700
  "$description": "Used for a static or decorational icon. Can be paired with subtle text.",
22704
22701
  "filePath": "src/tokens/icon.tokens.json",
22705
22702
  "isSource": true,
22706
22703
  "original": {
22707
- "$value": {
22708
- "default": "{color.neutral.500}",
22709
- "dark": "{color.neutral.300}"
22710
- },
22704
+ "$value": "{text.color.subtle}",
22711
22705
  "$type": "color",
22712
22706
  "$description": "Used for a static or decorational icon. Can be paired with subtle text."
22713
22707
  },
@@ -22720,16 +22714,13 @@
22720
22714
  ]
22721
22715
  },
22722
22716
  "strong": {
22723
- "$value": "#fbfafd",
22717
+ "$value": "#fff",
22724
22718
  "$type": "color",
22725
22719
  "$description": "Used for an icon with the highest contrast.",
22726
22720
  "filePath": "src/tokens/icon.tokens.json",
22727
22721
  "isSource": true,
22728
22722
  "original": {
22729
- "$value": {
22730
- "default": "{color.neutral.900}",
22731
- "dark": "{color.neutral.10}"
22732
- },
22723
+ "$value": "{text.color.strong}",
22733
22724
  "$type": "color",
22734
22725
  "$description": "Used for an icon with the highest contrast."
22735
22726
  },
@@ -22742,16 +22733,13 @@
22742
22733
  ]
22743
22734
  },
22744
22735
  "disabled": {
22745
- "$value": "#737278",
22736
+ "$value": "#89888d",
22746
22737
  "$type": "color",
22747
22738
  "$description": "Used for an icon within a disabled section.",
22748
22739
  "filePath": "src/tokens/icon.tokens.json",
22749
22740
  "isSource": true,
22750
22741
  "original": {
22751
- "$value": {
22752
- "default": "{color.neutral.300}",
22753
- "dark": "{color.neutral.500}"
22754
- },
22742
+ "$value": "{text.color.disabled}",
22755
22743
  "$type": "color",
22756
22744
  "$description": "Used for an icon within a disabled section."
22757
22745
  },
@@ -22770,10 +22758,7 @@
22770
22758
  "filePath": "src/tokens/icon.tokens.json",
22771
22759
  "isSource": true,
22772
22760
  "original": {
22773
- "$value": {
22774
- "default": "{color.blue.700}",
22775
- "dark": "{color.blue.200}"
22776
- },
22761
+ "$value": "{text.color.link}",
22777
22762
  "$type": "color",
22778
22763
  "$description": "Used for an icon within a link."
22779
22764
  },
@@ -22814,10 +22799,7 @@
22814
22799
  "filePath": "src/tokens/icon.tokens.json",
22815
22800
  "isSource": true,
22816
22801
  "original": {
22817
- "$value": {
22818
- "default": "{color.orange.600}",
22819
- "dark": "{color.orange.300}"
22820
- },
22802
+ "$value": "{text.color.warning}",
22821
22803
  "$type": "color",
22822
22804
  "$description": "Used for an icon associated with a warning."
22823
22805
  },
@@ -22836,10 +22818,7 @@
22836
22818
  "filePath": "src/tokens/icon.tokens.json",
22837
22819
  "isSource": true,
22838
22820
  "original": {
22839
- "$value": {
22840
- "default": "{color.red.600}",
22841
- "dark": "{color.red.300}"
22842
- },
22821
+ "$value": "{text.color.danger}",
22843
22822
  "$type": "color",
22844
22823
  "$description": "Used for an icon associated with an error or danger."
22845
22824
  },
@@ -22858,10 +22837,7 @@
22858
22837
  "filePath": "src/tokens/icon.tokens.json",
22859
22838
  "isSource": true,
22860
22839
  "original": {
22861
- "$value": {
22862
- "default": "{color.green.600}",
22863
- "dark": "{color.green.300}"
22864
- },
22840
+ "$value": "{text.color.success}",
22865
22841
  "$type": "color",
22866
22842
  "$description": "Used for an icon associated with success or validity."
22867
22843
  },
@@ -22676,16 +22676,13 @@
22676
22676
  "icon": {
22677
22677
  "color": {
22678
22678
  "default": {
22679
- "$value": "#4c4b51",
22679
+ "$value": "#3a383f",
22680
22680
  "$type": "color",
22681
22681
  "$description": "Used for the default icon color. Can be paired with default text.",
22682
22682
  "filePath": "src/tokens/icon.tokens.json",
22683
22683
  "isSource": true,
22684
22684
  "original": {
22685
- "$value": {
22686
- "default": "{color.neutral.700}",
22687
- "dark": "{color.neutral.100}"
22688
- },
22685
+ "$value": "{text.color.default}",
22689
22686
  "$type": "color",
22690
22687
  "$description": "Used for the default icon color. Can be paired with default text."
22691
22688
  },
@@ -22698,16 +22695,13 @@
22698
22695
  ]
22699
22696
  },
22700
22697
  "subtle": {
22701
- "$value": "#737278",
22698
+ "$value": "#626168",
22702
22699
  "$type": "color",
22703
22700
  "$description": "Used for a static or decorational icon. Can be paired with subtle text.",
22704
22701
  "filePath": "src/tokens/icon.tokens.json",
22705
22702
  "isSource": true,
22706
22703
  "original": {
22707
- "$value": {
22708
- "default": "{color.neutral.500}",
22709
- "dark": "{color.neutral.300}"
22710
- },
22704
+ "$value": "{text.color.subtle}",
22711
22705
  "$type": "color",
22712
22706
  "$description": "Used for a static or decorational icon. Can be paired with subtle text."
22713
22707
  },
@@ -22720,16 +22714,13 @@
22720
22714
  ]
22721
22715
  },
22722
22716
  "strong": {
22723
- "$value": "#28272d",
22717
+ "$value": "#18171d",
22724
22718
  "$type": "color",
22725
22719
  "$description": "Used for an icon with the highest contrast.",
22726
22720
  "filePath": "src/tokens/icon.tokens.json",
22727
22721
  "isSource": true,
22728
22722
  "original": {
22729
- "$value": {
22730
- "default": "{color.neutral.900}",
22731
- "dark": "{color.neutral.10}"
22732
- },
22723
+ "$value": "{text.color.strong}",
22733
22724
  "$type": "color",
22734
22725
  "$description": "Used for an icon with the highest contrast."
22735
22726
  },
@@ -22742,16 +22733,13 @@
22742
22733
  ]
22743
22734
  },
22744
22735
  "disabled": {
22745
- "$value": "#a4a3a8",
22736
+ "$value": "#89888d",
22746
22737
  "$type": "color",
22747
22738
  "$description": "Used for an icon within a disabled section.",
22748
22739
  "filePath": "src/tokens/icon.tokens.json",
22749
22740
  "isSource": true,
22750
22741
  "original": {
22751
- "$value": {
22752
- "default": "{color.neutral.300}",
22753
- "dark": "{color.neutral.500}"
22754
- },
22742
+ "$value": "{text.color.disabled}",
22755
22743
  "$type": "color",
22756
22744
  "$description": "Used for an icon within a disabled section."
22757
22745
  },
@@ -22770,10 +22758,7 @@
22770
22758
  "filePath": "src/tokens/icon.tokens.json",
22771
22759
  "isSource": true,
22772
22760
  "original": {
22773
- "$value": {
22774
- "default": "{color.blue.700}",
22775
- "dark": "{color.blue.200}"
22776
- },
22761
+ "$value": "{text.color.link}",
22777
22762
  "$type": "color",
22778
22763
  "$description": "Used for an icon within a link."
22779
22764
  },
@@ -22814,10 +22799,7 @@
22814
22799
  "filePath": "src/tokens/icon.tokens.json",
22815
22800
  "isSource": true,
22816
22801
  "original": {
22817
- "$value": {
22818
- "default": "{color.orange.600}",
22819
- "dark": "{color.orange.300}"
22820
- },
22802
+ "$value": "{text.color.warning}",
22821
22803
  "$type": "color",
22822
22804
  "$description": "Used for an icon associated with a warning."
22823
22805
  },
@@ -22836,10 +22818,7 @@
22836
22818
  "filePath": "src/tokens/icon.tokens.json",
22837
22819
  "isSource": true,
22838
22820
  "original": {
22839
- "$value": {
22840
- "default": "{color.red.600}",
22841
- "dark": "{color.red.300}"
22842
- },
22821
+ "$value": "{text.color.danger}",
22843
22822
  "$type": "color",
22844
22823
  "$description": "Used for an icon associated with an error or danger."
22845
22824
  },
@@ -22858,10 +22837,7 @@
22858
22837
  "filePath": "src/tokens/icon.tokens.json",
22859
22838
  "isSource": true,
22860
22839
  "original": {
22861
- "$value": {
22862
- "default": "{color.green.600}",
22863
- "dark": "{color.green.300}"
22864
- },
22840
+ "$value": "{text.color.success}",
22865
22841
  "$type": "color",
22866
22842
  "$description": "Used for an icon associated with success or validity."
22867
22843
  },
@@ -825,15 +825,7 @@ $gl-feedback-danger-background-color: $gl-color-red-900; // Used for the backgro
825
825
  $gl-feedback-danger-text-color: $gl-color-red-200; // Used for the text of a danger feedback item when notifying about a critical issue that has just occurred and requires immediate attention.
826
826
  $gl-feedback-danger-icon-color: $gl-color-red-300; // Used for the icon of a danger feedback item when notifying about a critical issue that has just occurred and requires immediate attention.
827
827
  $gl-focus-ring-outer-color: $gl-color-blue-400; // Used for the outer color portion of the focus ring.
828
- $gl-icon-color-default: $gl-color-neutral-100; // Used for the default icon color. Can be paired with default text.
829
- $gl-icon-color-subtle: $gl-color-neutral-300; // Used for a static or decorational icon. Can be paired with subtle text.
830
- $gl-icon-color-strong: $gl-color-neutral-10; // Used for an icon with the highest contrast.
831
- $gl-icon-color-disabled: $gl-color-neutral-500; // Used for an icon within a disabled section.
832
- $gl-icon-color-link: $gl-color-blue-200; // Used for an icon within a link.
833
828
  $gl-icon-color-info: $gl-color-blue-200; // Used for an icon associated with information or help.
834
- $gl-icon-color-warning: $gl-color-orange-300; // Used for an icon associated with a warning.
835
- $gl-icon-color-danger: $gl-color-red-300; // Used for an icon associated with an error or danger.
836
- $gl-icon-color-success: $gl-color-green-300; // Used for an icon associated with success or validity.
837
829
  $gl-shadow-color-default: $gl-color-alpha-dark-40; // Used for the default shadow color.
838
830
  $gl-status-neutral-background-color: $gl-color-neutral-800; // Used for the background of a neutral status item when the status is neither positive nor negative, or when indicating a special but stable state.
839
831
  $gl-status-neutral-text-color: $gl-color-neutral-200; // Used for the text of a neutral status item when the status is neither positive nor negative, or when indicating a special but stable state.
@@ -989,6 +981,14 @@ $gl-control-text-color-error: $gl-text-color-danger; // Used for the helper text
989
981
  $gl-control-text-color-valid: $gl-text-color-success; // Used for the helper text when the input is valid.
990
982
  $gl-control-placeholder-color: $gl-text-color-disabled; // Used for placeholder text within inputs.
991
983
  $gl-focus-ring-inner-color: $gl-background-color-default; // Used for the inner neutral portion of the focus ring.
984
+ $gl-icon-color-default: $gl-text-color-default; // Used for the default icon color. Can be paired with default text.
985
+ $gl-icon-color-subtle: $gl-text-color-subtle; // Used for a static or decorational icon. Can be paired with subtle text.
986
+ $gl-icon-color-strong: $gl-text-color-strong; // Used for an icon with the highest contrast.
987
+ $gl-icon-color-disabled: $gl-text-color-disabled; // Used for an icon within a disabled section.
988
+ $gl-icon-color-link: $gl-text-color-link; // Used for an icon within a link.
989
+ $gl-icon-color-warning: $gl-text-color-warning; // Used for an icon associated with a warning.
990
+ $gl-icon-color-danger: $gl-text-color-danger; // Used for an icon associated with an error or danger.
991
+ $gl-icon-color-success: $gl-text-color-success; // Used for an icon associated with success or validity.
992
992
  $gl-action-selected-foreground-color-focus: $gl-action-selected-foreground-color-hover; // Used for the foreground of a selected action in the focus state.
993
993
  $gl-action-selected-border-color-focus: $gl-action-selected-background-color-focus; // Used for the border of a selected action in the focus state.
994
994
  $gl-action-strong-confirm-foreground-color-focus: $gl-action-strong-confirm-foreground-color-hover; // Used for the foreground of a strong confirm action in the focus state.
@@ -825,15 +825,7 @@ $gl-feedback-danger-background-color: $gl-color-red-50; // Used for the backgrou
825
825
  $gl-feedback-danger-text-color: $gl-color-red-700; // Used for the text of a danger feedback item when notifying about a critical issue that has just occurred and requires immediate attention.
826
826
  $gl-feedback-danger-icon-color: $gl-color-red-600; // Used for the icon of a danger feedback item when notifying about a critical issue that has just occurred and requires immediate attention.
827
827
  $gl-focus-ring-outer-color: $gl-color-blue-500; // Used for the outer color portion of the focus ring.
828
- $gl-icon-color-default: $gl-color-neutral-700; // Used for the default icon color. Can be paired with default text.
829
- $gl-icon-color-subtle: $gl-color-neutral-500; // Used for a static or decorational icon. Can be paired with subtle text.
830
- $gl-icon-color-strong: $gl-color-neutral-900; // Used for an icon with the highest contrast.
831
- $gl-icon-color-disabled: $gl-color-neutral-300; // Used for an icon within a disabled section.
832
- $gl-icon-color-link: $gl-color-blue-700; // Used for an icon within a link.
833
828
  $gl-icon-color-info: $gl-color-blue-700; // Used for an icon associated with information or help.
834
- $gl-icon-color-warning: $gl-color-orange-600; // Used for an icon associated with a warning.
835
- $gl-icon-color-danger: $gl-color-red-600; // Used for an icon associated with an error or danger.
836
- $gl-icon-color-success: $gl-color-green-600; // Used for an icon associated with success or validity.
837
829
  $gl-shadow-color-default: $gl-color-alpha-dark-16; // Used for the default shadow color.
838
830
  $gl-status-neutral-background-color: $gl-color-neutral-100; // Used for the background of a neutral status item when the status is neither positive nor negative, or when indicating a special but stable state.
839
831
  $gl-status-neutral-text-color: $gl-color-neutral-700; // Used for the text of a neutral status item when the status is neither positive nor negative, or when indicating a special but stable state.
@@ -989,6 +981,14 @@ $gl-control-text-color-error: $gl-text-color-danger; // Used for the helper text
989
981
  $gl-control-text-color-valid: $gl-text-color-success; // Used for the helper text when the input is valid.
990
982
  $gl-control-placeholder-color: $gl-text-color-disabled; // Used for placeholder text within inputs.
991
983
  $gl-focus-ring-inner-color: $gl-background-color-default; // Used for the inner neutral portion of the focus ring.
984
+ $gl-icon-color-default: $gl-text-color-default; // Used for the default icon color. Can be paired with default text.
985
+ $gl-icon-color-subtle: $gl-text-color-subtle; // Used for a static or decorational icon. Can be paired with subtle text.
986
+ $gl-icon-color-strong: $gl-text-color-strong; // Used for an icon with the highest contrast.
987
+ $gl-icon-color-disabled: $gl-text-color-disabled; // Used for an icon within a disabled section.
988
+ $gl-icon-color-link: $gl-text-color-link; // Used for an icon within a link.
989
+ $gl-icon-color-warning: $gl-text-color-warning; // Used for an icon associated with a warning.
990
+ $gl-icon-color-danger: $gl-text-color-danger; // Used for an icon associated with an error or danger.
991
+ $gl-icon-color-success: $gl-text-color-success; // Used for an icon associated with success or validity.
992
992
  $gl-action-selected-foreground-color-focus: $gl-action-selected-foreground-color-hover; // Used for the foreground of a selected action in the focus state.
993
993
  $gl-action-selected-border-color-focus: $gl-action-selected-background-color-focus; // Used for the border of a selected action in the focus state.
994
994
  $gl-action-strong-confirm-foreground-color-focus: $gl-action-strong-confirm-foreground-color-hover; // Used for the foreground of a strong confirm action in the focus state.
@@ -247,15 +247,15 @@ const borderColors = {
247
247
  transparent: 'var(--gl-border-color-transparent, var(--gl-color-alpha-0, transparent))',
248
248
  };
249
249
  const iconColors = {
250
- default: 'var(--gl-icon-color-default, var(--gl-color-neutral-700, #4c4b51))',
251
- subtle: 'var(--gl-icon-color-subtle, var(--gl-color-neutral-500, #737278))',
252
- strong: 'var(--gl-icon-color-strong, var(--gl-color-neutral-900, #28272d))',
253
- disabled: 'var(--gl-icon-color-disabled, var(--gl-color-neutral-300, #a4a3a8))',
254
- link: 'var(--gl-icon-color-link, var(--gl-color-blue-700, #0b5cad))',
250
+ default: 'var(--gl-icon-color-default, var(--gl-text-color-default, #3a383f))',
251
+ subtle: 'var(--gl-icon-color-subtle, var(--gl-text-color-subtle, #626168))',
252
+ strong: 'var(--gl-icon-color-strong, var(--gl-text-color-strong, #18171d))',
253
+ disabled: 'var(--gl-icon-color-disabled, var(--gl-text-color-disabled, #89888d))',
254
+ link: 'var(--gl-icon-color-link, var(--gl-text-color-link, #0b5cad))',
255
255
  info: 'var(--gl-icon-color-info, var(--gl-color-blue-700, #0b5cad))',
256
- warning: 'var(--gl-icon-color-warning, var(--gl-color-orange-600, #9e5400))',
257
- danger: 'var(--gl-icon-color-danger, var(--gl-color-red-600, #c91c00))',
258
- success: 'var(--gl-icon-color-success, var(--gl-color-green-600, #217645))',
256
+ warning: 'var(--gl-icon-color-warning, var(--gl-text-color-warning, #9e5400))',
257
+ danger: 'var(--gl-icon-color-danger, var(--gl-text-color-danger, #c91c00))',
258
+ success: 'var(--gl-icon-color-success, var(--gl-text-color-success, #217645))',
259
259
  };
260
260
  const alphaDarkColors = {
261
261
  2: 'var(--gl-color-alpha-dark-2, rgba(05, 05, 06, 0.02))',
@@ -2,42 +2,27 @@
2
2
  "icon": {
3
3
  "color": {
4
4
  "default": {
5
- "$value": {
6
- "default": "{color.neutral.700}",
7
- "dark": "{color.neutral.100}"
8
- },
5
+ "$value": "{text.color.default}",
9
6
  "$type": "color",
10
7
  "$description": "Used for the default icon color. Can be paired with default text."
11
8
  },
12
9
  "subtle": {
13
- "$value": {
14
- "default": "{color.neutral.500}",
15
- "dark": "{color.neutral.300}"
16
- },
10
+ "$value": "{text.color.subtle}",
17
11
  "$type": "color",
18
12
  "$description": "Used for a static or decorational icon. Can be paired with subtle text."
19
13
  },
20
14
  "strong": {
21
- "$value": {
22
- "default": "{color.neutral.900}",
23
- "dark": "{color.neutral.10}"
24
- },
15
+ "$value": "{text.color.strong}",
25
16
  "$type": "color",
26
17
  "$description": "Used for an icon with the highest contrast."
27
18
  },
28
19
  "disabled": {
29
- "$value": {
30
- "default": "{color.neutral.300}",
31
- "dark": "{color.neutral.500}"
32
- },
20
+ "$value": "{text.color.disabled}",
33
21
  "$type": "color",
34
22
  "$description": "Used for an icon within a disabled section."
35
23
  },
36
24
  "link": {
37
- "$value": {
38
- "default": "{color.blue.700}",
39
- "dark": "{color.blue.200}"
40
- },
25
+ "$value": "{text.color.link}",
41
26
  "$type": "color",
42
27
  "$description": "Used for an icon within a link."
43
28
  },
@@ -50,26 +35,17 @@
50
35
  "$description": "Used for an icon associated with information or help."
51
36
  },
52
37
  "warning": {
53
- "$value": {
54
- "default": "{color.orange.600}",
55
- "dark": "{color.orange.300}"
56
- },
38
+ "$value": "{text.color.warning}",
57
39
  "$type": "color",
58
40
  "$description": "Used for an icon associated with a warning."
59
41
  },
60
42
  "danger": {
61
- "$value": {
62
- "default": "{color.red.600}",
63
- "dark": "{color.red.300}"
64
- },
43
+ "$value": "{text.color.danger}",
65
44
  "$type": "color",
66
45
  "$description": "Used for an icon associated with an error or danger."
67
46
  },
68
47
  "success": {
69
- "$value": {
70
- "default": "{color.green.600}",
71
- "dark": "{color.green.300}"
72
- },
48
+ "$value": "{text.color.success}",
73
49
  "$type": "color",
74
50
  "$description": "Used for an icon associated with success or validity."
75
51
  }