@gitlab/ui 39.2.1 → 39.3.2

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 (257) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/base/modal/modal.js +14 -2
  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 +6 -13
  8. package/scss_to_js/scss_variables.js +7 -2
  9. package/scss_to_js/scss_variables.json +29 -4
  10. package/src/components/base/avatar_labeled/avatar_labeled.stories.js +2 -1
  11. package/src/components/base/avatar_link/avatar_link.scss +1 -0
  12. package/src/components/base/avatar_link/avatar_link.stories.js +2 -3
  13. package/src/components/base/badge/badge.scss +1 -1
  14. package/src/components/base/breadcrumb/breadcrumb.md +1 -1
  15. package/src/components/base/breadcrumb/breadcrumb.scss +1 -1
  16. package/src/components/base/breadcrumb/breadcrumb.stories.js +2 -1
  17. package/src/components/base/broadcast_message/broadcast_message.scss +1 -1
  18. package/src/components/base/button/button.scss +35 -35
  19. package/src/components/base/carousel/carousel.scss +7 -0
  20. package/src/components/base/datepicker/datepicker.scss +4 -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/modal/modal.spec.js +20 -0
  29. package/src/components/base/modal/modal.vue +14 -1
  30. package/src/components/base/nav/nav.scss +7 -0
  31. package/src/components/base/pagination/pagination.scss +14 -7
  32. package/src/components/base/path/path.scss +29 -5
  33. package/src/components/base/search_box_by_click/search_box_by_click.scss +1 -1
  34. package/src/components/base/table/table.scss +6 -0
  35. package/src/components/base/token/token.scss +6 -0
  36. package/src/components/base/token_selector/token_selector.scss +2 -2
  37. package/src/components/shared_components/close_button/close_button.scss +11 -11
  38. package/src/scss/components.scss +3 -1
  39. package/src/scss/mixins.scss +26 -4
  40. package/src/scss/utilities.scss +8 -8
  41. package/src/scss/utility-mixins/color.scss +4 -0
  42. package/src/scss/utility-mixins/outline.scss +1 -1
  43. package/src/scss/variables.scss +9 -4
  44. package/dist/components/base/accordion/accordion.documentation.js +0 -8
  45. package/dist/components/base/accordion/accordion_item.documentation.js +0 -7
  46. package/dist/components/base/alert/alert.documentation.js +0 -13
  47. package/dist/components/base/avatar/avatar.documentation.js +0 -8
  48. package/dist/components/base/avatar_labeled/avatar_labeled.documentation.js +0 -8
  49. package/dist/components/base/avatar_link/avatar_link.documentation.js +0 -8
  50. package/dist/components/base/avatars_inline/avatars_inline.documentation.js +0 -13
  51. package/dist/components/base/badge/badge.documentation.js +0 -8
  52. package/dist/components/base/banner/banner.documentation.js +0 -8
  53. package/dist/components/base/breadcrumb/breadcrumb.documentation.js +0 -8
  54. package/dist/components/base/broadcast_message/broadcast_message.documentation.js +0 -8
  55. package/dist/components/base/button/button.documentation.js +0 -24
  56. package/dist/components/base/button_group/button_group.documentation.js +0 -8
  57. package/dist/components/base/card/card.documentation.js +0 -13
  58. package/dist/components/base/carousel/carousel.documentation.js +0 -8
  59. package/dist/components/base/collapse/collapse.documentation.js +0 -7
  60. package/dist/components/base/datepicker/datepicker.documentation.js +0 -7
  61. package/dist/components/base/daterange_picker/daterange_picker.documentation.js +0 -8
  62. package/dist/components/base/drawer/drawer.documentation.js +0 -8
  63. package/dist/components/base/dropdown/dropdown.documentation.js +0 -8
  64. package/dist/components/base/dropdown/dropdown_item.documentation.js +0 -7
  65. package/dist/components/base/filtered_search/filtered_search.documentation.js +0 -13
  66. package/dist/components/base/filtered_search/filtered_search_suggestion.documentation.js +0 -7
  67. package/dist/components/base/filtered_search/filtered_search_suggestion_list.documentation.js +0 -7
  68. package/dist/components/base/filtered_search/filtered_search_term.documentation.js +0 -12
  69. package/dist/components/base/filtered_search/filtered_search_token.documentation.js +0 -12
  70. package/dist/components/base/filtered_search/filtered_search_token_segment.documentation.js +0 -12
  71. package/dist/components/base/form/form.documentation.js +0 -7
  72. package/dist/components/base/form/form_checkbox/form_checkbox.documentation.js +0 -8
  73. package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation.js +0 -12
  74. package/dist/components/base/form/form_combobox/form_combobox.documentation.js +0 -13
  75. package/dist/components/base/form/form_group/form_group.documentation.js +0 -7
  76. package/dist/components/base/form/form_input/form_input.documentation.js +0 -8
  77. package/dist/components/base/form/form_input_group/form_input_group.documentation.js +0 -8
  78. package/dist/components/base/form/form_radio/form_radio.documentation.js +0 -8
  79. package/dist/components/base/form/form_radio_group/form_radio_group.documentation.js +0 -8
  80. package/dist/components/base/form/form_select/form_select.documentation.js +0 -8
  81. package/dist/components/base/form/form_text/form_text.documentation.js +0 -14
  82. package/dist/components/base/form/form_textarea/form_textarea.documentation.js +0 -7
  83. package/dist/components/base/form/input_group_text/input_group_text.documentation.js +0 -12
  84. package/dist/components/base/icon/icon.documentation.js +0 -8
  85. package/dist/components/base/infinite_scroll/examples/index.js +0 -49
  86. package/dist/components/base/infinite_scroll/examples/infinite_scroll.all_items.example.js +0 -49
  87. package/dist/components/base/infinite_scroll/examples/infinite_scroll.basic.example.js +0 -62
  88. package/dist/components/base/infinite_scroll/examples/infinite_scroll.finite_total_items.example.js +0 -72
  89. package/dist/components/base/infinite_scroll/examples/infinite_scroll.large_fetched_items.example.js +0 -62
  90. package/dist/components/base/infinite_scroll/examples/infinite_scroll.reverse.example.js +0 -63
  91. package/dist/components/base/infinite_scroll/examples/infinite_scroll.small_fetched_items.example.js +0 -62
  92. package/dist/components/base/infinite_scroll/examples/infinite_scroll.two_way.example.js +0 -94
  93. package/dist/components/base/infinite_scroll/infinite_scroll.documentation.js +0 -8
  94. package/dist/components/base/keyset_pagination/keyset_pagination.documentation.js +0 -13
  95. package/dist/components/base/label/label.documentation.js +0 -8
  96. package/dist/components/base/link/link.documentation.js +0 -7
  97. package/dist/components/base/loading_icon/loading_icon.documentation.js +0 -8
  98. package/dist/components/base/markdown/markdown.documentation.js +0 -12
  99. package/dist/components/base/modal/modal.documentation.js +0 -8
  100. package/dist/components/base/nav/nav.documentation.js +0 -12
  101. package/dist/components/base/navbar/navbar.documentation.js +0 -12
  102. package/dist/components/base/paginated_list/paginated_list.documentation.js +0 -7
  103. package/dist/components/base/pagination/pagination.documentation.js +0 -8
  104. package/dist/components/base/path/path.documentation.js +0 -8
  105. package/dist/components/base/popover/popover.documentation.js +0 -5
  106. package/dist/components/base/search_box_by_click/search_box_by_click.documentation.js +0 -8
  107. package/dist/components/base/search_box_by_type/search_box_by_type.documentation.js +0 -8
  108. package/dist/components/base/segmented_control/segmented_control.documentation.js +0 -8
  109. package/dist/components/base/skeleton_loader/skeleton_loader.documentation.js +0 -13
  110. package/dist/components/base/skeleton_loading/skeleton_loading.documentation.js +0 -7
  111. package/dist/components/base/sorting/sorting.documentation.js +0 -7
  112. package/dist/components/base/sorting/sorting_item.documentation.js +0 -8
  113. package/dist/components/base/table/table.documentation.js +0 -8
  114. package/dist/components/base/table_lite/table_lite.documentation.js +0 -13
  115. package/dist/components/base/tabs/tabs/tabs.documentation.js +0 -8
  116. package/dist/components/base/toast/toast.documentation.js +0 -8
  117. package/dist/components/base/toggle/toggle.documentation.js +0 -13
  118. package/dist/components/base/token/token.documentation.js +0 -5
  119. package/dist/components/base/token_selector/token_selector.documentation.js +0 -12
  120. package/dist/components/base/tooltip/tooltip.documentation.js +0 -8
  121. package/dist/components/charts/area/area.documentation.js +0 -5
  122. package/dist/components/charts/bar/bar.documentation.js +0 -8
  123. package/dist/components/charts/chart/chart.documentation.js +0 -7
  124. package/dist/components/charts/column/column.documentation.js +0 -5
  125. package/dist/components/charts/discrete_scatter/discrete_scatter.documentation.js +0 -5
  126. package/dist/components/charts/gauge/gauge.documentation.js +0 -12
  127. package/dist/components/charts/heatmap/heatmap.documentation.js +0 -8
  128. package/dist/components/charts/line/line.documentation.js +0 -8
  129. package/dist/components/charts/series_label/series_label.documentation.js +0 -7
  130. package/dist/components/charts/single_stat/single_stat.documentation.js +0 -7
  131. package/dist/components/charts/sparkline/sparkline.documentation.js +0 -8
  132. package/dist/components/charts/stacked_column/stacked_column.documentation.js +0 -8
  133. package/dist/components/charts/tooltip/tooltip.documentation.js +0 -8
  134. package/dist/components/editors/rich_text_editor/rich_text_editor.documentation.js +0 -12
  135. package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.documentation.js +0 -7
  136. package/dist/components/regions/empty_state/empty_state.documentation.js +0 -7
  137. package/dist/components/utilities/animated_number/animated_number.documentation.js +0 -13
  138. package/dist/components/utilities/friendly_wrap/friendly_wrap.documentation.js +0 -7
  139. package/dist/components/utilities/intersection_observer/intersection_observer.documentation.js +0 -12
  140. package/dist/components/utilities/intersperse/intersperse.documentation.js +0 -8
  141. package/dist/components/utilities/sprintf/sprintf.documentation.js +0 -8
  142. package/dist/components/utilities/truncate/truncate.documentation.js +0 -7
  143. package/dist/directives/hover_load/hover_load.documentation.js +0 -13
  144. package/dist/directives/outside/outside.documentation.js +0 -13
  145. package/dist/directives/resize_observer/resize_observer.documentation.js +0 -8
  146. package/dist/directives/safe_html/safe_html.documentation.js +0 -8
  147. package/dist/directives/safe_link/safe_link.documentation.js +0 -8
  148. package/documentation/all_components.js +0 -8
  149. package/documentation/components/component_documentation_generator.vue +0 -321
  150. package/documentation/components/example_display.vue +0 -231
  151. package/documentation/components/example_explorer.vue +0 -63
  152. package/documentation/components_documentation.js +0 -111
  153. package/documentation/index.js +0 -8
  154. package/src/components/base/accordion/accordion.documentation.js +0 -6
  155. package/src/components/base/accordion/accordion_item.documentation.js +0 -5
  156. package/src/components/base/alert/alert.documentation.js +0 -6
  157. package/src/components/base/avatar/avatar.documentation.js +0 -6
  158. package/src/components/base/avatar_labeled/avatar_labeled.documentation.js +0 -6
  159. package/src/components/base/avatar_link/avatar_link.documentation.js +0 -6
  160. package/src/components/base/avatars_inline/avatars_inline.documentation.js +0 -6
  161. package/src/components/base/badge/badge.documentation.js +0 -6
  162. package/src/components/base/banner/banner.documentation.js +0 -6
  163. package/src/components/base/breadcrumb/breadcrumb.documentation.js +0 -6
  164. package/src/components/base/broadcast_message/broadcast_message.documentation.js +0 -6
  165. package/src/components/base/button/button.documentation.js +0 -24
  166. package/src/components/base/button_group/button_group.documentation.js +0 -6
  167. package/src/components/base/card/card.documentation.js +0 -6
  168. package/src/components/base/carousel/carousel.documentation.js +0 -6
  169. package/src/components/base/collapse/collapse.documentation.js +0 -5
  170. package/src/components/base/datepicker/datepicker.documentation.js +0 -5
  171. package/src/components/base/daterange_picker/daterange_picker.documentation.js +0 -6
  172. package/src/components/base/drawer/drawer.documentation.js +0 -6
  173. package/src/components/base/dropdown/dropdown.documentation.js +0 -6
  174. package/src/components/base/dropdown/dropdown_item.documentation.js +0 -5
  175. package/src/components/base/filtered_search/filtered_search.documentation.js +0 -6
  176. package/src/components/base/filtered_search/filtered_search_suggestion.documentation.js +0 -5
  177. package/src/components/base/filtered_search/filtered_search_suggestion_list.documentation.js +0 -5
  178. package/src/components/base/filtered_search/filtered_search_term.documentation.js +0 -5
  179. package/src/components/base/filtered_search/filtered_search_token.documentation.js +0 -5
  180. package/src/components/base/filtered_search/filtered_search_token_segment.documentation.js +0 -5
  181. package/src/components/base/form/form.documentation.js +0 -5
  182. package/src/components/base/form/form_checkbox/form_checkbox.documentation.js +0 -6
  183. package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation.js +0 -5
  184. package/src/components/base/form/form_combobox/form_combobox.documentation.js +0 -6
  185. package/src/components/base/form/form_group/form_group.documentation.js +0 -5
  186. package/src/components/base/form/form_input/form_input.documentation.js +0 -6
  187. package/src/components/base/form/form_input_group/form_input_group.documentation.js +0 -6
  188. package/src/components/base/form/form_radio/form_radio.documentation.js +0 -6
  189. package/src/components/base/form/form_radio_group/form_radio_group.documentation.js +0 -6
  190. package/src/components/base/form/form_select/form_select.documentation.js +0 -6
  191. package/src/components/base/form/form_text/form_text.documentation.js +0 -7
  192. package/src/components/base/form/form_textarea/form_textarea.documentation.js +0 -5
  193. package/src/components/base/form/input_group_text/input_group_text.documentation.js +0 -5
  194. package/src/components/base/icon/icon.documentation.js +0 -6
  195. package/src/components/base/infinite_scroll/examples/index.js +0 -57
  196. package/src/components/base/infinite_scroll/examples/infinite_scroll.all_items.example.vue +0 -25
  197. package/src/components/base/infinite_scroll/examples/infinite_scroll.basic.example.vue +0 -43
  198. package/src/components/base/infinite_scroll/examples/infinite_scroll.finite_total_items.example.vue +0 -44
  199. package/src/components/base/infinite_scroll/examples/infinite_scroll.large_fetched_items.example.vue +0 -43
  200. package/src/components/base/infinite_scroll/examples/infinite_scroll.reverse.example.vue +0 -46
  201. package/src/components/base/infinite_scroll/examples/infinite_scroll.small_fetched_items.example.vue +0 -43
  202. package/src/components/base/infinite_scroll/examples/infinite_scroll.two_way.example.vue +0 -75
  203. package/src/components/base/infinite_scroll/infinite_scroll.documentation.js +0 -6
  204. package/src/components/base/keyset_pagination/keyset_pagination.documentation.js +0 -6
  205. package/src/components/base/label/label.documentation.js +0 -6
  206. package/src/components/base/link/link.documentation.js +0 -5
  207. package/src/components/base/loading_icon/loading_icon.documentation.js +0 -6
  208. package/src/components/base/markdown/markdown.documentation.js +0 -5
  209. package/src/components/base/modal/modal.documentation.js +0 -6
  210. package/src/components/base/nav/nav.documentation.js +0 -5
  211. package/src/components/base/navbar/navbar.documentation.js +0 -5
  212. package/src/components/base/paginated_list/paginated_list.documentation.js +0 -5
  213. package/src/components/base/pagination/pagination.documentation.js +0 -6
  214. package/src/components/base/path/path.documentation.js +0 -6
  215. package/src/components/base/popover/popover.documentation.js +0 -3
  216. package/src/components/base/search_box_by_click/search_box_by_click.documentation.js +0 -6
  217. package/src/components/base/search_box_by_type/search_box_by_type.documentation.js +0 -6
  218. package/src/components/base/segmented_control/segmented_control.documentation.js +0 -6
  219. package/src/components/base/skeleton_loader/skeleton_loader.documentation.js +0 -6
  220. package/src/components/base/skeleton_loading/skeleton_loading.documentation.js +0 -5
  221. package/src/components/base/sorting/sorting.documentation.js +0 -5
  222. package/src/components/base/sorting/sorting_item.documentation.js +0 -6
  223. package/src/components/base/table/table.documentation.js +0 -6
  224. package/src/components/base/table_lite/table_lite.documentation.js +0 -6
  225. package/src/components/base/tabs/tabs/tabs.documentation.js +0 -6
  226. package/src/components/base/toast/toast.documentation.js +0 -6
  227. package/src/components/base/toggle/toggle.documentation.js +0 -6
  228. package/src/components/base/token/token.documentation.js +0 -3
  229. package/src/components/base/token_selector/token_selector.documentation.js +0 -5
  230. package/src/components/base/tooltip/tooltip.documentation.js +0 -6
  231. package/src/components/charts/area/area.documentation.js +0 -3
  232. package/src/components/charts/bar/bar.documentation.js +0 -6
  233. package/src/components/charts/chart/chart.documentation.js +0 -5
  234. package/src/components/charts/column/column.documentation.js +0 -3
  235. package/src/components/charts/discrete_scatter/discrete_scatter.documentation.js +0 -3
  236. package/src/components/charts/gauge/gauge.documentation.js +0 -5
  237. package/src/components/charts/heatmap/heatmap.documentation.js +0 -6
  238. package/src/components/charts/line/line.documentation.js +0 -6
  239. package/src/components/charts/series_label/series_label.documentation.js +0 -5
  240. package/src/components/charts/single_stat/single_stat.documentation.js +0 -5
  241. package/src/components/charts/sparkline/sparkline.documentation.js +0 -6
  242. package/src/components/charts/stacked_column/stacked_column.documentation.js +0 -6
  243. package/src/components/charts/tooltip/tooltip.documentation.js +0 -6
  244. package/src/components/editors/rich_text_editor/rich_text_editor.documentation.js +0 -5
  245. package/src/components/regions/dashboard_skeleton/dashboard_skeleton.documentation.js +0 -5
  246. package/src/components/regions/empty_state/empty_state.documentation.js +0 -5
  247. package/src/components/utilities/animated_number/animated_number.documentation.js +0 -6
  248. package/src/components/utilities/friendly_wrap/friendly_wrap.documentation.js +0 -5
  249. package/src/components/utilities/intersection_observer/intersection_observer.documentation.js +0 -5
  250. package/src/components/utilities/intersperse/intersperse.documentation.js +0 -6
  251. package/src/components/utilities/sprintf/sprintf.documentation.js +0 -6
  252. package/src/components/utilities/truncate/truncate.documentation.js +0 -5
  253. package/src/directives/hover_load/hover_load.documentation.js +0 -6
  254. package/src/directives/outside/outside.documentation.js +0 -6
  255. package/src/directives/resize_observer/resize_observer.documentation.js +0 -6
  256. package/src/directives/safe_html/safe_html.documentation.js +0 -6
  257. package/src/directives/safe_link/safe_link.documentation.js +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "39.2.1",
