@gitlab/ui 110.1.0 → 111.1.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 (44) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/base/link/link.js +254 -10
  3. package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -2
  4. package/dist/components/charts/heatmap/heatmap.js +4 -4
  5. package/dist/components/charts/legend/legend.js +1 -2
  6. package/dist/components/charts/line/line.js +1 -2
  7. package/dist/directives/safe_link/safe_link.js +6 -4
  8. package/dist/index.css +1 -1
  9. package/dist/index.css.map +1 -1
  10. package/dist/tokens/build/js/tokens.dark.js +8 -1
  11. package/dist/tokens/build/js/tokens.js +8 -1
  12. package/dist/tokens/css/tokens.css +7 -0
  13. package/dist/tokens/css/tokens.dark.css +7 -0
  14. package/dist/tokens/js/tokens.dark.js +7 -0
  15. package/dist/tokens/js/tokens.js +7 -0
  16. package/dist/tokens/json/tokens.dark.json +171 -0
  17. package/dist/tokens/json/tokens.json +171 -0
  18. package/dist/tokens/scss/_tokens.dark.scss +7 -0
  19. package/dist/tokens/scss/_tokens.scss +7 -0
  20. package/dist/tokens/scss/_tokens_custom_properties.scss +7 -0
  21. package/dist/utils/charts/theme.js +31 -29
  22. package/dist/utils/constants.js +3 -1
  23. package/dist/utils/is_slot_empty.js +1 -1
  24. package/package.json +6 -14
  25. package/src/components/base/link/link.md +109 -0
  26. package/src/components/base/link/link.vue +283 -18
  27. package/src/components/charts/discrete_scatter/discrete_scatter.vue +1 -2
  28. package/src/components/charts/heatmap/heatmap.vue +4 -4
  29. package/src/components/charts/legend/legend.vue +1 -2
  30. package/src/components/charts/line/line.vue +1 -2
  31. package/src/directives/safe_link/safe_link.js +7 -3
  32. package/src/tokens/build/css/tokens.css +7 -0
  33. package/src/tokens/build/css/tokens.dark.css +7 -0
  34. package/src/tokens/build/js/tokens.dark.js +7 -0
  35. package/src/tokens/build/js/tokens.js +7 -0
  36. package/src/tokens/build/json/tokens.dark.json +171 -0
  37. package/src/tokens/build/json/tokens.json +171 -0
  38. package/src/tokens/build/scss/_tokens.dark.scss +7 -0
  39. package/src/tokens/build/scss/_tokens.scss +7 -0
  40. package/src/tokens/build/scss/_tokens_custom_properties.scss +7 -0
  41. package/src/tokens/contextual/chart.tokens.json +68 -0
  42. package/src/utils/charts/theme.js +150 -153
  43. package/src/utils/constants.js +3 -0
  44. package/src/utils/is_slot_empty.js +1 -2
@@ -13350,6 +13350,177 @@
13350
13350
  }
13351
13351
  }
13352
13352
  },
