@gitlab/ui 39.1.0 → 39.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/base/alert/alert.js +11 -1
  3. package/dist/index.css +2 -2
  4. package/dist/index.css.map +1 -1
  5. package/dist/utility_classes.css +1 -1
  6. package/dist/utility_classes.css.map +1 -1
  7. package/package.json +2 -2
  8. package/scss_to_js/scss_variables.js +6 -2
  9. package/scss_to_js/scss_variables.json +24 -4
  10. package/src/components/base/alert/alert.scss +4 -0
  11. package/src/components/base/alert/alert.spec.js +11 -0
  12. package/src/components/base/alert/alert.stories.js +14 -0
  13. package/src/components/base/alert/alert.vue +10 -0
  14. package/src/components/base/avatar_link/avatar_link.scss +1 -0
  15. package/src/components/base/badge/badge.scss +1 -1
  16. package/src/components/base/breadcrumb/breadcrumb.scss +1 -1
  17. package/src/components/base/button/button.scss +34 -34
  18. package/src/components/base/carousel/carousel.scss +7 -0
  19. package/src/components/base/datepicker/datepicker.scss +4 -0
  20. package/src/components/base/dropdown/dropdown.scss +8 -0
  21. package/src/components/base/dropdown/dropdown_item.scss +0 -1
  22. package/src/components/base/form/form_checkbox/form_checkbox.scss +1 -1
  23. package/src/components/base/form/form_input/form_input.scss +2 -2
  24. package/src/components/base/form/form_select/form_select.scss +2 -2
  25. package/src/components/base/label/label.scss +2 -1
  26. package/src/components/base/link/link.scss +1 -1
  27. package/src/components/base/link/link.stories.js +15 -0
  28. package/src/components/base/nav/nav.scss +7 -0
  29. package/src/components/base/pagination/pagination.scss +14 -7
  30. package/src/components/base/path/path.scss +29 -5
  31. package/src/components/base/search_box_by_click/search_box_by_click.scss +1 -1
  32. package/src/components/base/table/table.scss +6 -0
  33. package/src/components/base/token/token.scss +6 -0
  34. package/src/components/base/token_selector/token_selector.scss +2 -2
  35. package/src/components/shared_components/close_button/close_button.scss +11 -11
  36. package/src/scss/components.scss +3 -1
  37. package/src/scss/mixins.scss +26 -4
  38. package/src/scss/utilities.scss +0 -8
  39. package/src/scss/utility-mixins/outline.scss +1 -1
  40. package/src/scss/variables.scss +8 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "39.1.0",
3
+ "version": "39.3.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -114,7 +114,7 @@
114
114
  "eslint": "7.32.0",
115
115
  "eslint-import-resolver-jest": "3.0.2",
116
116
  "eslint-plugin-cypress": "2.12.1",
117
- "eslint-plugin-storybook": "0.5.7",
117
+ "eslint-plugin-storybook": "0.5.11",
118
118
  "file-loader": "^4.2.0",
119
119
  "glob": "^7.2.0",
120
120
  "identity-obj-proxy": "^3.0.0",
@@ -291,8 +291,12 @@ export const glBorderRadius7 = '2rem'
291
291
  export const glBorderRadiusFull = '50%'
292
292
  export const glTransitionDurationSlow = '0.4s'
293
293
  export const glTransitionDurationMedium = '0.2s'
294
- export const focusRing = '0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 4px rgba(31, 117, 203, 0.48)'
295
- export const focusRingInset = 'inset 0 0 0 3px rgba(31, 117, 203, 0.48), inset 0 0 0 4px rgba(255, 255, 255, 0.4)'
294
+ export const outlineOffset = '1px'
295
+ export const outlineWidth = '2px'
296
+ export const focusRing = '0 0 0 1px #fff, 0 0 0 3px #428fdc'
297
+ export const focusRingInset = 'inset 0 0 0 3px #fff, inset 0 0 0 1px #fff'
298
+ export const focusRingDark = '0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 3px #63a6e9'
299
+ export const focusRingOutline = '2px solid #428fdc'
296
300
  export const toastMaxWidth = '36.625rem'
