@gitlab/ui 113.2.4 → 113.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "113.2.4",
3
+ "version": "113.3.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -431,7 +431,8 @@
431
431
  &.btn-confirm-tertiary,
432
432
  &.btn-danger-tertiary {
433
433
  @media (forced-colors: active) {
434
- color: $black;
434
+ /* stylelint-disable-next-line color-named */
435
+ color: black; // stylelint-disable-line scale-unlimited/declaration-strict-value
435
436
  border: 0;
436
437
  }
437
438
  }
@@ -1,7 +1,7 @@
1
1
  .gl-markdown {
2
2
  @apply gl-text-lg;
3
3
  @apply gl-leading-24;
4
- color: $gl-text-color;
4
+ @apply gl-text-default;
5
5
  @apply gl-font-regular;
6
6
  @apply gl-font-normal;
7
7
 
@@ -72,12 +72,12 @@
72
72
  }
73
73
 
74
74
  blockquote {
75
- @apply gl-text-gray-700;
75
+ @apply gl-text-subtle;
76
76
  @apply gl-py-3;
77
77
  @apply gl-pl-6;
78
78
  @apply gl-my-3;
79
79
  @apply gl-mx-0;
80
- box-shadow: inset $gl-border-size-4 0 0 0 $gray-100;
80
+ box-shadow: inset $gl-border-size-4 0 0 0 var(--gl-border-color-strong);
81
81
  }
82
82
 
83
83
  .idiff {
@@ -87,17 +87,17 @@
87
87
  }
88
88
 
89
89
  .deletion {
90
- @apply gl-bg-red-100;
90
+ @apply gl-bg-status-danger;
91
91
  }
92
92
 
93
93
  .addition {
94
- @apply gl-bg-green-100;
94
+ @apply gl-bg-status-success;
95
95
  }
96
96
 
97
97
  code {
98
98
  @apply gl-rounded-base;
99
- @apply gl-bg-gray-50;
100
- @apply gl-text-gray-950;
99
+ @apply gl-bg-strong;
100
+ @apply gl-text-strong;
101
101
  @apply gl-px-2;
102
102
  @apply gl-py-1;
103
103
  }
@@ -106,14 +106,14 @@
106
106
  @apply gl-rounded-base;
107
107
  @apply gl-py-3;
108
108
  @apply gl-px-4;
109
- box-shadow: inset 0 0 0 $gl-border-size-1 $gray-100;
109
+ box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-border-color-default);
110
110
  @apply gl-my-7;
111
111
  @apply gl-overflow-auto;
112
112
 
113
113
  code {
114
- @apply gl-bg-white;
114
+ @apply gl-bg-default;
115
115
  @apply gl-rounded-none;
116
- @apply gl-text-gray-900;
116
+ @apply gl-text-strong;
117
117
  @apply gl-p-0;
118
118
  }
119
119
  }
@@ -146,23 +146,23 @@
146
146
  td {
147
147
  @apply gl-px-3;
148
148
  @apply gl-py-4;
149
- box-shadow: inset 0 -#{$gl-border-size-1} 0 0 $gray-100;
149
+ box-shadow: inset 0 -#{$gl-border-size-1} 0 0 var(--gl-border-color-default);
150
150
  @apply gl-align-top;
151
151
  }
152
152
 
153
153
  th {
154
154
  box-shadow:
155
- inset 0 #{$gl-border-size-1} 0 0 $gray-100,
156
- inset 0 -#{$gl-border-size-1} 0 0 $gray-100;
155
+ inset 0 #{$gl-border-size-1} 0 0 var(--gl-border-color-default),
156
+ inset 0 -#{$gl-border-size-1} 0 0 var(--gl-border-color-default);
157
157
  @apply gl-font-bold;
158
158
  }
159
159
 
160
160
  thead {
161
- @apply gl-bg-gray-50;
161
+ @apply gl-bg-strong;
162
162
  }
163
163
 
164
164
  tr:nth-child(even) {
165
- @apply gl-bg-gray-10;
165
+ @apply gl-bg-subtle;
166
166
  }
167
167
  }
168
168
  }
@@ -17,7 +17,7 @@ $legend-body-h: $gl-spacing-scale-13 - $gl-spacing-scale-4;
17
17
  .gl-legend-tabular.gl-legend-b-fade,