3
+ "version": "39.3.2",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -17,8 +17,7 @@
17
17
  "files": [
18
18
  "src",
19
19
  "dist",
20
- "scss_to_js",
21
- "documentation"
20
+ "scss_to_js"
22
21
  ],
23
22
  "scripts": {
24
23
  "build": "NODE_ENV=production rollup -c",
@@ -56,17 +55,12 @@
56
55
  "generate:component": "plop"
57
56
  },
58
57
  "dependencies": {
59
- "@babel/standalone": "^7.0.0",
60
58
  "bootstrap-vue": "2.20.1",
61
- "copy-to-clipboard": "^3.0.8",
62
59
  "dompurify": "^2.3.6",
63
60
  "echarts": "^5.2.1",
64
- "highlight.js": "^10.6.0",
65
61
  "iframe-resizer": "^4.3.2",
66
- "js-beautify": "^1.8.8",
67
62
  "lodash": "^4.17.20",
68
63
  "portal-vue": "^2.1.6",
69
- "url-search-params-polyfill": "^5.0.0",
70
64
  "vue-runtime-helpers": "^1.1.2"
71
65
  },
72
66
  "peerDependencies": {
@@ -88,7 +82,7 @@
88
82
  "@babel/preset-env": "^7.10.2",
89
83
  "@gitlab/eslint-plugin": "12.0.1",
90
84
  "@gitlab/stylelint-config": "4.0.0",
91
- "@gitlab/svgs": "2.10.0",
85
+ "@gitlab/svgs": "2.11.0",
92
86
  "@rollup/plugin-commonjs": "^11.1.0",
93
87
  "@rollup/plugin-node-resolve": "^7.1.3",
94
88
  "@rollup/plugin-replace": "^2.3.2",
@@ -114,7 +108,7 @@
114
108
  "eslint": "7.32.0",
115
109
  "eslint-import-resolver-jest": "3.0.2",
116
110
  "eslint-plugin-cypress": "2.12.1",
117
- "eslint-plugin-storybook": "0.5.7",
111
+ "eslint-plugin-storybook": "0.5.11",
118
112
  "file-loader": "^4.2.0",
119
113
  "glob": "^7.2.0",
120
114
  "identity-obj-proxy": "^3.0.0",
@@ -132,7 +126,6 @@
132
126
  "postcss-loader": "^3.0.0",
133
127
  "postcss-scss": "^2.1.1",
134
128
  "prettier": "2.2.1",
135
- "pug": "^2.0.3",
136
129
  "puppeteer": "11.0.0",
137
130
  "raw-loader": "^0.5.1",
138
131
  "rollup": "^2.53.1",
@@ -149,10 +142,10 @@
149
142
  "stylelint": "14.3.0",
150
143
  "stylelint-config-prettier": "9.0.3",
151
144
  "stylelint-prettier": "2.0.0",
152
- "vue": "^2.6.11",
145
+ "vue": "2.6.11",
153
146
  "vue-jest": "4.0.0-rc.0",
154
147
  "vue-loader": "^15.8.3",
155
- "vue-template-compiler": "^2.6.11"
148
+ "vue-template-compiler": "2.6.11"
156
149
  },
