@gitlab/ui 134.8.0 → 135.0.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 (152) hide show
  1. package/dist/components/base/animated_icon/base_animated_icon.js +3 -0
  2. package/dist/components/base/color_mode_toggle/color_mode_toggle.js +11 -1
  3. package/dist/components/base/filtered_search/filtered_search.js +9 -0
  4. package/dist/components/base/filtered_search/filtered_search_suggestion.js +3 -0
  5. package/dist/components/base/filtered_search/filtered_search_term.js +9 -0
  6. package/dist/components/base/filtered_search/filtered_search_token.js +15 -0
  7. package/dist/components/base/filtered_search/filtered_search_token_segment.js +27 -0
  8. package/dist/components/base/form/form_combobox/form_combobox.js +18 -0
  9. package/dist/components/base/form/form_date/form_date.js +18 -0
  10. package/dist/components/base/form/form_fields/form_field_validator.js +9 -0
  11. package/dist/components/base/form/form_fields/form_fields_loop.js +3 -0
  12. package/dist/components/base/markdown/markdown.js +3 -0
  13. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +54 -0
  14. package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +3 -0
  15. package/dist/components/base/new_dropdowns/listbox/listbox.js +4 -1
  16. package/dist/components/base/new_dropdowns/listbox/listbox_group.js +6 -0
  17. package/dist/components/base/new_dropdowns/listbox/listbox_item.js +15 -0
  18. package/dist/components/base/search_box_by_click/search_box_by_click.js +6 -0
  19. package/dist/components/base/segmented_control/segmented_control.js +6 -0
  20. package/dist/components/base/table_lite/table_lite.js +9 -0
  21. package/dist/components/base/tabs/tab/tab.js +3 -0
  22. package/dist/components/base/tabs/tabs/tabs.js +21 -0
  23. package/dist/components/base/toast/toast.js +12 -0
  24. package/dist/components/base/toggle/toggle.js +3 -0
  25. package/dist/components/base/token_selector/token_container.js +12 -0
  26. package/dist/components/base/token_selector/token_selector_dropdown.js +27 -0
  27. package/dist/components/charts/area/area.js +36 -0
  28. package/dist/components/charts/bar/bar.js +15 -0
  29. package/dist/components/charts/chart/chart.js +7 -1
  30. package/dist/components/charts/column/column.js +24 -0
  31. package/dist/components/charts/discrete_scatter/discrete_scatter.js +21 -0
  32. package/dist/components/charts/gauge/gauge.js +21 -0
  33. package/dist/components/charts/heatmap/heatmap.js +33 -0
  34. package/dist/components/charts/legend/legend.js +15 -0
  35. package/dist/components/charts/line/line.js +33 -0
  36. package/dist/components/charts/series_label/series_label.js +6 -0
  37. package/dist/components/charts/shared/tooltip/tooltip.js +6 -0
  38. package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +3 -0
  39. package/dist/components/charts/single_stat/single_stat.js +30 -0
  40. package/dist/components/charts/stacked_column/stacked_column.js +55 -0
  41. package/dist/components/regions/empty_state/empty_state.js +3 -0
  42. package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +6 -0
  43. package/dist/components/shared_components/close_button/close_button.js +3 -0
  44. package/dist/components/utilities/animated_number/animated_number.js +9 -0
  45. package/dist/components/utilities/intersperse/intersperse.js +6 -0
  46. package/dist/index.css +2 -2
  47. package/dist/index.css.map +1 -1
  48. package/dist/tailwind.css +1 -1
  49. package/dist/tailwind.css.map +1 -1
  50. package/dist/tokens/build/js/tokens.dark.js +3 -3
  51. package/dist/tokens/build/js/tokens.js +3 -3
  52. package/dist/tokens/tokens_story.js +3 -0
  53. package/package.json +8 -7
  54. package/src/components/base/animated_icon/base_animated_icon.vue +3 -0
  55. package/src/components/base/avatar_link/avatar_link.scss +2 -2
  56. package/src/components/base/badge/badge.scss +3 -3
  57. package/src/components/base/breadcrumb/breadcrumb.scss +2 -2
  58. package/src/components/base/button/button.scss +15 -15
  59. package/src/components/base/button_group/button_group.scss +1 -1
  60. package/src/components/base/color_mode_toggle/color_mode_toggle.vue +11 -0
  61. package/src/components/base/datepicker/datepicker.scss +1 -1
  62. package/src/components/base/dropdown/dropdown_item.scss +3 -3
  63. package/src/components/base/filtered_search/filtered_search.vue +9 -0
  64. package/src/components/base/filtered_search/filtered_search_suggestion.vue +3 -0
  65. package/src/components/base/filtered_search/filtered_search_term.vue +9 -0
  66. package/src/components/base/filtered_search/filtered_search_token.vue +15 -0
  67. package/src/components/base/filtered_search/filtered_search_token_segment.vue +27 -0
  68. package/src/components/base/form/form_checkbox/form_checkbox.scss +9 -7
  69. package/src/components/base/form/form_combobox/form_combobox.scss +4 -4
  70. package/src/components/base/form/form_combobox/form_combobox.vue +18 -0
  71. package/src/components/base/form/form_date/form_date.vue +18 -0
  72. package/src/components/base/form/form_fields/form_field_validator.vue +9 -0
  73. package/src/components/base/form/form_fields/form_fields_loop.vue +3 -0
  74. package/src/components/base/form/form_input/form_input.scss +2 -2
  75. package/src/components/base/form/form_select/form_select.scss +3 -3
  76. package/src/components/base/icon/icon.figma.batch.ts +26 -0
  77. package/src/components/base/label/label.scss +9 -9
  78. package/src/components/base/link/link.scss +11 -11
  79. package/src/components/base/markdown/markdown.vue +3 -0
  80. package/src/components/base/nav_item/nav_item.scss +5 -5
  81. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +54 -0
  82. package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.vue +3 -0
  83. package/src/components/base/new_dropdowns/dropdown.scss +2 -2
  84. package/src/components/base/new_dropdowns/dropdown_item.scss +9 -9
  85. package/src/components/base/new_dropdowns/listbox/listbox.scss +1 -1
  86. package/src/components/base/new_dropdowns/listbox/listbox.vue +5 -2
  87. package/src/components/base/new_dropdowns/listbox/listbox_group.vue +6 -0
  88. package/src/components/base/new_dropdowns/listbox/listbox_item.vue +15 -0
  89. package/src/components/base/pagination/pagination.scss +3 -2
  90. package/src/components/base/path/path.scss +3 -3
  91. package/src/components/base/search_box_by_click/search_box_by_click.vue +6 -0
  92. package/src/components/base/search_box_by_type/search_box_by_type.scss +1 -1
  93. package/src/components/base/segmented_control/segmented_control.vue +6 -0
  94. package/src/components/base/table_lite/table_lite.vue +9 -0
  95. package/src/components/base/tabs/tab/tab.vue +3 -0
  96. package/src/components/base/tabs/tabs/tabs.scss +3 -3
  97. package/src/components/base/tabs/tabs/tabs.vue +21 -0
  98. package/src/components/base/toast/toast.vue +12 -0
  99. package/src/components/base/toggle/toggle.scss +4 -4
  100. package/src/components/base/toggle/toggle.vue +3 -0
  101. package/src/components/base/token_selector/token_container.vue +12 -0
  102. package/src/components/base/token_selector/token_selector.scss +1 -1
  103. package/src/components/base/token_selector/token_selector_dropdown.vue +27 -0
  104. package/src/components/charts/area/area.vue +36 -0
  105. package/src/components/charts/bar/bar.vue +15 -0
  106. package/src/components/charts/chart/chart.vue +7 -1
  107. package/src/components/charts/column/column.vue +24 -0
  108. package/src/components/charts/discrete_scatter/discrete_scatter.vue +21 -0
  109. package/src/components/charts/gauge/gauge.vue +21 -0
  110. package/src/components/charts/heatmap/heatmap.vue +33 -0
  111. package/src/components/charts/legend/legend.vue +15 -0
  112. package/src/components/charts/line/line.vue +33 -0
  113. package/src/components/charts/series_label/series_label.vue +6 -0
  114. package/src/components/charts/shared/tooltip/tooltip.vue +6 -0
  115. package/src/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.vue +3 -0
  116. package/src/components/charts/single_stat/single_stat.vue +30 -0
  117. package/src/components/charts/stacked_column/stacked_column.vue +55 -0
  118. package/src/components/regions/empty_state/empty_state.vue +3 -0
  119. package/src/components/shared_components/clear_icon_button/clear_icon_button.scss +1 -1
  120. package/src/components/shared_components/clear_icon_button/clear_icon_button.vue +6 -0
  121. package/src/components/shared_components/close_button/close_button.vue +3 -0
  122. package/src/components/utilities/animated_number/animated_number.vue +9 -0
  123. package/src/components/utilities/intersperse/intersperse.vue +6 -0
  124. package/src/scss/mixins.scss +1 -1
  125. package/src/tokens/build/css/tokens.css +3 -3
  126. package/src/tokens/build/css/tokens.dark.css +3 -3
  127. package/src/tokens/build/figma/mode.dark.json +37 -20
  128. package/src/tokens/build/figma/mode.json +37 -20
  129. package/src/tokens/build/js/tokens.dark.js +3 -3
  130. package/src/tokens/build/js/tokens.js +3 -3
  131. package/src/tokens/build/json/tokens.dark.json +74 -40
  132. package/src/tokens/build/json/tokens.json +74 -40
  133. package/src/tokens/build/scss/_tokens.dark.scss +3 -3
  134. package/src/tokens/build/scss/_tokens.scss +3 -3
  135. package/src/tokens/contextual/toggle.tokens.json +37 -20
  136. package/src/tokens/tokens_story.vue +3 -0
  137. package/src/utils/string_utils.js +1 -1
  138. package/src/vendor/bootstrap/scss/_button-group.scss +1 -1
  139. package/src/vendor/bootstrap/scss/_buttons.scss +3 -3
  140. package/src/vendor/bootstrap/scss/_custom-forms.scss +5 -5
  141. package/src/vendor/bootstrap/scss/_forms.scss +2 -2
  142. package/src/vendor/bootstrap/scss/_input-group.scss +5 -5
  143. package/src/vendor/bootstrap/scss/_pagination.scss +1 -1
  144. package/src/vendor/bootstrap/scss/mixins/_badge.scss +1 -1
  145. package/src/vendor/bootstrap/scss/mixins/_buttons.scss +5 -5
  146. package/src/vendor/bootstrap/scss/mixins/_forms.scss +5 -5
  147. package/src/vendor/bootstrap/scss/mixins/_hover.scss +3 -3
  148. package/src/vendor/bootstrap/scss/mixins/_screen-reader.scss +1 -1
  149. package/src/vendor/bootstrap-vue/src/_utilities.scss +1 -1
  150. package/src/vendor/bootstrap-vue/src/components/dropdown/_dropdown-form.scss +2 -2
  151. package/src/vendor/bootstrap-vue/src/components/dropdown/_dropdown.scss +1 -1
  152. package/tailwind.defaults.js +5 -5