18
18
  .gl-chart-h-auto .gl-legend-inline.gl-legend-b-fade {
19
19
  &::after {
20
- background-image: linear-gradient(to bottom, $transparent-rgba, var(--white, #{$white}));
20
+ background-image: linear-gradient(to bottom, $transparent-rgba, var(--gl-background-color-default));
21
21
  bottom: 0;
22
22
  content: '';
23
23
  @apply gl-block;
@@ -80,7 +80,7 @@ $legend-body-h: $gl-spacing-scale-13 - $gl-spacing-scale-4;
80
80
  @apply gl-flex;
81
81
 
82
82
  &:nth-child(odd) {
83
- background-color: var(--gray-50, #{$gray-50});
83
+ @apply gl-bg-strong;
84
84
  }
85
85
  }
86
86
 
@@ -2,7 +2,7 @@
2
2
  @apply gl-leading-1;
3
3
 
4
4
  &:hover[tabindex='0'] {
5
- @apply gl-bg-gray-50;
5
+ @apply gl-bg-strong;
6
6
  @apply gl-rounded-base;
7
7
  }
8
8
 
@@ -2,7 +2,6 @@
2
2
  @apply gl-bg-transparent;
3
3
  @apply gl-border-none;
4
4
  @apply gl-cursor-pointer;
5
- @apply gl-text-gray-500;
6
5
 
7
6
  &:focus {
8
7
  @apply gl-focus;
@@ -21,8 +21,6 @@ $feature-button-border: true;
21
21
  @import 'typography';
22
22
  @import 'components';
23
23
 
24
- @import 'storybook_dark_mode';
25
-
26
24
  /**
27
25
  * Custom padding for docs pages. This improves the integration in Pajamas pages.
28
26
  */
@@ -1,7 +1,7 @@
1
1
  @mixin gl-typescale-ui($selector: 'body') {
2
2
  #{$selector} {
3
3
  @apply gl-text-base;
4
- @apply gl-text-gray-900;
4
+ @apply gl-text-default;
5
5
  @apply gl-font-regular;
6
6
  @apply gl-font-normal;
7
7
  @apply gl-leading-normal;
@@ -60,7 +60,7 @@
60
60
  .gl-h6 {
61
61
  @apply gl-text-base;
62
62
  @apply gl-leading-20;
63
- @apply gl-text-gray-700;
63
+ @apply gl-text-subtle;
64
64
  }
65
65
 
66
66
  p,
@@ -93,7 +93,7 @@
93
93
  }
94
94
 
95
95
  blockquote {
96
- @apply gl-text-gray-700;
96
+ @apply gl-text-subtle;
97
97
  @apply gl-py-3;
98
98
  @apply gl-pl-6;
99
99
  @apply gl-my-3;
@@ -59,11 +59,12 @@ $white-contrast: #fff !default;
59
59
  $white-normal: #f0f0f0 !default;
60
60
  $white-dark: #eaeaea !default;
61
61
  $white-transparent: rgba(255, 255, 255, 0.8) !default;
62
+ /* stylelint-disable-next-line @gitlab/no-gl-deprecated-design-tokens */
62
63
  $transparent-rgba: rgba($white, 0);
63
64
 
64
65
  // Text
65
- $gl-text-color: $gray-900 !default;
66
- $gl-text-color-secondary: $gray-500 !default;
66
+ $gl-text-color: $gl-text-color-default !default;
67
+ $gl-text-color-secondary: $gl-text-color-subtle !default;
67
68
 
68
69
  $gl-font-weight-light: 300;
69
70
  $gl-font-weight-normal: 400;
@@ -186,7 +187,7 @@ $gl-font-size-compact-markdown-h1-md: px-to-rem(20px);
186
187
  // media xl (min-width: 1200px)
187
188
  $gl-font-size-compact-markdown-h1-xl: px-to-rem(23px);
188
189
 
189
- $border-color: $gray-100 !default;
190
+ $border-color: $gl-border-color-default !default;
190
191
 
191
192
  // use px for borders rather than rem
192
193
  // we don't want borders to scale with font size
@@ -229,8 +230,6 @@ $focus-ring: 0 0 0 $outline-offset var(--gl-focus-ring-inner-color),
229
230
  0 0 0 #{$outline-offset + $outline-width} var(--gl-focus-ring-outer-color);
230
231
  $focus-ring-inset: inset 0 0 0 #{$outline-width + $outline-offset} var(--gl-focus-ring-inner-color),
231
232
  inset 0 0 0 $outline-offset var(--gl-focus-ring-inner-color);
232
- $focus-ring-dark: 0 0 0 $outline-offset rgba($black, 0.6),
233
- 0 0 0 #{$outline-offset + $outline-width} $blue-300;
234
233
  $focus-ring-outline: $outline-width solid var(--gl-focus-ring-outer-color);
235
234
 
236
235
  // Toasts
@@ -269,8 +268,8 @@ $gl-modal-medium-width: px-to-rem(768px);
269
268
  $gl-modal-large-width: px-to-rem(990px);
270
269
 
271
270
  // Modal bootstrap variables
272
- $modal-header-border-color: $gray-200;
273
- $modal-footer-border-color: $gray-200;
271
+ $modal-header-border-color: $gl-border-color-strong;
272
+ $modal-footer-border-color: $gl-border-color-strong;
274
273
  $modal-title-line-height: $gl-line-height-20;
275
274
  $modal-backdrop-bg: #000;
276
275
  $modal-backdrop-opacity: 0.64;
@@ -281,11 +280,15 @@ $modal-backdrop-opacity: 0.64;
281
280
  $body-color: $gl-text-color !default;
282
281
  $enable-validation-icons: false;
283
282
 
283
+ // Not moved to a design token as it's a vague Bootstrap variable that might have far-reaching, unintended consequences.
284
+ // Ideally, this variable would just be removed once we know it is not used anywhere.
285
+ /* stylelint-disable-next-line @gitlab/no-gl-deprecated-design-tokens */
284
286
  $secondary: $gray-50;
285
- $success: $green-500;
287
+ $success: $gl-text-color-success;
288
+ /* stylelint-disable-next-line @gitlab/no-gl-deprecated-design-tokens */
286
289
  $info: $blue-500;
287
- $warning: $orange-500;
288
- $danger: $red-500;
290
+ $warning: $gl-text-color-warning;
291
+ $danger: $gl-text-color-danger;
289
292
 
290
293
  $font-weight-bold: $gl-font-weight-bold;
291
294
 
@@ -312,9 +315,9 @@ $spacers: (
312
315
  9: $gl-spacing-scale-11,
313
316
  );
314
317
 
315
- $table-accent-bg: $gray-50;
316
- $card-border-color: $gray-100;
317
- $card-cap-bg: $gray-10 !default;
318
+ $table-accent-bg: $gl-background-color-strong;
319
+ $card-border-color: $gl-border-color-default;
320
+ $card-cap-bg: $gl-background-color-subtle !default;
318
321
 
319
322
  // Form input sizes
320
323
  $gl-form-input-sizes: (
@@ -325,11 +328,11 @@ $gl-form-input-sizes: (
325
328
  xl: $grid-size * 70,
326
329
  );
327
330
 
328
- $popover-bg: $white !default;
331
+ $popover-bg: $gl-background-color-default !default;
329
332
  $popover-arrow-width: 0.5rem;
330
333
  $popover-arrow-height: 0.25rem;
331
334
  $popover-arrow-color: $popover-bg;
332
- $popover-arrow-outer-color: $gray-100;
335
+ $popover-arrow-outer-color: $gl-border-color-default;
333
336
 
334
337
  $tooltip-opacity: 1;
335
338
 
@@ -1,21 +0,0 @@
1
- @import 'variables';
2
-
3
- // conditional overrides for dark mode for use in storybook.
4
- // Because we only use application.css from gitlab (and not
5
- // application_dark), we need to override some base rules so
6
- // that we can more easily test components in dark mode
7
-
8
- // This is because dark mode in gitlab currently depends on
9
- // overriding SCSS variables, but we want gitlab-ui dark mode
10
- // to use Custom Properties instead
11
-
12
- .gl-dark {
13
- // Note that we are assigning variables with different values due to the way GitLab inverts variables in dark mode.
14
- // e.g. text color is usually $gray-900, but in dark mode $gray-900 variable gets inverted to $gray-50
15
- --gl-text-color: #{$gray-50};
16
- --white: #{$gray-900}; // define mapping between the colours in dark mode. I have used the values from GitLab for consistency: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/stylesheets/themes/_dark.scss
17
- --gray-10: #{$gray-950};
18
- --gray-600: #{$gray-300};
19
-
20
- color-scheme: dark;
21
- }