13353
+ "chart": {
13354
+ "axis": {
13355
+ "pointer": {
13356
+ "color": {
13357
+ "$value": "#626168",
13358
+ "$type": "color",
13359
+ "$description": "Used in charts for the color of the reference line and axis value under mouse pointer.",
13360
+ "filePath": "src/tokens/contextual/chart.tokens.json",
13361
+ "isSource": true,
13362
+ "original": {
13363
+ "$value": "{icon.color.subtle}",
13364
+ "$type": "color",
13365
+ "$description": "Used in charts for the color of the reference line and axis value under mouse pointer."
13366
+ },
13367
+ "name": "CHART_AXIS_POINTER_COLOR",
13368
+ "attributes": {},
13369
+ "path": [
13370
+ "chart",
13371
+ "axis",
13372
+ "pointer",
13373
+ "color"
13374
+ ]
13375
+ }
13376
+ },
13377
+ "line": {
13378
+ "color": {
13379
+ "$value": "#bfbfc3",
13380
+ "$type": "color",
13381
+ "$description": "Used in charts for axis line color.",
13382
+ "filePath": "src/tokens/contextual/chart.tokens.json",
13383
+ "isSource": true,
13384
+ "original": {
13385
+ "$value": {
13386
+ "default": "{color.neutral.200}",
13387
+ "dark": "{color.neutral.700}"
13388
+ },
13389
+ "$type": "color",
13390
+ "$description": "Used in charts for axis line color."
13391
+ },
13392
+ "name": "CHART_AXIS_LINE_COLOR",
13393
+ "attributes": {},
13394
+ "path": [
13395
+ "chart",
13396
+ "axis",
13397
+ "line",
13398
+ "color"
13399
+ ]
13400
+ }
13401
+ },
13402
+ "text": {
13403
+ "color": {
13404
+ "$value": "#626168",
13405
+ "$type": "color",
13406
+ "$description": "Used in charts for the text color of axis titles and labels.",
13407
+ "filePath": "src/tokens/contextual/chart.tokens.json",
13408
+ "isSource": true,
13409
+ "original": {
13410
+ "$value": "{text.color.subtle}",
13411
+ "$type": "color",
13412
+ "$description": "Used in charts for the text color of axis titles and labels."
13413
+ },
13414
+ "name": "CHART_AXIS_TEXT_COLOR",
13415
+ "attributes": {},
13416
+ "path": [
13417
+ "chart",
13418
+ "axis",
13419
+ "text",
13420
+ "color"
13421
+ ]
13422
+ }
13423
+ }
13424
+ },
13425
+ "threshold": {
13426
+ "area": {
13427
+ "color": {
13428
+ "$value": "rgba(221,43,14,0.1)",
13429
+ "$type": "color",
13430
+ "$description": "Used in charts to delineate a threshold area in a chart.",
13431
+ "filePath": "src/tokens/contextual/chart.tokens.json",
13432
+ "isSource": true,
13433
+ "original": {
13434
+ "$value": "rgba(221,43,14,0.1)",
13435
+ "$type": "color",
13436
+ "$description": "Used in charts to delineate a threshold area in a chart."
13437
+ },
13438
+ "name": "CHART_THRESHOLD_AREA_COLOR",
13439
+ "attributes": {},
13440
+ "path": [
13441
+ "chart",
13442
+ "threshold",
13443
+ "area",
13444
+ "color"
13445
+ ]
13446
+ }
13447
+ },
13448
+ "line": {
13449
+ "color": {
13450
+ "$value": "#dd2b0e",
13451
+ "$type": "color",
13452
+ "$description": "Used in charts to divide a threshold area in a chart from other data.",
13453
+ "filePath": "src/tokens/contextual/chart.tokens.json",
13454
+ "isSource": true,
13455
+ "original": {
13456
+ "$value": {
13457
+ "default": "{color.red.500}",
13458
+ "dark": "{color.red.600}"
13459
+ },
13460
+ "$type": "color",
13461
+ "$description": "Used in charts to divide a threshold area in a chart from other data."
13462
+ },
13463
+ "name": "CHART_THRESHOLD_LINE_COLOR",
13464
+ "attributes": {},
13465
+ "path": [
13466
+ "chart",
13467
+ "threshold",
13468
+ "line",
13469
+ "color"
13470
+ ]
13471
+ }
13472
+ }
13473
+ },
13474
+ "zoom": {
13475
+ "filler": {
13476
+ "color": {
13477
+ "$value": "rgba(05, 05, 06, 0.08)",
13478
+ "$type": "color",
13479
+ "$description": "Used in charts for the overlay color when zooming in on a specific area of data.",
13480
+ "filePath": "src/tokens/contextual/chart.tokens.json",
13481
+ "isSource": true,
13482
+ "original": {
13483
+ "$value": {
13484
+ "default": "{color.alpha.dark.8}",
13485
+ "dark": "{color.alpha.light.16}"
13486
+ },
13487
+ "$type": "color",
13488
+ "$description": "Used in charts for the overlay color when zooming in on a specific area of data."
13489
+ },
13490
+ "name": "CHART_ZOOM_FILLER_COLOR",
13491
+ "attributes": {},
13492
+ "path": [
13493
+ "chart",
13494
+ "zoom",
13495
+ "filler",
13496
+ "color"
13497
+ ]
13498
+ }
13499
+ },
13500
+ "handle": {
13501
+ "color": {
13502
+ "$value": "#626168",
13503
+ "$type": "color",
13504
+ "$description": "Used in charts for the handle color when zooming in on a specific area of data.",
13505
+ "filePath": "src/tokens/contextual/chart.tokens.json",
13506
+ "isSource": true,
13507
+ "original": {
13508
+ "$value": "{icon.color.subtle}",
13509
+ "$type": "color",
13510
+ "$description": "Used in charts for the handle color when zooming in on a specific area of data."
13511
+ },
13512
+ "name": "CHART_ZOOM_HANDLE_COLOR",
13513
+ "attributes": {},
13514
+ "path": [
13515
+ "chart",
13516
+ "zoom",
13517
+ "handle",
13518
+ "color"
13519
+ ]
13520
+ }
13521
+ }
13522
+ }
13523
+ },
13353
13524
  "datepicker": {
13354
13525
  "background": {
13355
13526
  "color": {
@@ -242,6 +242,7 @@ $gl-avatar-fallback-background-color-blue: #9dc7f13d; // Blue background for ava
242
242
  $gl-avatar-fallback-background-color-green: #91d4a83d; // Green background for avatar fallback with no particular meaning.
243
243
  $gl-avatar-fallback-background-color-orange: #e9be743d; // Orange background for avatar fallback with no particular meaning.
244
244
  $gl-avatar-fallback-background-color-neutral: #bfbfc33d; // Neutral background for avatar fallback with no particular meaning.
245
+ $gl-chart-threshold-area-color: rgba(221,43,14,0.1); // Used in charts to delineate a threshold area in a chart.
245
246
  $gl-illustration-stroke-color-default: #e3e3e8; // Default stroke color to define shape and provide essential detail.
246
247
  $gl-illustration-stroke-width-default: 0.09375rem; // Default stroke width to define shape and provide essential detail.
247
248
  $gl-illustration-fill-color-default: #423f4f; // Default fill color for an element where specific meaning or emphasis is not required.
@@ -748,6 +749,9 @@ $gl-button-selected-border-color-active: $gl-color-alpha-0; // Used for the bord
748
749
  $gl-button-disabled-foreground-color: $gl-color-neutral-400; // Used for the foreground of a disabled button.
749
750
  $gl-button-disabled-background-color: rgba(137, 136, 141, 0.16); // Used for the background of a disabled button.
750
751
  $gl-button-disabled-border-color: $gl-color-alpha-0; // Used for the border of a disabled button.
752
+ $gl-chart-axis-line-color: $gl-color-neutral-700; // Used in charts for axis line color.
753
+ $gl-chart-threshold-line-color: $gl-color-red-600; // Used in charts to divide a threshold area in a chart from other data.
754
+ $gl-chart-zoom-filler-color: $gl-color-alpha-light-16; // Used in charts for the overlay color when zooming in on a specific area of data.
751
755
  $gl-datepicker-background-color: $gl-color-neutral-900; // Used for the background color of datepicker.
752
756
  $gl-dropdown-option-background-color-unselected-default: $gl-action-neutral-background-color-default; // Used for the background of an unselected dropdown option in the default state.
753
757
  $gl-dropdown-option-background-color-unselected-hover: $gl-action-neutral-background-color-hover; // Used for the background of an unselected dropdown option in the hover state.
@@ -951,6 +955,7 @@ $gl-button-selected-foreground-color-default: $gl-color-neutral-900; // Used for
951
955
  $gl-button-selected-background-color-hover: $gl-color-neutral-200; // Used for the background of a selected button in the hover state.
952
956
  $gl-button-selected-background-color-active: $gl-color-neutral-400; // Used for the background of a selected button in the active state.
953
957
  $gl-button-selected-border-color-focus: $gl-button-selected-border-color-hover; // Used for the border of a selected button in the focus state.
958
+ $gl-chart-axis-text-color: $gl-text-color-subtle; // Used in charts for the text color of axis titles and labels.
954
959
  $gl-datepicker-date-text-color-selected: $gl-control-indicator-color-selected; // Used for the datepicker date text color state indicators.
955
960
  $gl-dropdown-background-color: $gl-background-color-overlap; // Used for the background of a dropdown.
956
961
  $gl-dropdown-border-color: $gl-border-color-default; // Used for the border of a dropdown.
@@ -1025,6 +1030,8 @@ $gl-button-selected-foreground-color-hover: $gl-color-neutral-950; // Used for t
1025
1030
  $gl-button-selected-foreground-color-focus: $gl-color-neutral-950; // Used for the foreground of a selected button in the focus state.
1026
1031
  $gl-button-selected-foreground-color-active: $gl-color-neutral-950; // Used for the foreground of a selected button in the active state.
1027
1032
  $gl-button-selected-background-color-focus: $gl-color-neutral-200; // Used for the background of a selected button in the focus state.
1033
+ $gl-chart-axis-pointer-color: $gl-icon-color-subtle; // Used in charts for the color of the reference line and axis value under mouse pointer.
1034
+ $gl-chart-zoom-handle-color: $gl-icon-color-subtle; // Used in charts for the handle color when zooming in on a specific area of data.
1028
1035
  $gl-dropdown-option-text-color-hover: $gl-action-neutral-foreground-color-hover; // Used for the text of a dropdown option in the hover state.
1029
1036
  $gl-dropdown-option-text-color-focus: $gl-action-neutral-foreground-color-focus; // Used for the text of a dropdown option in the focus state.
1030
1037
  $gl-dropdown-option-text-color-active: $gl-action-neutral-foreground-color-active; // Used for the text of a dropdown option in the active state.
@@ -242,6 +242,7 @@ $gl-avatar-fallback-background-color-blue: #9dc7f13d; // Blue background for ava
242
242
  $gl-avatar-fallback-background-color-green: #91d4a83d; // Green background for avatar fallback with no particular meaning.
243
243
  $gl-avatar-fallback-background-color-orange: #e9be743d; // Orange background for avatar fallback with no particular meaning.
244
244
  $gl-avatar-fallback-background-color-neutral: #bfbfc33d; // Neutral background for avatar fallback with no particular meaning.
245
+ $gl-chart-threshold-area-color: rgba(221,43,14,0.1); // Used in charts to delineate a threshold area in a chart.
245
246
  $gl-illustration-stroke-color-default: #171321; // Default stroke color to define shape and provide essential detail.
246
247
  $gl-illustration-stroke-width-default: 0.125rem; // Default stroke width to define shape and provide essential detail.
247
248
  $gl-illustration-fill-color-default: #fff; // Default fill color for an element where specific meaning or emphasis is not required.
@@ -748,6 +749,9 @@ $gl-button-selected-border-color-active: $gl-color-neutral-600; // Used for the
748
749
  $gl-button-disabled-foreground-color: $gl-color-neutral-500; // Used for the foreground of a disabled button.
749
750
  $gl-button-disabled-background-color: $gl-color-neutral-10; // Used for the background of a disabled button.
750
751
  $gl-button-disabled-border-color: $gl-color-neutral-100; // Used for the border of a disabled button.
752
+ $gl-chart-axis-line-color: $gl-color-neutral-200; // Used in charts for axis line color.
753
+ $gl-chart-threshold-line-color: $gl-color-red-500; // Used in charts to divide a threshold area in a chart from other data.
754
+ $gl-chart-zoom-filler-color: $gl-color-alpha-dark-8; // Used in charts for the overlay color when zooming in on a specific area of data.
751
755
  $gl-datepicker-background-color: $gl-color-neutral-0; // Used for the background color of datepicker.
752
756
  $gl-dropdown-option-background-color-unselected-default: $gl-action-neutral-background-color-default; // Used for the background of an unselected dropdown option in the default state.
753
757
  $gl-dropdown-option-background-color-unselected-hover: $gl-action-neutral-background-color-hover; // Used for the background of an unselected dropdown option in the hover state.
@@ -951,6 +955,7 @@ $gl-button-selected-foreground-color-default: $gl-button-default-primary-foregro
951
955
  $gl-button-selected-background-color-hover: $gl-button-default-primary-background-color-hover; // Used for the background of a selected button in the hover state.
952
956
  $gl-button-selected-background-color-active: $gl-button-default-primary-background-color-active; // Used for the background of a selected button in the active state.
953
957
  $gl-button-selected-border-color-focus: $gl-button-selected-border-color-hover; // Used for the border of a selected button in the focus state.
958
+ $gl-chart-axis-text-color: $gl-text-color-subtle; // Used in charts for the text color of axis titles and labels.
954
959
  $gl-datepicker-date-text-color-selected: $gl-control-indicator-color-selected; // Used for the datepicker date text color state indicators.
955
960
  $gl-dropdown-background-color: $gl-background-color-overlap; // Used for the background of a dropdown.
956
961
  $gl-dropdown-border-color: $gl-border-color-strong; // Used for the border of a dropdown.
@@ -1025,6 +1030,8 @@ $gl-button-selected-foreground-color-hover: $gl-button-default-primary-foregroun
1025
1030
  $gl-button-selected-foreground-color-focus: $gl-button-default-primary-foreground-color-focus; // Used for the foreground of a selected button in the focus state.
1026
1031
  $gl-button-selected-foreground-color-active: $gl-button-default-primary-foreground-color-active; // Used for the foreground of a selected button in the active state.
1027
1032
  $gl-button-selected-background-color-focus: $gl-button-default-primary-background-color-focus; // Used for the background of a selected button in the focus state.
1033
+ $gl-chart-axis-pointer-color: $gl-icon-color-subtle; // Used in charts for the color of the reference line and axis value under mouse pointer.
1034
+ $gl-chart-zoom-handle-color: $gl-icon-color-subtle; // Used in charts for the handle color when zooming in on a specific area of data.
1028
1035
  $gl-dropdown-option-text-color-hover: $gl-action-neutral-foreground-color-hover; // Used for the text of a dropdown option in the hover state.
1029
1036
  $gl-dropdown-option-text-color-focus: $gl-action-neutral-foreground-color-focus; // Used for the text of a dropdown option in the focus state.
1030
1037
  $gl-dropdown-option-text-color-active: $gl-action-neutral-foreground-color-active; // Used for the text of a dropdown option in the active state.
@@ -624,6 +624,13 @@ $gl-button-selected-border-color-active: var(--gl-button-selected-border-color-a
624
624
  $gl-button-disabled-foreground-color: var(--gl-button-disabled-foreground-color);
625
625
  $gl-button-disabled-background-color: var(--gl-button-disabled-background-color);
626
626
  $gl-button-disabled-border-color: var(--gl-button-disabled-border-color);
627
+ $gl-chart-axis-pointer-color: var(--gl-chart-axis-pointer-color);
628
+ $gl-chart-axis-line-color: var(--gl-chart-axis-line-color);
629
+ $gl-chart-axis-text-color: var(--gl-chart-axis-text-color);
630
+ $gl-chart-threshold-area-color: var(--gl-chart-threshold-area-color);
631
+ $gl-chart-threshold-line-color: var(--gl-chart-threshold-line-color);
632
+ $gl-chart-zoom-filler-color: var(--gl-chart-zoom-filler-color);
633
+ $gl-chart-zoom-handle-color: var(--gl-chart-zoom-handle-color);
627
634
  $gl-datepicker-background-color: var(--gl-datepicker-background-color);
628
635
  $gl-datepicker-date-text-color-selected: var(--gl-datepicker-date-text-color-selected);
629
636
  $gl-dropdown-background-color: var(--gl-dropdown-background-color);
@@ -1,13 +1,12 @@
1
- import { GRAY_600, GRAY_200, GRAY_50, GRAY_300, GRAY_100, DATA_VIZ_BLUE_200, DATA_VIZ_BLUE_400, DATA_VIZ_BLUE_600, DATA_VIZ_BLUE_800, GRAY_900, GRAY_500, DATA_VIZ_BLUE_500, DATA_VIZ_BLUE_900, DATA_VIZ_ORANGE_500, DATA_VIZ_ORANGE_600, DATA_VIZ_AQUA_500, DATA_VIZ_GREEN_600, DATA_VIZ_MAGENTA_500, DATA_VIZ_BLUE_700, DATA_VIZ_ORANGE_800, DATA_VIZ_AQUA_700, DATA_VIZ_GREEN_800, DATA_VIZ_MAGENTA_700, DATA_VIZ_ORANGE_950, DATA_VIZ_AQUA_900, DATA_VIZ_GREEN_950, DATA_VIZ_MAGENTA_900, DATA_VIZ_ORANGE_700, DATA_VIZ_AQUA_600, DATA_VIZ_GREEN_700, DATA_VIZ_MAGENTA_600, DATA_VIZ_ORANGE_900, DATA_VIZ_AQUA_800, DATA_VIZ_GREEN_900, DATA_VIZ_MAGENTA_800, DATA_VIZ_BLUE_950, DATA_VIZ_AQUA_950, DATA_VIZ_GREEN_500, DATA_VIZ_MAGENTA_950, DATA_VIZ_ORANGE_400, DATA_VIZ_GREEN_400, DATA_VIZ_BLUE_300, DATA_VIZ_ORANGE_200, DATA_VIZ_AQUA_300, DATA_VIZ_GREEN_200, DATA_VIZ_MAGENTA_300, DATA_VIZ_BLUE_100, DATA_VIZ_ORANGE_50, DATA_VIZ_AQUA_100, DATA_VIZ_GREEN_50, DATA_VIZ_MAGENTA_100, DATA_VIZ_ORANGE_300, DATA_VIZ_AQUA_400, DATA_VIZ_GREEN_300, DATA_VIZ_MAGENTA_400, DATA_VIZ_ORANGE_100, DATA_VIZ_AQUA_200, DATA_VIZ_GREEN_100, DATA_VIZ_MAGENTA_200, DATA_VIZ_BLUE_50, DATA_VIZ_AQUA_50, DATA_VIZ_MAGENTA_50, RED_500, WHITE } from '../../tokens/build/js/tokens';
1
+ import { GL_COLOR_NEUTRAL_100, GL_COLOR_DATA_BLUE_200, GL_COLOR_DATA_BLUE_400, GL_COLOR_DATA_BLUE_600, GL_COLOR_DATA_BLUE_800, GL_COLOR_NEUTRAL_900, GL_COLOR_NEUTRAL_500, GL_COLOR_DATA_BLUE_500, GL_COLOR_DATA_BLUE_900, GL_COLOR_DATA_ORANGE_500, GL_COLOR_DATA_ORANGE_600, GL_COLOR_DATA_AQUA_500, GL_COLOR_DATA_GREEN_600, GL_COLOR_DATA_MAGENTA_500, GL_COLOR_DATA_BLUE_700, GL_COLOR_DATA_ORANGE_800, GL_COLOR_DATA_AQUA_700, GL_COLOR_DATA_GREEN_800, GL_COLOR_DATA_MAGENTA_700, GL_COLOR_DATA_ORANGE_950, GL_COLOR_DATA_AQUA_900, GL_COLOR_DATA_GREEN_950, GL_COLOR_DATA_MAGENTA_900, GL_COLOR_DATA_ORANGE_700, GL_COLOR_DATA_AQUA_600, GL_COLOR_DATA_GREEN_700, GL_COLOR_DATA_MAGENTA_600, GL_COLOR_DATA_ORANGE_900, GL_COLOR_DATA_AQUA_800, GL_COLOR_DATA_GREEN_900, GL_COLOR_DATA_MAGENTA_800, GL_COLOR_DATA_BLUE_950, GL_COLOR_DATA_AQUA_950, GL_COLOR_DATA_GREEN_500, GL_COLOR_DATA_MAGENTA_950, GL_COLOR_DATA_ORANGE_400, GL_COLOR_DATA_GREEN_400, GL_COLOR_DATA_BLUE_300, GL_COLOR_DATA_ORANGE_200, GL_COLOR_DATA_AQUA_300, GL_COLOR_DATA_GREEN_200, GL_COLOR_DATA_MAGENTA_300, GL_COLOR_DATA_BLUE_100, GL_COLOR_DATA_ORANGE_50, GL_COLOR_DATA_AQUA_100, GL_COLOR_DATA_GREEN_50, GL_COLOR_DATA_MAGENTA_100, GL_COLOR_DATA_ORANGE_300, GL_COLOR_DATA_AQUA_400, GL_COLOR_DATA_GREEN_300, GL_COLOR_DATA_MAGENTA_400, GL_COLOR_DATA_ORANGE_100, GL_COLOR_DATA_AQUA_200, GL_COLOR_DATA_GREEN_100, GL_COLOR_DATA_MAGENTA_200, GL_COLOR_DATA_BLUE_50, GL_COLOR_DATA_AQUA_50, GL_COLOR_DATA_MAGENTA_50, GL_COLOR_NEUTRAL_50 } from '../../tokens/build/js/tokens';
2
2
  import { scrollHandleSvgPath, marqueeSelectionSvgPath, redoSvgPath, clearAllSvgPath, downloadSvgPath } from '../svgs/svg_paths';
3
- import { hexToRgba } from '../utils';
4
3
 
5
4
  const GL_BORDER_RADIUS_BASE = '0.25rem';
6
5
  const themeName = 'gitlab';
7
- const heatmapHues = [GRAY_100, DATA_VIZ_BLUE_200, DATA_VIZ_BLUE_400, DATA_VIZ_BLUE_600, DATA_VIZ_BLUE_800];
8
- const gaugeNeutralHues = [GRAY_900, GRAY_500];
9
- const gaugeSafeHues = [DATA_VIZ_BLUE_500, DATA_VIZ_BLUE_900];
10
- const gaugeWarningHue = DATA_VIZ_ORANGE_500;
6
+ const heatmapHues = [GL_COLOR_NEUTRAL_100, GL_COLOR_DATA_BLUE_200, GL_COLOR_DATA_BLUE_400, GL_COLOR_DATA_BLUE_600, GL_COLOR_DATA_BLUE_800];
7
+ const gaugeNeutralHues = [GL_COLOR_NEUTRAL_900, GL_COLOR_NEUTRAL_500];
8
+ const gaugeSafeHues = [GL_COLOR_DATA_BLUE_500, GL_COLOR_DATA_BLUE_900];
9
+ const gaugeWarningHue = GL_COLOR_DATA_ORANGE_500;
11
10
 
12
11
  /**
13
12
  * The default palette is based on the Categorical data palette
@@ -15,15 +14,15 @@ const gaugeWarningHue = DATA_VIZ_ORANGE_500;
15
14
  * differentiate qualitative data, and lightness to differentiate quantitive data.
16
15
  * More info: https://design.gitlab.com/data-visualization/color#categorical-data
17
16
  */
18
- const colorPaletteDefault = [DATA_VIZ_BLUE_500, DATA_VIZ_ORANGE_600, DATA_VIZ_AQUA_500, DATA_VIZ_GREEN_600, DATA_VIZ_MAGENTA_500, DATA_VIZ_BLUE_700, DATA_VIZ_ORANGE_800, DATA_VIZ_AQUA_700, DATA_VIZ_GREEN_800, DATA_VIZ_MAGENTA_700, DATA_VIZ_BLUE_900, DATA_VIZ_ORANGE_950, DATA_VIZ_AQUA_900, DATA_VIZ_GREEN_950, DATA_VIZ_MAGENTA_900, DATA_VIZ_BLUE_600, DATA_VIZ_ORANGE_700, DATA_VIZ_AQUA_600, DATA_VIZ_GREEN_700, DATA_VIZ_MAGENTA_600, DATA_VIZ_BLUE_800, DATA_VIZ_ORANGE_900, DATA_VIZ_AQUA_800, DATA_VIZ_GREEN_900, DATA_VIZ_MAGENTA_800, DATA_VIZ_BLUE_950, DATA_VIZ_ORANGE_500, DATA_VIZ_AQUA_950, DATA_VIZ_GREEN_500, DATA_VIZ_MAGENTA_950];
17
+ const colorPaletteDefault = [GL_COLOR_DATA_BLUE_500, GL_COLOR_DATA_ORANGE_600, GL_COLOR_DATA_AQUA_500, GL_COLOR_DATA_GREEN_600, GL_COLOR_DATA_MAGENTA_500, GL_COLOR_DATA_BLUE_700, GL_COLOR_DATA_ORANGE_800, GL_COLOR_DATA_AQUA_700, GL_COLOR_DATA_GREEN_800, GL_COLOR_DATA_MAGENTA_700, GL_COLOR_DATA_BLUE_900, GL_COLOR_DATA_ORANGE_950, GL_COLOR_DATA_AQUA_900, GL_COLOR_DATA_GREEN_950, GL_COLOR_DATA_MAGENTA_900, GL_COLOR_DATA_BLUE_600, GL_COLOR_DATA_ORANGE_700, GL_COLOR_DATA_AQUA_600, GL_COLOR_DATA_GREEN_700, GL_COLOR_DATA_MAGENTA_600, GL_COLOR_DATA_BLUE_800, GL_COLOR_DATA_ORANGE_900, GL_COLOR_DATA_AQUA_800, GL_COLOR_DATA_GREEN_900, GL_COLOR_DATA_MAGENTA_800, GL_COLOR_DATA_BLUE_950, GL_COLOR_DATA_ORANGE_500, GL_COLOR_DATA_AQUA_950, GL_COLOR_DATA_GREEN_500, GL_COLOR_DATA_MAGENTA_950];
19
18
  const colorFromDefaultPalette = index => colorPaletteDefault[index % colorPaletteDefault.length];
20
- const colorPaletteDark = [DATA_VIZ_BLUE_500, DATA_VIZ_ORANGE_400, DATA_VIZ_AQUA_500, DATA_VIZ_GREEN_400, DATA_VIZ_MAGENTA_500, DATA_VIZ_BLUE_300, DATA_VIZ_ORANGE_200, DATA_VIZ_AQUA_300, DATA_VIZ_GREEN_200, DATA_VIZ_MAGENTA_300, DATA_VIZ_BLUE_100, DATA_VIZ_ORANGE_50, DATA_VIZ_AQUA_100, DATA_VIZ_GREEN_50, DATA_VIZ_MAGENTA_100, DATA_VIZ_BLUE_400, DATA_VIZ_ORANGE_300, DATA_VIZ_AQUA_400, DATA_VIZ_GREEN_300, DATA_VIZ_MAGENTA_400, DATA_VIZ_BLUE_200, DATA_VIZ_ORANGE_100, DATA_VIZ_AQUA_200, DATA_VIZ_GREEN_100, DATA_VIZ_MAGENTA_200, DATA_VIZ_BLUE_50, DATA_VIZ_ORANGE_500, DATA_VIZ_AQUA_50, DATA_VIZ_GREEN_500, DATA_VIZ_MAGENTA_50];
19
+ const colorPaletteDark = [GL_COLOR_DATA_BLUE_500, GL_COLOR_DATA_ORANGE_400, GL_COLOR_DATA_AQUA_500, GL_COLOR_DATA_GREEN_400, GL_COLOR_DATA_MAGENTA_500, GL_COLOR_DATA_BLUE_300, GL_COLOR_DATA_ORANGE_200, GL_COLOR_DATA_AQUA_300, GL_COLOR_DATA_GREEN_200, GL_COLOR_DATA_MAGENTA_300, GL_COLOR_DATA_BLUE_100, GL_COLOR_DATA_ORANGE_50, GL_COLOR_DATA_AQUA_100, GL_COLOR_DATA_GREEN_50, GL_COLOR_DATA_MAGENTA_100, GL_COLOR_DATA_BLUE_400, GL_COLOR_DATA_ORANGE_300, GL_COLOR_DATA_AQUA_400, GL_COLOR_DATA_GREEN_300, GL_COLOR_DATA_MAGENTA_400, GL_COLOR_DATA_BLUE_200, GL_COLOR_DATA_ORANGE_100, GL_COLOR_DATA_AQUA_200, GL_COLOR_DATA_GREEN_100, GL_COLOR_DATA_MAGENTA_200, GL_COLOR_DATA_BLUE_50, GL_COLOR_DATA_ORANGE_500, GL_COLOR_DATA_AQUA_50, GL_COLOR_DATA_GREEN_500, GL_COLOR_DATA_MAGENTA_50];
21
20
  const colorFromDarkPalette = index => colorPaletteDark[index % colorPaletteDark.length];
22
21
  const axes = {
23
22
  axisLabel: {
24
23
  margin: 8,
25
24
  show: true,
26
- color: `var(--gray-600, ${GRAY_600})`,
25
+ color: 'var(--gl-chart-axis-text-color)',
27
26
  hideOverlap: true
28
27
  },
29
28
  axisLine: {
@@ -32,7 +31,7 @@ const axes = {
32
31
  axisPointer: {
33
32
  lineStyle: {
34
33
  type: 'solid',
35
- color: GRAY_600
34
+ color: 'var(--gl-chart-axis-pointer-color)'
36
35
  },
37
36
  label: {
38
37
  show: false
@@ -42,7 +41,7 @@ const axes = {
42
41
  show: true,
43
42
  alignWithLabel: true,
44
43
  lineStyle: {
45
- color: GRAY_200
44
+ color: 'var(--gl-chart-axis-line-color)'
46
45
  }
47
46
  },
48
47
  nameGap: 30,
@@ -51,14 +50,11 @@ const axes = {
51
50
  },
52
51
  splitLine: {
53
52
  lineStyle: {
54
- color: [GRAY_200]
53
+ color: ['var(--gl-chart-axis-line-color)']
55
54
  }
56
55
  },
57
56
  splitArea: {
58
- show: false,
59
- areaStyle: {
60
- color: [hexToRgba(GRAY_50, 0.3), hexToRgba(GRAY_300, 0.3)]
61
- }
57
+ show: false
62
58
  }
63
59
  };
64
60
  const isLineChartWithoutArea = options => Array.isArray(options === null || options === void 0 ? void 0 : options.series) && options.series.some(series => series.type === 'line' && !series.areaStyle);
@@ -68,7 +64,7 @@ const createTheme = function () {
68
64
  color: colorPaletteDefault,
69
65
  backgroundColor: 'transparent',
70
66
  textStyle: {
71
- color: `var(--gl-text-color, ${GRAY_900})`
67
+ color: 'var(--gl-text-color-default)'
72
68
  },
73
69
  markLine: {
74
70
  silent: true,
@@ -77,7 +73,7 @@ const createTheme = function () {
77
73
  show: false
78
74
  },
79
75
  lineStyle: {
80
- color: RED_500,
76
+ color: 'var(--gl-chart-threshold-line-color)',
81
77
  width: 1,
82
78
  type: 'dashed'
83
79
  }
@@ -85,7 +81,7 @@ const createTheme = function () {
85
81
  markArea: {
86
82
  silent: true,
87
83
  itemStyle: {
88
- color: hexToRgba(RED_500, 0.1)
84
+ color: 'var(--gl-chart-threshold-area-color)'
89
85
  }
90
86
  },
91
87
  dataZoom: {
@@ -95,27 +91,32 @@ const createTheme = function () {
95
91
  dataBackground: {
96
92
  lineStyle: {
97
93
  width: 2,
98
- color: GRAY_200,
94
+ color: 'var(--gl-chart-axis-line-color)',
99
95
  opacity: 1
100
96
  },
101
97
  // render unfilled zoom-graph if the series is a line chart without area styles
102
98
  // more details: https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2364#note_666637306
103
99
  areaStyle: isLineChartWithoutArea(options) ? {} // Use empty object instead of null, see https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/2185#note_707711029 for more context
104
100
  : {
105
- color: GRAY_50,
101
+ color: 'var(--gl-background-color-strong)',
106
102
  opacity: 1
107
103
  }
108
104
  },
109
- fillerColor: hexToRgba(GRAY_200, 0.23),
105
+ fillerColor: 'var(--gl-chart-zoom-filler-color)',
110
106
  handleIcon: scrollHandleSvgPath,
107
+ emphasis: {
108
+ handleStyle: {
109
+ color: 'var(--gl-chart-zoom-handle-color)'
110
+ }
111
+ },
111
112
  handleStyle: {
112
113
  borderColor: 'transparent',
113
- color: GRAY_500
114
+ color: 'var(--gl-chart-zoom-handle-color)'
114
115
  },
115
116
  handleSize: '50%',
116
117
  labelFormatter: () => null,
117
118
  textStyle: {
118
- color: GRAY_600
119
+ color: 'var(--gl-chart-axis-text-color)'
119
120
  }
120
121
  },
121
122
  toolbox: {
@@ -125,14 +126,15 @@ const createTheme = function () {
125
126
  emphasis: {
126
127
  iconStyle: {
127
128
  borderWidth: 0,
128
- color: GRAY_900,
129
- textBackgroundColor: WHITE,
129
+ color: 'var(--gl-icon-color-default)',
130
+ textFill: 'var(--gl-feedback-strong-text-color)',
131
+ textBackgroundColor: 'var(--gl-feedback-strong-background-color)',
130
132
  textBorderRadius: GL_BORDER_RADIUS_BASE,
131
133
  textPadding: [8, 12]
132
134
  }
133
135
  },
134
136
  iconStyle: {
135
- color: GRAY_500,
137
+ color: 'var(--gl-icon-color-default)',
136
138
  borderWidth: 0
137
139
  },
138
140
  itemGap: 8,
@@ -162,12 +164,12 @@ const createTheme = function () {
162
164
  label: {
163
165
  normal: {
164
166
  textStyle: {
165
- color: GRAY_50
167
+ color: GL_COLOR_NEUTRAL_50
166
168
  }
167
169
  },
168
170
  emphasis: {
169
171
  textStyle: {
170
- color: GRAY_50
172
+ color: GL_COLOR_NEUTRAL_50
171
173
  }
172
174
  }
173
175
  }
@@ -1,3 +1,4 @@
1
+ import Vue from 'vue';
1
2
  import { POSITION } from '../components/utilities/truncate/constants';
2
3
 
3
4
  const COMMA = ',';
@@ -316,5 +317,6 @@ const loadingIconVariants = {
316
317
  spinner: 'spinner',
317
318
  dots: 'dots'
318
319
  };
320
+ const isVue3 = Boolean(Vue.Fragment);
319
321
 
320
- export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, animatedIconVariantOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, breadCrumbSizeOptions, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, columnOptions, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, keyboard, labelColorOptions, linkVariantOptions, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
322
+ export { COMMA, CONTRAST_LEVELS, HEX_REGEX, LEFT_MOUSE_BUTTON, alertVariantIconMap, alertVariantOptions, alignOptions, animatedIconVariantOptions, avatarShapeOptions, avatarSizeOptions, avatarsInlineSizeOptions, badgeForButtonOptions, badgeIconSizeOptions, badgeSizeOptions, badgeVariantOptions, bannerVariants, breadCrumbSizeOptions, buttonCategoryOptions, buttonSizeOptions, buttonVariantOptions, colorThemes, columnOptions, datepickerWidthOptionsMap, defaultDateFormat, drawerVariants, dropdownAllowedAutoPlacements, dropdownItemVariantOptions, dropdownPlacements, dropdownVariantOptions, focusableTags, formInputWidths, formStateOptions, iconSizeOptions, iconVariantOptions, isVue3, keyboard, labelColorOptions, linkVariantOptions, loadingIconSizes, loadingIconVariants, maxZIndex, modalButtonDefaults, modalSizeOptions, popoverPlacements, progressBarVariantOptions, resizeDebounceTime, tabsButtonDefaults, targetOptions, toggleLabelPosition, tokenVariants, tooltipActionEvents, tooltipDelay, tooltipPlacements, triggerVariantOptions, truncateOptions, variantCssColorMap, viewModeOptions };
@@ -1,4 +1,5 @@
1
1
  import Vue from 'vue';
2
+ import { isVue3 } from './constants';
2
3
 
3
4
  // Fragment will be available only in Vue.js 3
4
5
  const {
@@ -30,7 +31,6 @@ function isVnodeEmpty(vnode) {
30
31
  }
31
32
  function isSlotEmpty(vueInstance, slot, slotArgs) {
32
33
  var _vueInstance$$scopedS, _vueInstance$$scopedS2;
33
- const isVue3 = Boolean(Fragment);
34
34
  const slotContent = isVue3 ?
35
35
  // we need to check both $slots and $scopedSlots due to https://github.com/vuejs/core/issues/8869
36
36
  // additionally, in @vue/compat $slot might be a function instead of array of vnodes (sigh)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "110.1.0",
3
+ "version": "111.1.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -36,9 +36,8 @@
36
36
  "build-tokens": "make tokens",
37
37
  "build-migration-script": "esbuild --bundle --platform=node --target=esnext --outfile=bin/migrate_custom_utils_to_tw.bundled.mjs --format=esm --banner:js=\"import { createRequire as __gl__createRequire } from 'node:module'; const require = __gl__createRequire(import.meta.url);\" bin/migrate_custom_utils_to_tw.mjs",
38
38
  "clean": "rm -r dist storybook",
39
- "cy:a11y": "cypress run --browser chrome --env grepTags=@a11y",
40
- "cy:edge": "cypress run --browser edge --env grepTags=-@a11y+-@storybook",
41
- "cy:run": "cypress run --browser firefox --env grepTags=-@a11y+-@storybook",
39
+ "cy:edge": "cypress run --browser edge --env grepTags=-@storybook",
40
+ "cy:run": "cypress run --browser firefox --env grepTags=-@storybook",
42
41
  "start": "yarn storybook",
43
42
  "storybook": "yarn storybook:prepare && storybook dev --ci --host ${STORYBOOK_HOST:-localhost} --port ${STORYBOOK_PORT:-9001} -c .storybook",
44
43
  "storybook-vue3": "yarn storybook:prepare && VUE_VERSION=3 storybook dev --ci --host ${STORYBOOK_HOST:-localhost} --port ${STORYBOOK_PORT:-9001} -c .storybook",
@@ -49,7 +48,7 @@
49
48
  "storybook:run": "npx http-server -bgs -p ${STORYBOOK_PORT:-9001} ./storybook",
50
49
  "pretest:unit": "yarn build-tokens",
51
50
  "test": "run-s test:unit test:visual",
52
- "test:integration": "yarn run test:integration:server 'yarn cy:run && yarn cy:edge && yarn cy:a11y'",
51
+ "test:integration": "yarn run test:integration:server 'yarn cy:run && yarn cy:edge'",
53
52
  "test:integration:server": "NODE_ENV=test start-test storybook:run http-get://${STORYBOOK_HOST:-localhost}:${STORYBOOK_PORT:-9001}/iframe.html",
54
53
  "test:unit": "NODE_ENV=test jest",
55
54
  "test:unit:watch": "yarn test:unit --watch",
@@ -140,12 +139,10 @@
140
139
  "acorn": "^8.11.3",
141
140
  "acorn-walk": "^8.3.2",
142
141
  "autoprefixer": "^9.7.6",
143
- "axe-core": "^4.2.3",
144
142
  "axe-playwright": "^2.1.0",
145
143
  "babel-jest": "29.0.1",
146
144
  "babel-loader": "^8.0.5",
147
145
  "cypress": "14.1.0",
148
- "cypress-axe": "^1.4.0",
149
146
  "cypress-real-events": "^1.11.0",
150
147
  "dompurify": "^3.1.2",
151
148
  "emoji-regex": "^10.0.0",
@@ -173,8 +170,8 @@
173
170
  "npm-run-all": "^4.1.5",
174
171
  "patch-package": "^8.0.0",
175
172
  "pikaday": "^1.8.0",
176
- "playwright": "^1.50.1",
177
- "playwright-core": "^1.50.1",
173
+ "playwright": "^1.51.0",
174
+ "playwright-core": "^1.51.0",
178
175
  "postcss": "8.4.28",
179
176
  "postcss-loader": "^7.0.2",
180
177
  "postcss-scss": "4.0.4",
@@ -208,11 +205,6 @@
208
205
  "yargs": "^17.3.1",
209
206
  "yarn-deduplicate": "^6.0.2"
210
207
  },
211
- "overrides": {
212
- "cypress-axe": {
213
- "axe-core": "4.2.3"
214
- }
215
- },
216
208
  "release": {
217
209
  "branches": [
218
210
  "main"
@@ -18,6 +18,115 @@
18
18
  - **Mention**: Indicates when a user is "@" mentioned in the content. The username links to the
19
19
  user's profile. A mention link can be within body or meta content.
20
20
 
21
+ Use `<gl-link>` to render links. It can render standard `<a>` elements,
22
+ and also Vue Router and Nuxt links.
23
+
24
+ ```html
25
+ <gl-link href="#foo">Link</gl-link>
26
+ ```
27
+
28
+ ## Link type
29
+
30
+ By specifying a value in the `href` prop, a standard link (`<a>`) element will be rendered. To
31
+ generate a `<router-link>` instead, specify the route location via the `to` prop.
32
+
33
+ ### Router links
34
+
35
+ Router links support various additional props.
36
+
37
+ If your app is running under [Nuxt.js](https://nuxtjs.org), the
38
+ [`<nuxt-link>`](https://nuxtjs.org/api/components-nuxt-link) component will be used instead of
39
+ `<router-link>`. The `<nuxt-link>` component supports all the same features as `<router-link>` (as
40
+ it is a wrapper component for `<router-link>`) and more.
41
+
42
+ #### `to`
43
+
44
+ - type: `string | Location`
45
+ - required to generate a `<router-link>`
46
+
47
+ Denotes the target route of the link. When clicked, the value of the `to` prop will be passed to
48
+ `router.push()` internally, so the value can be either a string or a location descriptor object.
49
+
50
+ ```html
51
+ <!-- Literal string -->
52
+ <gl-link to="home">Home</gl-link>
53
+ <!-- Renders to -->
54
+ <a href="home">Home</a>
55
+
56
+ <!-- Omitting `v-bind` is fine, just as binding any other prop -->
57
+ <gl-link :to="'home'">Home</gl-link>
58
+
59
+ <!-- Same as above -->
60
+ <gl-link :to="{ path: 'home' }">Home</gl-link>
61
+
62
+ <!-- Named route -->
63
+ <gl-link :to="{ name: 'user', params: { userId: 123 } }">User</gl-link>
64
+
65
+ <!-- With query, resulting in `/register?plan=private` -->
66
+ <gl-link :to="{ path: 'register', query: { plan: 'private' } }">Register</gl-link>
67
+
68
+ <!-- Render a non-router link by omitting `to` and specifying an `href` -->
69
+ <gl-link href="/home">Home</gl-link>
70
+ ```
71
+
72
+ #### `replace`
73
+
74
+ - type: `boolean`
75
+ - default: `false`
76
+
77
+ Setting `replace` prop will call `router.replace()` instead of `router.push()` when clicked, so the
78
+ navigation will not leave a history record.
79
+
80
+ ```html
81
+ <gl-link :to="{ path: '/abc'}" replace></gl-link>
82
+ ```
83
+
84
+ #### `active-class`
85
+
86
+ - type: `string`
87
+ - default: `'router-link-active'` (`'nuxt-link-active'` when using Nuxt.js)
88
+
89
+ Configure the active CSS class applied when the link is active. Note the default value can also be
90
+ configured globally via the `linkActiveClass`
91
+ [router constructor option](https://router.vuejs.org/api/#linkactiveclass).
92
+
93
+ With components that support router links (have a `to` prop), you will want to set this to the class
94
+ `'active'` (or a space separated string that includes `'active'`) to apply Bootstrap's active
95
+ styling on the component when the current route matches the `to` prop.
96
+
97
+ #### `exact-active-class`
98
+
99
+ - type: `string`
100
+ - default: `'router-link-exact-active'` (`'nuxt-link-exact-active'` when using Nuxt.js)
101
+ - availability: Vue Router 2.5.0+
102
+
103
+ Configure the active CSS class applied when the link is active with exact match. Note the default
104
+ value can also be configured globally via the `linkExactActiveClass`
105
+ [router constructor option](https://router.vuejs.org/api/#linkexactactiveclass).
106
+
107
+ With components that support router links (have a `to` prop), you will want to set this to the class
108
+ `'active'` (or a space separated string that includes `'active'`) to apply Bootstrap's active
109
+ styling on the component when the current route matches the `to` prop.
110
+
111
+ ## Links with `href="#"`
112
+
113
+ Typically `<a href="#">` will cause the document to scroll to the top of page when clicked.
114
+ `<gl-link>` addresses this by preventing the default action (scroll to top) when `href` is set to
115
+ `#`.
116
+
117
+ If you need scroll to top behaviour, use a standard `<a href="#">...</a>` tag.
118
+
119
+ ## Link disabled state
120
+
121
+ Disable link functionality by setting the `disabled` prop to true.
122
+
123
+ ```html
124
+ <gl-link href="#foo" disabled>Disabled Link</gl-link>
125
+ ```
126
+
127
+ Disabling a link handles stopping event propagation, preventing the default action from occurring,
128
+ and removing the link from the document tab sequence (`tabindex="-1"`).
129
+
21
130
  ## Security
22
131
 
23
132
  This component implements a few security measures to make it as safe as possible by default.