157
150
  "release": {
158
151
  "branches": [
@@ -27,6 +27,7 @@ export const limitedLayoutWidth = '990px'
27
27
  export const black = '#000'
28
28
  export const blackNormal = '#333'
29
29
  export const white = '#fff'
30
+ export const whiteContrast = '#fff'
30
31
  export const whiteNormal = '#f0f0f0'
31
32
  export const whiteDark = '#eaeaea'
32
33
  export const whiteTransparent = 'rgba(255, 255, 255, 0.8)'
@@ -291,8 +292,12 @@ export const glBorderRadius7 = '2rem'
291
292
  export const glBorderRadiusFull = '50%'
292
293
  export const glTransitionDurationSlow = '0.4s'
293
294
  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)'
295
+ export const outlineOffset = '1px'
296
+ export const outlineWidth = '2px'
297
+ export const focusRing = '0 0 0 1px #fff, 0 0 0 3px #428fdc'
298
+ export const focusRingInset = 'inset 0 0 0 3px #fff, inset 0 0 0 1px #fff'
299
+ export const focusRingDark = '0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 3px #63a6e9'
300
+ export const focusRingOutline = '2px solid #428fdc'
296
301
  export const toastMaxWidth = '36.625rem'
297
302
  export const toastPaddingRight = '2.625rem'
298
303
  export const toastBackgroundColor = '#303030'
@@ -172,6 +172,11 @@
172
172
  "value": "#fff",
173
173
  "compiledValue": "#fff"
174
174
  },