297
301
  export const toastPaddingRight = '2.625rem'
298
302
  export const toastBackgroundColor = '#303030'
@@ -1516,15 +1516,35 @@
1516
1516
  "value": "0.2s",
1517
1517
  "compiledValue": "0.2s"
1518
1518
  },
1519
+ {
1520
+ "name": "$outline-offset",
1521
+ "value": "1px",
1522
+ "compiledValue": "1px"
1523
+ },
1524
+ {
1525
+ "name": "$outline-width",
1526
+ "value": "2px",
1527
+ "compiledValue": "2px"
1528
+ },
1519
1529
  {
1520
1530
  "name": "$focus-ring",
1521
- "value": "0 0 0 $gl-border-size-1 rgba($white, 0.4), 0 0 0 $gl-border-size-4 rgba($blue-500, 0.48)",
1522
- "compiledValue": "0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 4px rgba(31, 117, 203, 0.48)"
1531
+ "value": "0 0 0 $outline-offset $white, 0 0 0 #{$outline-offset + $outline-width} $blue-400",
1532
+ "compiledValue": "0 0 0 1px #fff, 0 0 0 3px #428fdc"
1523
1533
  },
1524
1534
  {
1525
1535
  "name": "$focus-ring-inset",
1526
- "value": "inset 0 0 0 $gl-border-size-3 rgba($blue-500, 0.48), inset 0 0 0 $gl-border-size-4 rgba($white, 0.4)",
1527
- "compiledValue": "inset 0 0 0 3px rgba(31, 117, 203, 0.48), inset 0 0 0 4px rgba(255, 255, 255, 0.4)"
1536
+ "value": "inset 0 0 0 #{$outline-width + $outline-offset} $white, inset 0 0 0 $outline-offset $white",
1537
+ "compiledValue": "inset 0 0 0 3px #fff, inset 0 0 0 1px #fff"
1538
+ },
1539
+ {
1540
+ "name": "$focus-ring-dark",
1541
+ "value": "0 0 0 $outline-offset rgba($black, 0.6), 0 0 0 #{$outline-offset + $outline-width} $blue-300",
1542
+ "compiledValue": "0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 3px #63a6e9"
1543
+ },
1544
+ {
1545
+ "name": "$focus-ring-outline",
1546
+ "value": "$outline-width solid $blue-400",
1547
+ "compiledValue": "2px solid #428fdc"
1528
1548
  },
1529
1549
  {
1530
1550
  "name": "$toast-max-width",
@@ -8,6 +8,10 @@
8
8
  @include gl-pr-5;
9
9
  }
10
10
 
11
+ &-no-icon {
12
+ @include gl-pl-5;
13
+ }
14
+
11
15
  .gl-link:not(.gl-label-link) {
12
16
  @include gl-text-blue-600;
13
17
  @include gl-text-decoration-underline;
@@ -20,6 +20,7 @@ describe('Alert component', () => {
20
20
  });
21
21
  };
22
22
 
23
+ const findIcon = () => wrapper.find('.gl-alert-icon');
23
24
  const findDismissButton = () => wrapper.findComponent({ ref: 'dismiss' });
24
25
  const findTitle = () => wrapper.find('.gl-alert-title');
25
26
  const findBodyContainer = () => wrapper.find('.gl-alert-body');
@@ -31,6 +32,10 @@ describe('Alert component', () => {
31
32
  createComponent({ slots: { default: DummyComponent } });
32
33
  });
33
34
 
35
+ it('renders a variant icon', () => {
36
+ expect(findIcon().exists()).toBe(true);
37
+ });
38
+
34
39
  it('renders a dismiss button', () => {
35
40
  expect(findDismissButton().exists()).toBe(true);
36
41
  });