@@ -31,8 +31,8 @@
31
31
  @include gl-tmp-form-checkbox-inline-styles;
32
32
 
33
33
  &:active,
34
- &:focus,
35
- &:focus:active {
34
+ &:focus-visible,
35
+ &:focus-visible:active {
36
36
  @apply gl-focus;
37
37
  }
38
38
  }
@@ -75,7 +75,7 @@
75
75
  border-color: var(--gl-control-border-color-hover);
76
76
  }
77
77
 
78
- .custom-control-input:not(:disabled):focus ~ .custom-control-label::before {
78
+ .custom-control-input:not(:disabled):focus-visible ~ .custom-control-label::before {
79
79
  @apply gl-focus;
80
80
  border-color: var(--gl-control-border-color-focus);
81
81
  }
@@ -124,14 +124,14 @@
124
124
  }
125
125
  }
126
126
 
127
- .custom-control-input:not(:disabled):focus:checked ~ .custom-control-label::before {
127
+ .custom-control-input:not(:disabled):focus-visible:checked ~ .custom-control-label::before {
128
128
  background-color: var(--gl-control-background-color-selected-focus);
129
129
  border-color: var(--gl-control-border-color-selected-focus);
130
130
  }
131
131
 
132
132
  .custom-control-input:not(:disabled):checked ~ .custom-control-label:hover,
133
133
  .custom-control-input:not(:disabled):hover:checked ~ .custom-control-label,
134
- .custom-control-input:not(:disabled):focus:checked ~ .custom-control-label {
134
+ .custom-control-input:not(:disabled):focus-visible:checked ~ .custom-control-label {
135
135
  &::before {
136
136
  @media (forced-colors: active) {
137
137
  background-color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
@@ -156,13 +156,15 @@
156
156
  border-color: var(--gl-control-border-color-selected-hover);
157
157
  }
158
158
 
159
- .custom-control-input:not(:disabled):focus:indeterminate ~ .custom-control-label::before {
159
+ .custom-control-input:not(:disabled):focus-visible:indeterminate
160
+ ~ .custom-control-label::before {
160
161
  background-color: var(--gl-control-background-color-selected-focus);
161
162
  border-color: var(--gl-control-border-color-selected-focus);
162
163
  }
163
164
 
164
165
  .custom-control-input:not(:disabled):indeterminate ~ .custom-control-label:hover::before,
165
- .custom-control-input:not(:disabled):focus:indeterminate ~ .custom-control-label::before {
166
+ .custom-control-input:not(:disabled):focus-visible:indeterminate
167
+ ~ .custom-control-label::before {
166
168
  @media (forced-colors: active) {
167
169
  background-color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
168
170
  border-color: LinkText; // stylelint-disable-line scale-unlimited/declaration-strict-value
@@ -68,7 +68,7 @@
68
68
  }
69
69
 
70
70
  // Focus state (when item receives actual focus)
71
- &:focus {
71
+ &:focus-visible {
72
72
  color: var(--gl-dropdown-option-text-color-focus);
73
73
  background-color: var(--gl-dropdown-option-background-color-unselected-focus);
74
74
  @include gl-focus($inset: true);
@@ -77,7 +77,7 @@
77
77
 
78
78
  // Active state (when item is clicked)
79
79
  &:active,
80
- &:focus:active {
80
+ &:focus-visible:active {
81
81
  color: var(--gl-dropdown-option-text-color-active);
82
82
  background-color: var(--gl-dropdown-option-background-color-unselected-active);
83
83
  @include gl-focus($inset: true);
@@ -112,12 +112,12 @@
112
112
  background-color: var(--gl-dropdown-option-background-color-selected-hover);
113
113
  }
114
114
 
115
- &:focus {
115
+ &:focus-visible {
116
116
  background-color: var(--gl-dropdown-option-background-color-selected-focus);
117
117
  }
118
118
 
119
119
  &:active,
120
- &:focus:active {
120
+ &:focus-visible:active {
121
121
  background-color: var(--gl-dropdown-option-background-color-selected-active);
122
122
  }
123
123
  }
@@ -19,15 +19,24 @@ export default {
19
19
  event: 'input',
20
20
  },
21
21
  props: {
22
+ /**
23
+ * Text for the combobox label.
24
+ */
22
25
  labelText: {
23
26
  type: String,
24
27
  required: true,
25
28
  },
29
+ /**
30
+ * When true, visually hides the label while keeping it accessible to screen readers.
31
+ */
26
32
  labelSrOnly: {
27
33
  type: Boolean,
28
34
  required: false,
29
35
  default: false,
30
36
  },
37
+ /**
38
+ * Array of tokens displayed in the combobox.
39
+ */
31
40
  tokenList: {
32
41
  type: Array,
33
42
  required: true,
@@ -40,15 +49,24 @@ export default {
40
49
  required: false,
41
50
  default: () => [],
42
51
  },
52
+ /**
53
+ * The current value of the combobox.
54
+ */
43
55
  value: {
44
56
  type: [String, Object],
45
57
  required: true,
46
58
  },
59
+ /**
60
+ * The attribute name used to match values against options.
61
+ */
47
62
  matchValueToAttr: {
48
63
  type: String,
49
64
  required: false,
50
65
  default: undefined,
51
66
  },
67
+ /**
68
+ * When true, automatically focuses the combobox on mount.
69
+ */
52
70
  autofocus: {
53
71
  type: Boolean,
54
72
  required: false,
@@ -13,31 +13,49 @@ export default {
13
13
  prop: 'value',
14
14
  },
15
15
  props: {
16
+ /**
17
+ * Unique identifier for the date input.
18
+ */
16
19
  id: {
17
20
  type: String,
18
21
  required: false,
19
22
  default: null,
20
23
  },
24
+ /**
25
+ * Minimum allowed date value.
26
+ */
21
27
  min: {
22
28
  type: String,
23
29
  required: false,
24
30
  default: null,
25
31
  },
32
+ /**
33
+ * Maximum allowed date value.
34
+ */
26
35
  max: {
27
36
  type: String,
28
37
  required: false,
29
38
  default: null,
30
39
  },
40
+ /**
41
+ * Error message displayed when the value is below the minimum.
42
+ */
31
43
  minInvalidFeedback: {
32
44
  type: String,
33
45
  required: false,
34
46
  default: 'Must be after minimum date.',
35
47
  },
48
+ /**
49
+ * Error message displayed when the value exceeds the maximum.
50
+ */
36
51
  maxInvalidFeedback: {
37
52
  type: String,
38
53
  required: false,
39
54
  default: 'Must be before maximum date.',
40
55
  },
56
+ /**
57
+ * The current value of the date picker.
58
+ */
41
59
  value: {
42
60
  type: String,
43
61
  required: false,
@@ -12,16 +12,25 @@
12
12
  export default {
13
13
  name: 'GlFormFieldValidator',
14
14
  props: {
15
+ /**
16
+ * The value to validate.
17
+ */
15
18
  value: {
16
19
  required: true,
17
20
  // ESLint requires "validator" or "type". Any kind of value is valid.
18
21
  validator: () => true,
19
22
  },
23
+ /**
24
+ * Array of validation functions or rules.
25
+ */
20
26
  validators: {
21
27
  type: Array,
22
28
  required: false,
23
29
  default: () => [],
24
30
  },
31
+ /**
32
+ * When true, triggers validation.
33
+ */
25
34
  shouldValidate: {
26
35
  type: Boolean,
27
36
  required: false,
@@ -4,6 +4,9 @@ import Vue from 'vue';
4
4
  export default {
5
5
  name: 'GlFormFieldsLoop',
6
6
  props: {
7
+ /**
8
+ * Field configurations to render in a loop.
9
+ */
7
10
  fields: {
8
11
  type: Object,
9
12
  required: true,
@@ -251,7 +251,7 @@ input[type="color"].form-control:disabled {
251
251
  @apply gl-text-disabled;
252
252
  }
253
253
 
254
- &:not(.form-control-plaintext):focus {
254
+ &:not(.form-control-plaintext):focus-visible {
255
255
  background: var(--gl-control-background-color-default);
256
256
  @apply gl-text-default;
257
257
  @include gl-focus($color: var(--gl-control-border-color-focus));
@@ -260,7 +260,7 @@ input[type="color"].form-control:disabled {
260
260
  &.is-invalid {
261
261
  box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-error);
262
262
 
263
- &:focus {
263
+ &:focus-visible {
264
264
  @include gl-focus($color: var(--gl-control-border-color-error));
265
265
  }
266
266
  }
@@ -37,8 +37,8 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
37
37
  box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-hover);
38
38
  }
39
39
 
40
- &:focus,
41
- &:focus:active {
40
+ &:focus-visible,
41
+ &:focus-visible:active {
42
42
  @include gl-focus($color: var(--gl-control-border-color-focus), $important: true);
43
43
  }
44
44
 
@@ -56,7 +56,7 @@ See: https://gitlab.com/gitlab-org/gitlab/issues/30055
56
56
  box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-control-border-color-error);
57
57
  }
58
58
 
59
- &:focus {
59
+ &:focus-visible {
60
60
  @include gl-focus($color: var(--gl-control-border-color-error), $important: true);
61
61
  }
62
62
  }
@@ -0,0 +1,26 @@
1
+ import figma from 'figma';
2
+
3
+ // Shared Code Connect template for every icon in the GitLab Product Icons
4
+ // library. One entry per icon is supplied by icon.figma.batch.json; the icon's
5
+ // name is exposed via figma.batch.name.
6
+ //
7
+ // Some icons are framed at a non-default size in Figma (e.g. the 12px trend,
8
+ // severity, and status icons). Those entries carry a `size` field in the batch
9
+ // JSON, which is rendered as `:size="12"`. Icons without a `size` field use the
10
+ // GlIcon default (16) and render no size attribute.
11
+ //
12
+ // `metadata.props.name` lets consuming components (badge, button, etc.) read
13
+ // the chosen icon's name through
14
+ // `instance.getInstanceSwap(prop).executeTemplate().metadata.props.name`,
15
+ // which is how we eventually replace the icon="REPLACE" placeholders.
16
+ const sizeAttr = figma.batch.size ? ` :size="${figma.batch.size}"` : '';
17
+
18
+ export default {
19
+ id: figma.batch.id,
20
+ imports: ["import { GlIcon } from '@gitlab/ui'"],
21
+ example: figma.code`<gl-icon name="${figma.batch.name}"${sizeAttr} />`,
22
+ metadata: {
23
+ nestable: true,
24
+ props: { name: figma.batch.name },
25
+ },
26
+ };
@@ -23,7 +23,7 @@ $label-padding-horizontal-half: 0.375 * $grid-size;
23
23
  background-color: var(--label-background-color);
24
24
  }
25
25
 
26
- &:has(*:first-child:focus) {
26
+ &:has(*:first-child:focus-visible) {
27
27
  @include gl-focus(
28
28
  $color: var(--label-background-color, var(--gl-background-color-default)),
29
29
  $important: true
@@ -38,8 +38,8 @@ $label-padding-horizontal-half: 0.375 * $grid-size;
38
38
  @apply gl-max-w-full;
39
39
 
40
40
  &:hover,
41
- &:focus,
42
- &:focus:active {
41
+ &:focus-visible,
42
+ &:focus-visible:active {
43
43
  @apply gl-text-inherit;
44
44
  @apply gl-shadow-none;
45
45
  @apply gl-outline-none;
@@ -50,8 +50,8 @@ $label-padding-horizontal-half: 0.375 * $grid-size;
50
50
  text-decoration: none;
51
51
 
52
52
  &:hover,
53
- &:focus,
54
- &:focus:active {
53
+ &:focus-visible,
54
+ &:focus-visible:active {
55
55
  .gl-label-text,
56
56
  .gl-label-text-scoped {
57
57
  text-decoration: underline;
@@ -79,7 +79,7 @@ $label-padding-horizontal-half: 0.375 * $grid-size;
79
79
  @apply gl-rounded-full;
80
80
  @apply gl-shadow-none;
81
81
 
82
- &:focus,
82
+ &:focus-visible,
83
83
  &:active {
84
84
  @apply gl-focus;
85
85
  }
@@ -98,7 +98,7 @@ $label-padding-horizontal-half: 0.375 * $grid-size;
98
98
  color: var(--gl-label-light-button-icon-color-default);
99
99
  background-color: var(--gl-label-light-button-background-color-default);
100
100
 
101
- &:focus,
101
+ &:focus-visible,
102
102
  &:hover {
103
103
  color: var(--label-background-color);
104
104
  background-color: var(--gl-label-light-button-background-color-hover);
@@ -114,7 +114,7 @@ $label-padding-horizontal-half: 0.375 * $grid-size;
114
114
  color: var(--gl-label-dark-button-icon-color-default);
115
115
  background-color: var(--gl-label-dark-button-background-color-default);
116
116
 
117
- &:focus,
117
+ &:focus-visible,
118
118
  &:hover {
119
119
  color: var(--label-background-color);
120
120
  background-color: var(--gl-label-dark-button-background-color-hover);
@@ -127,7 +127,7 @@ $label-padding-horizontal-half: 0.375 * $grid-size;
127
127
  margin-left: #{-$label-padding-horizontal};
128
128
  color: var(--gl-label-scoped-button-icon-color-default);
129
129
 
130
- &:focus,
130
+ &:focus-visible,
131
131
  &:hover {
132
132
  color: var(--gl-label-scoped-button-icon-color-hover);
133
133
  background-color: var(--gl-label-scoped-button-background-color-hover);
@@ -8,13 +8,13 @@
8
8
  &,
9
9
  &:hover,
10
10
  &:active,
11
- &:focus {
11
+ &:focus-visible {
12
12
  @apply gl-text-link;
13
13
  }
14
14
 
15
15
  &:active,
16
- &:focus,
17
- &:focus:active {
16
+ &:focus-visible,
17
+ &:focus-visible:active {
18
18
  @apply gl-underline;
19
19
  @include gl-focus($outline: true, $outline-offset: $outline-width);
20
20
  }
@@ -42,8 +42,8 @@
42
42
 
43
43
  &,
44
44
  &:hover,
45
- &:focus,
46
- &:focus:hover {
45
+ &:focus-visible,
46
+ &:focus-visible:hover {
47
47
  @apply gl-text-inherit;
48
48
  }
49
49
  }
@@ -59,8 +59,8 @@
59
59
  }
60
60
 
61
61
  &:active,
62
- &:focus,
63
- &:focus:active {
62
+ &:focus-visible,
63
+ &:focus-visible:active {
64
64
  @apply gl-no-underline;
65
65
  }
66
66
  }
@@ -71,8 +71,8 @@
71
71
  &,
72
72
  &:hover,
73
73
  &:active,
74
- &:focus,
75
- &:focus:active {
74
+ &:focus-visible,
75
+ &:focus-visible:active {
76
76
  color: var(--gl-link-mention-text-color-default);
77
77
  }
78
78
  }
@@ -83,8 +83,8 @@
83
83
  &,
84
84
  &:hover,
85
85
  &:active,
86
- &:focus,
87
- &:focus:active {
86
+ &:focus-visible,
87
+ &:focus-visible:active {
88
88
  color: var(--gl-link-mention-text-color-current);
89
89
  }
90
90
  }
@@ -2,6 +2,9 @@
2
2
  export default {
3
3
  name: 'GlMarkdown',
4
4
  props: {
5
+ /**
6
+ * When true, renders the markdown in a compact style.
7
+ */
5
8
  compact: {
6
9
  type: Boolean,
7
10
  required: false,
@@ -11,7 +11,7 @@
11
11
  @apply gl-border-none;
12
12
  @apply gl-cursor-pointer;
13
13
  @apply gl-appearance-none;
14
- @apply focus:gl-focus-inset;
14
+ @apply focus-visible:gl-focus-inset;
15
15
  min-height: 1.75rem;
16
16
  min-width: 1.75rem;
17
17
  border-radius: var(--gl-nav-item-border-radius);
@@ -38,13 +38,13 @@
38
38
  background-color: var(--gl-nav-item-background-color-hover);
39
39
  }
40
40
 
41
- &:focus {
41
+ &:focus-visible {
42
42
  color: var(--gl-nav-item-foreground-color-focus);
43
43
  background-color: var(--gl-nav-item-background-color-focus);
44
44
  }
45
45
 
46
46
  &:active,
47
- &:focus:active {
47
+ &:focus-visible:active {
48
48
  color: var(--gl-nav-item-foreground-color-active);
49
49
  background-color: var(--gl-nav-item-background-color-active);
50
50
  }
@@ -58,13 +58,13 @@
58
58
  background-color: var(--gl-nav-item-selected-background-color-hover);
59
59
  }
60
60
 
61
- &:focus {
61
+ &:focus-visible {
62
62
  color: var(--gl-nav-item-selected-foreground-color-focus);
63
63
  background-color: var(--gl-nav-item-selected-background-color-focus);
64
64
  }
65
65
 
66
66
  &:active,
67
- &:focus:active {
67
+ &:focus-visible:active {
68
68
  color: var(--gl-nav-item-selected-foreground-color-active);
69
69
  background-color: var(--gl-nav-item-selected-background-color-active);
70
70
  }
@@ -61,59 +61,92 @@ export default {
61
61
  },
62
62
  },
63
63
  props: {
64
+ /**
65
+ * Text displayed on the dropdown toggle button.
66
+ */
64
67
  toggleText: {
65
68
  type: String,
66
69
  required: false,
67
70
  default: '',
68
71
  },
72
+ /**
73
+ * When true, visually hides the toggle text while keeping it accessible to screen readers.
74
+ */
69
75
  textSrOnly: {
70
76
  type: Boolean,
71
77
  required: false,
72
78
  default: false,
73
79
  },
80
+ /**
81
+ * When true, renders the dropdown at 100% width of its parent container.
82
+ */
74
83
  block: {
75
84
  type: Boolean,
76
85
  required: false,
77
86
  default: false,
78
87
  },
88
+ /**
89
+ * Visual category of the dropdown toggle button.
90
+ */
79
91
  category: {
80
92
  type: String,
81
93
  required: false,
82
94
  default: buttonCategoryOptions.primary,
83
95
  validator: (value) => Object.keys(buttonCategoryOptions).includes(value),
84
96
  },
97
+ /**
98
+ * Visual variant of the dropdown toggle button.
99
+ */
85
100
  variant: {
86
101
  type: String,
87
102
  required: false,
88
103
  default: dropdownVariantOptions.default,
89
104
  validator: (value) => Object.keys(dropdownVariantOptions).includes(value),
90
105
  },
106
+ /**
107
+ * Size of the dropdown toggle button.
108
+ */
91
109
  size: {
92
110
  type: String,
93
111
  required: false,
94
112
  default: 'medium',
95
113
  validator: (value) => Object.keys(buttonSizeOptions).includes(value),
96
114
  },
115
+ /**
116
+ * Name of the icon to display in the toggle button.
117
+ */
97
118
  icon: {
98
119
  type: String,
99
120
  required: false,
100
121
  default: '',
101
122
  },
123
+ /**
124
+ * When true, disables the dropdown.
125
+ */
102
126
  disabled: {
103
127
  type: Boolean,
104
128
  required: false,
105
129
  default: false,
106
130
  },
131
+ /**
132
+ * When true, shows a loading state on the toggle button.
133
+ */
107
134
  loading: {
108
135
  type: Boolean,
109
136
  required: false,
110
137
  default: false,
111
138
  },
139
+ /**
140
+ * Additional CSS classes to apply to the toggle element.
141
+ */
112
142
  toggleClass: {
113
143
  type: [String, Array, Object],
114
144
  required: false,
115
145
  default: null,
116
146
  },
147
+ /**
148
+ * When true, hides the caret icon on the toggle button.
149
+ */
117
150
  noCaret: {
118
151
  type: Boolean,
119
152
  required: false,
@@ -127,6 +160,9 @@ export default {
127
160
  required: false,
128
161
  default: null,
129
162
  },
163
+ /**
164
+ * Placement for the dropdown menu.
165
+ */
130
166
  placement: {
131
167
  type: String,
132
168
  required: false,
@@ -143,6 +179,9 @@ export default {
143
179
  },
144
180
  },
145
181
  // ARIA props
182
+ /**
183
+ * ARIA haspopup attribute value for accessibility.
184
+ */
146
185
  ariaHaspopup: {
147
186
  type: [String, Boolean],
148
187
  required: false,
@@ -151,21 +190,33 @@ export default {
151
190
  return ['menu', 'listbox', 'tree', 'grid', 'dialog', true, false].includes(value);
152
191
  },
153
192
  },
193
+ /**
194
+ * ID of the currently active item for accessibility.
195
+ */
154
196
  activeItemId: {
155
197
  type: String,
156
198
  required: false,
157
199
  default: undefined,
158
200
  },
201
+ /**
202
+ * When true, indicates the dropdown has an external label for accessibility.
203
+ */
159
204
  hasExternalLabel: {
160
205
  type: Boolean,
161
206
  required: false,
162
207
  default: false,
163
208
  },
209
+ /**
210
+ * When true, renders a searchable listbox.
211
+ */
164
212
  hasSearchableListbox: {
165
213
  type: Boolean,
166
214
  required: false,
167
215
  default: false,
168
216
  },
217
+ /**
218
+ * When true, renders as a disclosure dropdown.
219
+ */
169
220
  isDisclosure: {
170
221
  type: Boolean,
171
222
  required: false,
@@ -212,6 +263,9 @@ export default {
212
263
  required: false,
213
264
  default: () => ({ mainAxis: DEFAULT_OFFSET }),
214
265
  },
266
+ /**
267
+ * When true, allows the dropdown to take the full width available.
268
+ */
215
269
  fluidWidth: {
216
270
  type: Boolean,
217
271
  required: false,
@@ -14,6 +14,9 @@ export default {
14
14
  ITEM_CLASS,
15
15
  components: { GlLink, GlIcon },
16
16
  props: {
17
+ /**
18
+ * The item object to render as a disclosure dropdown item.
19
+ */
17
20
  item: {
18
21
  type: Object,
19
22
  required: false,
@@ -8,7 +8,7 @@
8
8
  @apply gl-cursor-pointer;
9
9
  }
10
10
 
11
- &:focus {
11
+ &:focus-visible {
12
12
  @apply gl-focus;
13
13
  }
14
14
  }
@@ -254,7 +254,7 @@
254
254
  }
255
255
 
256
256
  .gl-new-dropdown {
257
- .gl-new-dropdown-toggle:focus,
257
+ .gl-new-dropdown-toggle:focus-visible,
258
258
  .gl-new-dropdown-toggle:active {
259
259
  @apply gl-z-1;
260
260
  }