175
+ {
176
+ "name": "$white-contrast",
177
+ "value": "#fff",
178
+ "compiledValue": "#fff"
179
+ },
175
180
  {
176
181
  "name": "$white-normal",
177
182
  "value": "#f0f0f0",
@@ -1516,15 +1521,35 @@
1516
1521
  "value": "0.2s",
1517
1522
  "compiledValue": "0.2s"
1518
1523
  },
1524
+ {
1525
+ "name": "$outline-offset",
1526
+ "value": "1px",
1527
+ "compiledValue": "1px"
1528
+ },
1529
+ {
1530
+ "name": "$outline-width",
1531
+ "value": "2px",
1532
+ "compiledValue": "2px"
1533
+ },
1519
1534
  {
1520
1535
  "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)"
1536
+ "value": "0 0 0 $outline-offset $white, 0 0 0 #{$outline-offset + $outline-width} $blue-400",
1537
+ "compiledValue": "0 0 0 1px #fff, 0 0 0 3px #428fdc"
1523
1538
  },
1524
1539
  {
1525
1540
  "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)"
1541
+ "value": "inset 0 0 0 #{$outline-width + $outline-offset} $white, inset 0 0 0 $outline-offset $white",
1542
+ "compiledValue": "inset 0 0 0 3px #fff, inset 0 0 0 1px #fff"
1543
+ },
1544
+ {
1545
+ "name": "$focus-ring-dark",
1546
+ "value": "0 0 0 $outline-offset rgba($black, 0.6), 0 0 0 #{$outline-offset + $outline-width} $blue-300",
1547
+ "compiledValue": "0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 3px #63a6e9"
1548
+ },
1549
+ {
1550
+ "name": "$focus-ring-outline",
1551
+ "value": "$outline-width solid $blue-400",
1552
+ "compiledValue": "2px solid #428fdc"
1528
1553
  },