@@ -54,6 +59,12 @@ describe('Alert component', () => {
54
59
  });
55
60
  });
56
61
 
62
+ it('does not render a variant icon when showIcon = false', () => {
63
+ createComponent({ propsData: { showIcon: false } });
64
+
65
+ expect(findIcon().exists()).toBe(false);
66
+ });
67
+
57
68
  it('does not render a dismiss button when dismissible = false', () => {
58
69
  createComponent({ propsData: { dismissible: false } });
59
70
 
@@ -6,6 +6,7 @@ const template = `
6
6
  <gl-alert
7
7
  :title="title"
8
8
  :dismissible="dismissible"
9
+ :show-icon="showIcon"
9
10
  :dismiss-label="dismissLabel"
10
11
  :variant="variant"
11
12
  :primary-button-text="primaryButtonText"
@@ -21,6 +22,7 @@ const generateProps = ({
21
22
  title = defaultValue('title'),
22
23
  variant = defaultValue('variant'),
23
24
  dismissible = defaultValue('dismissible'),
25
+ showIcon = defaultValue('showIcon'),
24
26
  dismissLabel = defaultValue('dismissLabel'),
25
27
  primaryButtonText = defaultValue('primaryButtonText'),
26
28
  primaryButtonLink = defaultValue('primaryButtonLink'),
@@ -32,6 +34,7 @@ const generateProps = ({
32
34
  message: 'Lorem ipsum dolor sit amet',
33
35
  variant,
34
36
  dismissible,
37
+ showIcon,
35
38
  dismissLabel,
36
39
  primaryButtonText,
37
40
  primaryButtonLink,
@@ -92,6 +95,17 @@ TextLinks.parameters = {
92
95
  storyshots: { disable: true },
93
96
  };
94
97
 
98
+ export const NoIcon = () => ({
99
+ components: { GlAlert },
100
+ template: `
101
+ <gl-alert :show-icon="false">
102
+ Lorem ipsum dolor sit amet
103
+ </gl-alert>`,
104
+ });
105
+ NoIcon.parameters = {
106
+ storyshots: { disable: true },
107
+ };
108
+
95
109
  export const Variants = () => ({
96
110
  components: { GlAlert },
97
111
  variants: alertVariantOptions,
@@ -28,6 +28,14 @@ export default {
28
28
  required: false,
29
29
  default: true,
30
30
  },
31
+ /**
32
+ * Shows icon based on variant.
33
+ */
34
+ showIcon: {
35
+ type: Boolean,
36
+ required: false,
37
+ default: true,
38
+ },
31
39
  /**
32
40
  * Dismiss button's aria-label.
33
41
  */
@@ -165,10 +173,12 @@ export default {
165
173
  'gl-alert',
166
174
  { 'gl-alert-sticky': sticky },
167
175
  { 'gl-alert-not-dismissible': !dismissible },
176
+ { 'gl-alert-no-icon': !showIcon },
168
177
  variantClass,
169
178
  ]"
170
179
  >
171
180
  <gl-icon
181
+ v-if="showIcon"
172
182
  :name="iconName"
173
183
  :class="{ 'gl-alert-icon': true, 'gl-alert-icon-no-title': !title }"
174
184
  />
@@ -32,6 +32,7 @@
32
32
  &:focus:active {
33
33
  // allow the focus ring to be placed on the avatar image instead of parent anchor so that the focus ring takes the rounded shapes of the avatars
34
34
  box-shadow: none !important;
35
+ outline: none !important;
35
36
 
36
37
  .gl-avatar {
37
38
  @include gl-focus;
@@ -36,7 +36,7 @@
36
36
  &:active,
37
37
  &:focus,
38
38
  &:focus:active {
39
- @include gl-focus($gl-border-size-1, $white-transparent);
39
+ @include gl-focus;
40
40
  }
41
41
  }
42
42
  }
@@ -68,7 +68,7 @@ $breadcrumb-max-width: $grid-size * 16;
68
68
  &:active,
69
69
  &:focus,
70
70
  &:focus:active {
71
- @include gl-focus;
71
+ @include gl-focus($outline: true);
72
72
  }
73
73
  }
74
74
  }
@@ -76,7 +76,7 @@
76
76
  }
77
77
 
78
78
  &:focus {
79
- @include gl-focus($gl-border-size-2, $gray-400);
79
+ @include gl-focus($color: $gray-400);
80
80
  @include gl-bg-gray-50;
81
81
 
82
82
  .gl-icon {
@@ -86,7 +86,7 @@
86
86
 
87
87
  &:active,
88
88
  &.active {
89
- @include gl-focus($gl-border-size-2, $gray-600);
89
+ @include gl-focus($color: $gray-600);
90
90
  @include gl-bg-gray-100;
91
91
 
92
92
  .gl-icon {
@@ -94,11 +94,11 @@
94
94
  }
95
95
 
96
96
  &:focus {
97
- @include gl-focus($gl-border-size-2, $gray-600);
97
+ @include gl-focus($color: $gray-600);
98
+ }
98
99
 
99
- .gl-icon {
100
- @include gl-text-gray-900;
101
- }
100
+ &:focus .gl-icon {
101
+ @include gl-text-gray-900;
102
102
  }
103
103
  }
104
104
 
@@ -149,17 +149,17 @@
149
149
  }
150
150
 
151
151
  &:focus {
152
- @include gl-focus($gl-border-size-2, $blue-800);
152
+ @include gl-focus($color: $blue-800);
153
153
  @include gl-bg-blue-600;
154
154
  }
155
155
 
156
156
  &:active,
157
157
  &.active {
158
- @include gl-focus($gl-border-size-2, $blue-900);
158
+ @include gl-focus($color: $blue-900);
159
159
  @include gl-bg-blue-700;
160
160
 
161
161
  &:focus {
162
- @include gl-focus($gl-border-size-2, $blue-900);
162
+ @include gl-focus($color: $blue-900);
163
163
  }
164
164
  }
165
165
  }
@@ -180,18 +180,18 @@
180
180
 
181
181
  &:focus {
182
182
  @include gl-text-blue-700;
183
- @include gl-focus($gl-border-size-2, $blue-700);
183
+ @include gl-focus($color: $blue-700);
184
184
  @include gl-bg-blue-50;
185
185
  }
186
186
 
187
187
  &:active,
188
188
  &.active {
189
189
  @include gl-text-blue-900;
190
- @include gl-focus($gl-border-size-2, $blue-900);
190
+ @include gl-focus($color: $blue-900);
191
191
  @include gl-bg-blue-100;
192
192
 
193
193
  &:focus {
194
- @include gl-focus($gl-border-size-2, $blue-900);
194
+ @include gl-focus($color: $blue-900);
195
195
  }
196
196
  }
197
197
  }
@@ -205,17 +205,17 @@
205
205
  }
206
206
 
207
207
  &:focus {
208
- @include gl-focus($gl-border-size-2, $green-800);
208
+ @include gl-focus($color: $green-800);
209
209
  @include gl-bg-green-600;
210
210
  }
211
211
 
212
212
  &:active,
213
213
  &.active {
214
- @include gl-focus($gl-border-size-2, $green-900);
214
+ @include gl-focus($color: $green-900);
215
215
  @include gl-bg-green-700;
216
216
 
217
217
  &:focus {
218
- @include gl-focus($gl-border-size-2, $green-900);
218
+ @include gl-focus($color: $green-900);
219
219
  }
220
220
  }
221
221
  }
@@ -234,18 +234,18 @@
234
234
 
235
235
  &:focus {
236
236
  @include gl-text-green-700;
237
- @include gl-focus($gl-border-size-2, $green-700);
237
+ @include gl-focus($color: $green-700);
238
238
  @include gl-bg-green-50;
239
239
  }
240
240
 
241
241
  &:active,
242
242
  &.active {
243
243
  @include gl-text-green-900;
244
- @include gl-focus($gl-border-size-2, $green-900);
244
+ @include gl-focus($color: $green-900);
245
245
  @include gl-bg-green-100;
246
246
 
247
247
  &:focus {
248
- @include gl-focus($gl-border-size-2, $green-900);
248
+ @include gl-focus($color: $green-900);
249
249
  }
250
250
  }
251
251
  }
@@ -259,17 +259,17 @@
259
259
  }
260
260
 
261
261
  &:focus {
262
- @include gl-focus($gl-border-size-2, $orange-800);
262
+ @include gl-focus($color: $orange-800);
263
263
  @include gl-bg-orange-600;
264
264
  }
265
265
 
266
266
  &:active,
267
267
  &.active {
268
- @include gl-focus($gl-border-size-2, $orange-900);
268
+ @include gl-focus($color: $orange-900);
269
269
  @include gl-bg-orange-700;
270
270
 
271
271
  &:focus {
272
- @include gl-focus($gl-border-size-2, $orange-900);
272
+ @include gl-focus($color: $orange-900);
273
273
  }
274
274
  }
275
275
  }
@@ -288,18 +288,18 @@
288
288
 
289
289
  &:focus {
290
290
  @include gl-text-orange-700;
291
- @include gl-focus($gl-border-size-2, $orange-700);
291
+ @include gl-focus($color: $orange-700);
292
292
  @include gl-bg-orange-50;
293
293
  }
294
294
 
295
295
  &:active,
296
296
  &.active {
297
297
  @include gl-text-orange-900;
298
- @include gl-focus($gl-border-size-2, $orange-900);
298
+ @include gl-focus($color: $orange-900);
299
299
  @include gl-bg-orange-100;
300
300
 
301
301
  &:focus {
302
- @include gl-focus($gl-border-size-2, $orange-900);
302
+ @include gl-focus($color: $orange-900);
303
303
  }
304
304
  }
305
305
  }
@@ -313,17 +313,17 @@
313
313
  }
314
314
 
315
315
  &:focus {
316
- @include gl-focus($gl-border-size-2, $red-800);
316
+ @include gl-focus($color: $red-800);
317
317
  @include gl-bg-red-600;
318
318
  }
319
319
 
320
320
  &:active,
321
321
  &.active {
322
- @include gl-focus($gl-border-size-2, $red-900);
322
+ @include gl-focus($color: $red-900);
323
323
  @include gl-bg-red-700;
324
324
 
325
325
  &:focus {
326
- @include gl-focus($gl-border-size-2, $red-900);
326
+ @include gl-focus($color: $red-900);
327
327
  }
328
328
  }
329
329
  }
@@ -342,18 +342,18 @@
342
342
 
343
343
  &:focus {
344
344
  @include gl-text-red-700;
345
- @include gl-focus($gl-border-size-2, $red-700);
345
+ @include gl-focus($color: $red-700);
346
346
  @include gl-bg-red-50;
347
347
  }
348
348
 
349
349
  &:active,
350
350
  &.active {
351
351
  @include gl-text-red-900;
352
- @include gl-focus($gl-border-size-2, $red-900);
352
+ @include gl-focus($color: $red-900);
353
353
  @include gl-bg-red-100;
354
354
 
355
355
  &:focus {
356
- @include gl-focus($gl-border-size-2, $red-900);
356
+ @include gl-focus($color: $red-900);
357
357
  }
358
358
  }
359
359
  }
@@ -417,20 +417,20 @@
417
417
  }
418
418
 
419
419
  &:focus {
420
- @include gl-focus($gl-border-size-1, $gray-400);
420
+ @include gl-focus($color: $gray-400);
421
421
  outline: 3px dotted $gray-50;
422
422
  outline-offset: (-$gl-border-size-1);
423
423
  }
424
424
 
425
425
  &:active,
426
426
  &.active {
427
- @include gl-focus($gl-border-size-1, $gray-600);
427
+ @include gl-focus($color: $gray-600);
428
428
  outline: 3px dotted $gray-100;
429
429
  outline-offset: (-$gl-border-size-1);
430
430
  @include gl-bg-gray-100;
431
431
 
432
432
  &:focus {
433
- @include gl-focus($gl-border-size-1, $gray-600);
433
+ @include gl-focus($color: $gray-600);
434
434
  outline: 3px dotted $gray-100;
435
435
  outline-offset: (-$gl-border-size-1);
436
436
  }
@@ -482,7 +482,7 @@
482
482
  @include gl-text-blue-500;
483
483
  @include gl-py-0;
484
484
  @include gl-px-0;
485
- box-shadow: none;
485
+ @include gl-shadow-none;
486
486
 
487
487
  &:hover {
488
488
  @include gl-bg-transparent;
@@ -0,0 +1,7 @@
1
+ .carousel-control-prev,
2
+ .carousel-control-next,
3
+ .carousel-indicators li {
4
+ &:focus {
5
+ @include gl-focus;
6
+ }
7
+ }
@@ -38,6 +38,10 @@ $gl-datepicker-width: $grid-size * 30;
38
38
  @include gl-align-items-center;
39
39
  @include gl-pointer-events-none;
40
40
  @include gl-px-2;
41
+
42
+ .gl-button.gl-button {
43
+ border-radius: 0.0075rem;
44
+ }
41
45
  }
42
46
 
43
47
  .gl-datepicker-theme {
@@ -121,6 +121,10 @@
121
121
 
122
122
  &.gl-button {
123
123
  @include gl-px-3;
124
+
125
+ &.btn-sm {
126
+ @include gl-px-2;
127
+ }
124
128
  }
125
129
  }
126
130
 
@@ -172,6 +176,10 @@
172
176
  .dropdown-icon {
173
177
  @include gl-mr-0;
174
178
  }
179
+
180
+ &.btn-sm .dropdown-chevron {
181
+ @include gl-mx-0;
182
+ }
175
183
  }
176
184
 
177
185
  .split-content-button {
@@ -6,7 +6,6 @@
6
6
  @include gl-font-base;
7
7
  @include gl-font-weight-normal;
8
8
  @include gl-line-height-normal;
9
- @include gl-overflow-hidden;
10
9
  @include gl-px-5;
11
10
  @include gl-py-0;
12
11
  @include gl-relative;
@@ -65,10 +65,10 @@
65
65
  }
66
66
  }
67
67
 
68
- .custom-control-input:not(:disabled) ~ .custom-control-label:hover,
69
68
  .custom-control-input:not(:disabled):focus ~ .custom-control-label {
70
69
  &::before {
71
70
  @include gl-border-gray-500;
71
+ @include gl-focus;
72
72
  }
73
73
  }
74
74
 
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  &:not(.form-control-plaintext):focus {
28
- @include gl-focus($gl-border-size-1, $gray-900);
28
+ @include gl-focus($color: $gray-900);
29
29
  @include gl-text-gray-900;
30
30
  }
31
31
 
@@ -34,7 +34,7 @@
34
34
  background-image: none;
35
35
 
36
36
  &:focus {
37
- @include gl-focus($gl-border-size-1, $red-500);
37
+ @include gl-focus($color: $red-500);
38
38
  }
39
39
  }
40
40
 
@@ -25,7 +25,7 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
25
25
  &:active,
26
26
  &:focus,
27
27
  &:focus:active {
28
- @include gl-focus($gl-border-size-1, $gray-900, true);
28
+ @include gl-focus($color: $gray-900, $important: true);
29
29
  }
30
30
 
31
31
  &:disabled {
@@ -44,7 +44,7 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
44
44
  @include gl-inset-border-1-red-400;
45
45
 
46
46
  &:focus {
47
- @include gl-focus($gl-border-size-1, $red-500, true);
47
+ @include gl-focus($color: $red-500, $important: true);
48
48
  }
49
49
 
50
50
  &:hover {
@@ -17,7 +17,7 @@ $label-close-button: '.gl-label-close.gl-button';
17
17
  }
18
18
 
19
19
  &:focus-within {
20
- @include gl-focus($gl-border-size-2, var(--label-background-color), true);
20
+ @include gl-focus($color: var(--label-background-color), $important: true);
21
21
  }
22
22
 
23
23
  .gl-label-link {
@@ -33,6 +33,7 @@ $label-close-button: '.gl-label-close.gl-button';
33
33
  &:hover {
34
34
  @include gl-reset-color;
35
35
  @include gl-shadow-none;
36
+ @include gl-outline-none;
36
37
 
37
38
  .gl-label-text-scoped {
38
39
  @include gl-text-decoration-underline;
@@ -14,6 +14,6 @@
14
14
  &:focus,
15
15
  &:focus:active {
16
16
  @include gl-text-decoration-underline;
17
- @include gl-focus;
17
+ @include gl-focus($outline: true, $outline-offset: $outline-width);
18
18
  }
19
19
  }
@@ -27,6 +27,21 @@ export const DefaultLink = makeStory({
27
27
  });
28
28
  DefaultLink.args = generateProps();
29
29
 
30
+ export const LongLink = makeStory({
31
+ components: { GlLink },
32
+ template: `
33
+ <gl-link
34
+ :href="href"
35
+ :target="target"
36
+ >
37
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
38
+ Quamquam tu hanc copiosiorem etiam soles dicere.
39
+ Ergo illi intellegunt quid Epicurus dicat, ego non intellego? Claudii libidini, qui tum erat summo ne imperio, dederetur.
40
+ Si quicquam extra virtutem habeatur in bonis. Nunc omni virtuti vitium contrario nomine opponitur. Duo Reges: constructio interrete.
41
+ </gl-link>`,
42
+ });
43
+ LongLink.args = generateProps();
44
+
30
45
  export default {
31
46
  title: 'base/link',
32
47
  component: GlLink,
@@ -0,0 +1,7 @@
1
+ .nav {
2
+ &-link {
3
+ &:focus-visible {
4
+ @include gl-focus;
5
+ }
6
+ }
7
+ }
@@ -19,23 +19,25 @@
19
19
 
20
20
  &:not(.active):hover {
21
21
  @include gl-text-gray-900;
22
- @include gl-tmp-button-hover($gray-400, $gray-50);
23
- @include gl-z-index-0;
22
+ box-shadow: inset 0 0 0 1px $gray-400;
23
+ border-color: $gray-400;
24
+ background: $gray-50;
25
+ @include gl-z-index-1;
24
26
  }
25
27
 
26
28
  &:not(.active):focus {
27
- @include gl-focus($gl-border-size-2, $gray-400);
28
29
  @include gl-bg-gray-50;
29
30
  }
30
31
 
31
32
  &:not(.active):active,
32
33
  &:not(.active).active {
33
- @include gl-focus($gl-border-size-2, $gray-600);
34
34
  @include gl-bg-gray-100;
35
+ }
35
36
 
36
- &:focus {
37
- @include gl-focus($gl-border-size-2, $gray-600);
38
- }
37
+ &:not(.active):focus,
38
+ &:not(.active):active,
39
+ &:not(.active).active {
40
+ @include gl-focus();
39
41
  }
40
42
  }
41
43
 
@@ -45,6 +47,11 @@
45
47
  @include gl-border-blue-600;
46
48
  @include gl-text-white;
47
49
  @include gl-z-index-2;
50
+ @include gl-shadow-none;
51
+
52
+ &:focus {
53
+ @include gl-focus();
54
+ }
48
55
  }
49
56
 
50
57
  &.disabled .page-link {