1529
1554
  {
1530
1555
  "name": "$toast-max-width",
@@ -2,6 +2,7 @@ import Vue from 'vue';
2
2
  import { GlAvatarLabeled, GlBadge } from '../../../index';
3
3
  import { GlTooltipDirective } from '../../../directives/tooltip';
4
4
  import { avatarSizeOptions, avatarShapeOptions, tooltipPlacements } from '../../../utils/constants';
5
+ import avatarPath from '../../../../static/img/avatar.png';
5
6
  import readme from './avatar_labeled.md';
6
7
 
7
8
  Vue.directive('gl-tooltip', GlTooltipDirective);
@@ -13,7 +14,7 @@ const generateProps = ({
13
14
  subLabel = '@gitlab',
14
15
  size = 32,
15
16
  shape = 'circle',
16
- src = 'https://assets.gitlab-static.net/uploads/-/system/group/avatar/9970/logo-extra-whitespace.png?width=64',
17
+ src = avatarPath,
17
18
  } = {}) => ({
18
19
  label,
19
20
  subLabel,
@@ -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;
@@ -1,5 +1,6 @@
1
1
  import { GlAvatarLink, GlAvatar, GlAvatarLabeled } from '../../../index';
2
2
  import { avatarSizeOptions, avatarShapeOptions } from '../../../utils/constants';
3
+ import avatarPath from '../../../../static/img/avatar.png';
3
4
  import readme from './avatar_link.md';
4
5
 
5
6
  const components = { GlAvatarLink, GlAvatar, GlAvatarLabeled };
@@ -19,9 +20,7 @@ const generateLabelsProps = ({ label = 'GitLab User', subLabel = '@gitlab' } = {
19
20
  subLabel,
20
21
  });
21
22
 
22
- const generateImageProps = ({
23
- src = 'https://assets.gitlab-static.net/uploads/-/system/project/avatar/278964/logo-extra-whitespace.png?width=64',
24
- } = {}) => ({
23
+ const generateImageProps = ({ src = avatarPath } = {}) => ({
25
24
  src,
26
25
  });
27
26
 
@@ -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
  }
@@ -18,7 +18,7 @@ to draw a `/`
18
18
  <img
19
19
  alt=""
20
20
  class="gl-breadcrumb-avatar-tile"
21
- src="https://assets.gitlab-static.net/uploads/-/system/group/avatar/9970/logo-extra-whitespace.png?width=16"
21
+ src="/path/to/image.png"
22
22
  width="16"
23
23
  height="16"
24
24
  />
@@ -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
  }
@@ -1,4 +1,5 @@
1
1
  import { GlBreadcrumb } from '../../../index';
2
+ import avatarPath from '../../../../static/img/avatar.png';
2
3
  import readme from './breadcrumb.md';
3
4
 
4
5
  const template = `
@@ -7,7 +8,7 @@ const template = `
7
8
  >
8
9
  <template #avatar>
9
10
  <img alt=""
10
- class="gl-breadcrumb-avatar-tile" src="https://assets.gitlab-static.net/uploads/-/system/group/avatar/9970/logo-extra-whitespace.png?width=16"
11
+ class="gl-breadcrumb-avatar-tile" src="${avatarPath}"
11
12
  width="16"
12
13
  height="16" />
13
14
  </template>
@@ -1,5 +1,5 @@
1
1
  .gl-broadcast-message {
2
- @include gl-text-white;
2
+ @include gl-text-contrast-light;
3
3
  @include gl-display-flex;
4
4
  @include gl-justify-content-space-between;
5
5
  @include gl-align-items-flex-start;
@@ -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
 
@@ -136,7 +136,7 @@
136
136
  &.btn-success,
137
137
  &.btn-danger,
138
138
  &.btn-warning {
139
- @include gl-text-white;
139
+ @include gl-text-contrast-light;
140
140
  }
141
141
 
142
142
  &.btn-confirm,
@@ -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 {
@@ -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,
@@ -3,6 +3,7 @@ import { BModal } from 'bootstrap-vue';
3
3
  import { merge } from 'lodash';
4
4
  import CloseButton from '../../shared_components/close_button/close_button.vue';
5
5
  import Button from '../button/button.vue';
6
+ import { logWarning } from '../../../utils/utils';
6
7
  import Modal from './modal.vue';
7
8
  import { modalButtonDefaults } from '~/utils/constants';
8
9
 
@@ -21,6 +22,10 @@ const BModalStub = merge({}, BModal.options, {
21
22
  },
22
23
  });
23
24
 
25
+ jest.mock('../../../utils/utils', () => ({
26
+ logWarning: jest.fn(),
27
+ }));
28
+
24
29
  describe('Modal component', () => {
25
30
  let wrapperListeners;
26
31
  let wrapper;
@@ -217,6 +222,21 @@ describe('Modal component', () => {
217
222
  });
218
223
  });
219
224
 
225
+ describe('accessible name warning', () => {
226
+ it.each`
227
+ description | title | ariaLabel | showWarning
228
+ ${'is logged when there is no title or ariaLabel'} | ${undefined} | ${undefined} | ${true}
229
+ ${'is not logged when there is a title'} | ${'modal title'} | ${undefined} | ${false}
230
+ ${'is not logged when there is an ariaLabel'} | ${undefined} | ${'modal title'} | ${false}
231
+ ${'is not logged when there is a title and ariaLabel'} | ${'modal title'} | ${'modal title'} | ${false}
232
+ `('$description', ({ title, ariaLabel, showWarning }) => {
233
+ createComponent({ props: { title, ariaLabel } });
234
+
235
+ const calledTimes = showWarning ? 1 : 0;
236
+ expect(logWarning).toHaveBeenCalledTimes(calledTimes);
237
+ });
238
+ });
239
+
220
240
  it('it binds visible property to the BModal visible property', async () => {
221
241
  createComponent({ stubModal: false });
222
242