@gitlab/ui 39.2.0 → 39.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/components/base/modal/modal.js +14 -2
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +5 -12
- package/scss_to_js/scss_variables.js +6 -2
- package/scss_to_js/scss_variables.json +24 -4
- package/src/components/base/avatar_link/avatar_link.scss +1 -0
- package/src/components/base/badge/badge.scss +1 -1
- package/src/components/base/breadcrumb/breadcrumb.scss +1 -1
- package/src/components/base/button/button.scss +34 -34
- package/src/components/base/carousel/carousel.scss +7 -0
- package/src/components/base/datepicker/datepicker.scss +4 -0
- package/src/components/base/dropdown/dropdown.scss +8 -0
- package/src/components/base/dropdown/dropdown_item.scss +0 -1
- package/src/components/base/form/form_checkbox/form_checkbox.scss +1 -1
- package/src/components/base/form/form_input/form_input.scss +2 -2
- package/src/components/base/form/form_select/form_select.scss +2 -2
- package/src/components/base/label/label.scss +2 -1
- package/src/components/base/link/link.scss +1 -1
- package/src/components/base/link/link.stories.js +15 -0
- package/src/components/base/modal/modal.spec.js +20 -0
- package/src/components/base/modal/modal.vue +14 -1
- package/src/components/base/nav/nav.scss +7 -0
- package/src/components/base/pagination/pagination.scss +14 -7
- package/src/components/base/path/path.scss +29 -5
- package/src/components/base/search_box_by_click/search_box_by_click.scss +1 -1
- package/src/components/base/table/table.scss +6 -0
- package/src/components/base/token/token.scss +6 -0
- package/src/components/base/token_selector/token_selector.scss +2 -2
- package/src/components/shared_components/close_button/close_button.scss +11 -11
- package/src/scss/components.scss +3 -1
- package/src/scss/mixins.scss +26 -4
- package/src/scss/utilities.scss +0 -8
- package/src/scss/utility-mixins/outline.scss +1 -1
- package/src/scss/variables.scss +8 -4
- package/dist/components/base/accordion/accordion.documentation.js +0 -8
- package/dist/components/base/accordion/accordion_item.documentation.js +0 -7
- package/dist/components/base/alert/alert.documentation.js +0 -13
- package/dist/components/base/avatar/avatar.documentation.js +0 -8
- package/dist/components/base/avatar_labeled/avatar_labeled.documentation.js +0 -8
- package/dist/components/base/avatar_link/avatar_link.documentation.js +0 -8
- package/dist/components/base/avatars_inline/avatars_inline.documentation.js +0 -13
- package/dist/components/base/badge/badge.documentation.js +0 -8
- package/dist/components/base/banner/banner.documentation.js +0 -8
- package/dist/components/base/breadcrumb/breadcrumb.documentation.js +0 -8
- package/dist/components/base/broadcast_message/broadcast_message.documentation.js +0 -8
- package/dist/components/base/button/button.documentation.js +0 -24
- package/dist/components/base/button_group/button_group.documentation.js +0 -8
- package/dist/components/base/card/card.documentation.js +0 -13
- package/dist/components/base/carousel/carousel.documentation.js +0 -8
- package/dist/components/base/collapse/collapse.documentation.js +0 -7
- package/dist/components/base/datepicker/datepicker.documentation.js +0 -7
- package/dist/components/base/daterange_picker/daterange_picker.documentation.js +0 -8
- package/dist/components/base/drawer/drawer.documentation.js +0 -8
- package/dist/components/base/dropdown/dropdown.documentation.js +0 -8
- package/dist/components/base/dropdown/dropdown_item.documentation.js +0 -7
- package/dist/components/base/filtered_search/filtered_search.documentation.js +0 -13
- package/dist/components/base/filtered_search/filtered_search_suggestion.documentation.js +0 -7
- package/dist/components/base/filtered_search/filtered_search_suggestion_list.documentation.js +0 -7
- package/dist/components/base/filtered_search/filtered_search_term.documentation.js +0 -12
- package/dist/components/base/filtered_search/filtered_search_token.documentation.js +0 -12
- package/dist/components/base/filtered_search/filtered_search_token_segment.documentation.js +0 -12
- package/dist/components/base/form/form.documentation.js +0 -7
- package/dist/components/base/form/form_checkbox/form_checkbox.documentation.js +0 -8
- package/dist/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation.js +0 -12
- package/dist/components/base/form/form_combobox/form_combobox.documentation.js +0 -13
- package/dist/components/base/form/form_group/form_group.documentation.js +0 -7
- package/dist/components/base/form/form_input/form_input.documentation.js +0 -8
- package/dist/components/base/form/form_input_group/form_input_group.documentation.js +0 -8
- package/dist/components/base/form/form_radio/form_radio.documentation.js +0 -8
- package/dist/components/base/form/form_radio_group/form_radio_group.documentation.js +0 -8
- package/dist/components/base/form/form_select/form_select.documentation.js +0 -8
- package/dist/components/base/form/form_text/form_text.documentation.js +0 -14
- package/dist/components/base/form/form_textarea/form_textarea.documentation.js +0 -7
- package/dist/components/base/form/input_group_text/input_group_text.documentation.js +0 -12
- package/dist/components/base/icon/icon.documentation.js +0 -8
- package/dist/components/base/infinite_scroll/examples/index.js +0 -49
- package/dist/components/base/infinite_scroll/examples/infinite_scroll.all_items.example.js +0 -49
- package/dist/components/base/infinite_scroll/examples/infinite_scroll.basic.example.js +0 -62
- package/dist/components/base/infinite_scroll/examples/infinite_scroll.finite_total_items.example.js +0 -72
- package/dist/components/base/infinite_scroll/examples/infinite_scroll.large_fetched_items.example.js +0 -62
- package/dist/components/base/infinite_scroll/examples/infinite_scroll.reverse.example.js +0 -63
- package/dist/components/base/infinite_scroll/examples/infinite_scroll.small_fetched_items.example.js +0 -62
- package/dist/components/base/infinite_scroll/examples/infinite_scroll.two_way.example.js +0 -94
- package/dist/components/base/infinite_scroll/infinite_scroll.documentation.js +0 -8
- package/dist/components/base/keyset_pagination/keyset_pagination.documentation.js +0 -13
- package/dist/components/base/label/label.documentation.js +0 -8
- package/dist/components/base/link/link.documentation.js +0 -7
- package/dist/components/base/loading_icon/loading_icon.documentation.js +0 -8
- package/dist/components/base/markdown/markdown.documentation.js +0 -12
- package/dist/components/base/modal/modal.documentation.js +0 -8
- package/dist/components/base/nav/nav.documentation.js +0 -12
- package/dist/components/base/navbar/navbar.documentation.js +0 -12
- package/dist/components/base/paginated_list/paginated_list.documentation.js +0 -7
- package/dist/components/base/pagination/pagination.documentation.js +0 -8
- package/dist/components/base/path/path.documentation.js +0 -8
- package/dist/components/base/popover/popover.documentation.js +0 -5
- package/dist/components/base/search_box_by_click/search_box_by_click.documentation.js +0 -8
- package/dist/components/base/search_box_by_type/search_box_by_type.documentation.js +0 -8
- package/dist/components/base/segmented_control/segmented_control.documentation.js +0 -8
- package/dist/components/base/skeleton_loader/skeleton_loader.documentation.js +0 -13
- package/dist/components/base/skeleton_loading/skeleton_loading.documentation.js +0 -7
- package/dist/components/base/sorting/sorting.documentation.js +0 -7
- package/dist/components/base/sorting/sorting_item.documentation.js +0 -8
- package/dist/components/base/table/table.documentation.js +0 -8
- package/dist/components/base/table_lite/table_lite.documentation.js +0 -13
- package/dist/components/base/tabs/tabs/tabs.documentation.js +0 -8
- package/dist/components/base/toast/toast.documentation.js +0 -8
- package/dist/components/base/toggle/toggle.documentation.js +0 -13
- package/dist/components/base/token/token.documentation.js +0 -5
- package/dist/components/base/token_selector/token_selector.documentation.js +0 -12
- package/dist/components/base/tooltip/tooltip.documentation.js +0 -8
- package/dist/components/charts/area/area.documentation.js +0 -5
- package/dist/components/charts/bar/bar.documentation.js +0 -8
- package/dist/components/charts/chart/chart.documentation.js +0 -7
- package/dist/components/charts/column/column.documentation.js +0 -5
- package/dist/components/charts/discrete_scatter/discrete_scatter.documentation.js +0 -5
- package/dist/components/charts/gauge/gauge.documentation.js +0 -12
- package/dist/components/charts/heatmap/heatmap.documentation.js +0 -8
- package/dist/components/charts/line/line.documentation.js +0 -8
- package/dist/components/charts/series_label/series_label.documentation.js +0 -7
- package/dist/components/charts/single_stat/single_stat.documentation.js +0 -7
- package/dist/components/charts/sparkline/sparkline.documentation.js +0 -8
- package/dist/components/charts/stacked_column/stacked_column.documentation.js +0 -8
- package/dist/components/charts/tooltip/tooltip.documentation.js +0 -8
- package/dist/components/editors/rich_text_editor/rich_text_editor.documentation.js +0 -12
- package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.documentation.js +0 -7
- package/dist/components/regions/empty_state/empty_state.documentation.js +0 -7
- package/dist/components/utilities/animated_number/animated_number.documentation.js +0 -13
- package/dist/components/utilities/friendly_wrap/friendly_wrap.documentation.js +0 -7
- package/dist/components/utilities/intersection_observer/intersection_observer.documentation.js +0 -12
- package/dist/components/utilities/intersperse/intersperse.documentation.js +0 -8
- package/dist/components/utilities/sprintf/sprintf.documentation.js +0 -8
- package/dist/components/utilities/truncate/truncate.documentation.js +0 -7
- package/dist/directives/hover_load/hover_load.documentation.js +0 -13
- package/dist/directives/outside/outside.documentation.js +0 -13
- package/dist/directives/resize_observer/resize_observer.documentation.js +0 -8
- package/dist/directives/safe_html/safe_html.documentation.js +0 -8
- package/dist/directives/safe_link/safe_link.documentation.js +0 -8
- package/documentation/all_components.js +0 -8
- package/documentation/components/component_documentation_generator.vue +0 -321
- package/documentation/components/example_display.vue +0 -231
- package/documentation/components/example_explorer.vue +0 -63
- package/documentation/components_documentation.js +0 -111
- package/documentation/index.js +0 -8
- package/src/components/base/accordion/accordion.documentation.js +0 -6
- package/src/components/base/accordion/accordion_item.documentation.js +0 -5
- package/src/components/base/alert/alert.documentation.js +0 -6
- package/src/components/base/avatar/avatar.documentation.js +0 -6
- package/src/components/base/avatar_labeled/avatar_labeled.documentation.js +0 -6
- package/src/components/base/avatar_link/avatar_link.documentation.js +0 -6
- package/src/components/base/avatars_inline/avatars_inline.documentation.js +0 -6
- package/src/components/base/badge/badge.documentation.js +0 -6
- package/src/components/base/banner/banner.documentation.js +0 -6
- package/src/components/base/breadcrumb/breadcrumb.documentation.js +0 -6
- package/src/components/base/broadcast_message/broadcast_message.documentation.js +0 -6
- package/src/components/base/button/button.documentation.js +0 -24
- package/src/components/base/button_group/button_group.documentation.js +0 -6
- package/src/components/base/card/card.documentation.js +0 -6
- package/src/components/base/carousel/carousel.documentation.js +0 -6
- package/src/components/base/collapse/collapse.documentation.js +0 -5
- package/src/components/base/datepicker/datepicker.documentation.js +0 -5
- package/src/components/base/daterange_picker/daterange_picker.documentation.js +0 -6
- package/src/components/base/drawer/drawer.documentation.js +0 -6
- package/src/components/base/dropdown/dropdown.documentation.js +0 -6
- package/src/components/base/dropdown/dropdown_item.documentation.js +0 -5
- package/src/components/base/filtered_search/filtered_search.documentation.js +0 -6
- package/src/components/base/filtered_search/filtered_search_suggestion.documentation.js +0 -5
- package/src/components/base/filtered_search/filtered_search_suggestion_list.documentation.js +0 -5
- package/src/components/base/filtered_search/filtered_search_term.documentation.js +0 -5
- package/src/components/base/filtered_search/filtered_search_token.documentation.js +0 -5
- package/src/components/base/filtered_search/filtered_search_token_segment.documentation.js +0 -5
- package/src/components/base/form/form.documentation.js +0 -5
- package/src/components/base/form/form_checkbox/form_checkbox.documentation.js +0 -6
- package/src/components/base/form/form_checkbox_tree/form_checkbox_tree.documentation.js +0 -5
- package/src/components/base/form/form_combobox/form_combobox.documentation.js +0 -6
- package/src/components/base/form/form_group/form_group.documentation.js +0 -5
- package/src/components/base/form/form_input/form_input.documentation.js +0 -6
- package/src/components/base/form/form_input_group/form_input_group.documentation.js +0 -6
- package/src/components/base/form/form_radio/form_radio.documentation.js +0 -6
- package/src/components/base/form/form_radio_group/form_radio_group.documentation.js +0 -6
- package/src/components/base/form/form_select/form_select.documentation.js +0 -6
- package/src/components/base/form/form_text/form_text.documentation.js +0 -7
- package/src/components/base/form/form_textarea/form_textarea.documentation.js +0 -5
- package/src/components/base/form/input_group_text/input_group_text.documentation.js +0 -5
- package/src/components/base/icon/icon.documentation.js +0 -6
- package/src/components/base/infinite_scroll/examples/index.js +0 -57
- package/src/components/base/infinite_scroll/examples/infinite_scroll.all_items.example.vue +0 -25
- package/src/components/base/infinite_scroll/examples/infinite_scroll.basic.example.vue +0 -43
- package/src/components/base/infinite_scroll/examples/infinite_scroll.finite_total_items.example.vue +0 -44
- package/src/components/base/infinite_scroll/examples/infinite_scroll.large_fetched_items.example.vue +0 -43
- package/src/components/base/infinite_scroll/examples/infinite_scroll.reverse.example.vue +0 -46
- package/src/components/base/infinite_scroll/examples/infinite_scroll.small_fetched_items.example.vue +0 -43
- package/src/components/base/infinite_scroll/examples/infinite_scroll.two_way.example.vue +0 -75
- package/src/components/base/infinite_scroll/infinite_scroll.documentation.js +0 -6
- package/src/components/base/keyset_pagination/keyset_pagination.documentation.js +0 -6
- package/src/components/base/label/label.documentation.js +0 -6
- package/src/components/base/link/link.documentation.js +0 -5
- package/src/components/base/loading_icon/loading_icon.documentation.js +0 -6
- package/src/components/base/markdown/markdown.documentation.js +0 -5
- package/src/components/base/modal/modal.documentation.js +0 -6
- package/src/components/base/nav/nav.documentation.js +0 -5
- package/src/components/base/navbar/navbar.documentation.js +0 -5
- package/src/components/base/paginated_list/paginated_list.documentation.js +0 -5
- package/src/components/base/pagination/pagination.documentation.js +0 -6
- package/src/components/base/path/path.documentation.js +0 -6
- package/src/components/base/popover/popover.documentation.js +0 -3
- package/src/components/base/search_box_by_click/search_box_by_click.documentation.js +0 -6
- package/src/components/base/search_box_by_type/search_box_by_type.documentation.js +0 -6
- package/src/components/base/segmented_control/segmented_control.documentation.js +0 -6
- package/src/components/base/skeleton_loader/skeleton_loader.documentation.js +0 -6
- package/src/components/base/skeleton_loading/skeleton_loading.documentation.js +0 -5
- package/src/components/base/sorting/sorting.documentation.js +0 -5
- package/src/components/base/sorting/sorting_item.documentation.js +0 -6
- package/src/components/base/table/table.documentation.js +0 -6
- package/src/components/base/table_lite/table_lite.documentation.js +0 -6
- package/src/components/base/tabs/tabs/tabs.documentation.js +0 -6
- package/src/components/base/toast/toast.documentation.js +0 -6
- package/src/components/base/toggle/toggle.documentation.js +0 -6
- package/src/components/base/token/token.documentation.js +0 -3
- package/src/components/base/token_selector/token_selector.documentation.js +0 -5
- package/src/components/base/tooltip/tooltip.documentation.js +0 -6
- package/src/components/charts/area/area.documentation.js +0 -3
- package/src/components/charts/bar/bar.documentation.js +0 -6
- package/src/components/charts/chart/chart.documentation.js +0 -5
- package/src/components/charts/column/column.documentation.js +0 -3
- package/src/components/charts/discrete_scatter/discrete_scatter.documentation.js +0 -3
- package/src/components/charts/gauge/gauge.documentation.js +0 -5
- package/src/components/charts/heatmap/heatmap.documentation.js +0 -6
- package/src/components/charts/line/line.documentation.js +0 -6
- package/src/components/charts/series_label/series_label.documentation.js +0 -5
- package/src/components/charts/single_stat/single_stat.documentation.js +0 -5
- package/src/components/charts/sparkline/sparkline.documentation.js +0 -6
- package/src/components/charts/stacked_column/stacked_column.documentation.js +0 -6
- package/src/components/charts/tooltip/tooltip.documentation.js +0 -6
- package/src/components/editors/rich_text_editor/rich_text_editor.documentation.js +0 -5
- package/src/components/regions/dashboard_skeleton/dashboard_skeleton.documentation.js +0 -5
- package/src/components/regions/empty_state/empty_state.documentation.js +0 -5
- package/src/components/utilities/animated_number/animated_number.documentation.js +0 -6
- package/src/components/utilities/friendly_wrap/friendly_wrap.documentation.js +0 -5
- package/src/components/utilities/intersection_observer/intersection_observer.documentation.js +0 -5
- package/src/components/utilities/intersperse/intersperse.documentation.js +0 -6
- package/src/components/utilities/sprintf/sprintf.documentation.js +0 -6
- package/src/components/utilities/truncate/truncate.documentation.js +0 -5
- package/src/directives/hover_load/hover_load.documentation.js +0 -6
- package/src/directives/outside/outside.documentation.js +0 -6
- package/src/directives/resize_observer/resize_observer.documentation.js +0 -6
- package/src/directives/safe_html/safe_html.documentation.js +0 -6
- 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.
|
|
3
|
+
"version": "39.3.1",
|
|
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": {
|
|
@@ -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.
|
|
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": "
|
|
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": "
|
|
148
|
+
"vue-template-compiler": "2.6.11"
|
|
156
149
|
},
|
|
157
150
|
"release": {
|
|
158
151
|
"branches": [
|
|
@@ -291,8 +291,12 @@ export const glBorderRadius7 = '2rem'
|
|
|
291
291
|
export const glBorderRadiusFull = '50%'
|
|
292
292
|
export const glTransitionDurationSlow = '0.4s'
|
|
293
293
|
export const glTransitionDurationMedium = '0.2s'
|
|
294
|
-
export const
|
|
295
|
-
export const
|
|
294
|
+
export const outlineOffset = '1px'
|
|
295
|
+
export const outlineWidth = '2px'
|
|
296
|
+
export const focusRing = '0 0 0 1px #fff, 0 0 0 3px #428fdc'
|
|
297
|
+
export const focusRingInset = 'inset 0 0 0 3px #fff, inset 0 0 0 1px #fff'
|
|
298
|
+
export const focusRingDark = '0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 3px #63a6e9'
|
|
299
|
+
export const focusRingOutline = '2px solid #428fdc'
|
|
296
300
|
export const toastMaxWidth = '36.625rem'
|
|
297
301
|
export const toastPaddingRight = '2.625rem'
|
|
298
302
|
export const toastBackgroundColor = '#303030'
|
|
@@ -1516,15 +1516,35 @@
|
|
|
1516
1516
|
"value": "0.2s",
|
|
1517
1517
|
"compiledValue": "0.2s"
|
|
1518
1518
|
},
|
|
1519
|
+
{
|
|
1520
|
+
"name": "$outline-offset",
|
|
1521
|
+
"value": "1px",
|
|
1522
|
+
"compiledValue": "1px"
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"name": "$outline-width",
|
|
1526
|
+
"value": "2px",
|
|
1527
|
+
"compiledValue": "2px"
|
|
1528
|
+
},
|
|
1519
1529
|
{
|
|
1520
1530
|
"name": "$focus-ring",
|
|
1521
|
-
"value": "0 0 0 $
|
|
1522
|
-
"compiledValue": "0 0 0 1px
|
|
1531
|
+
"value": "0 0 0 $outline-offset $white, 0 0 0 #{$outline-offset + $outline-width} $blue-400",
|
|
1532
|
+
"compiledValue": "0 0 0 1px #fff, 0 0 0 3px #428fdc"
|
|
1523
1533
|
},
|
|
1524
1534
|
{
|
|
1525
1535
|
"name": "$focus-ring-inset",
|
|
1526
|
-
"value": "inset 0 0 0 $
|
|
1527
|
-
"compiledValue": "inset 0 0 0 3px
|
|
1536
|
+
"value": "inset 0 0 0 #{$outline-width + $outline-offset} $white, inset 0 0 0 $outline-offset $white",
|
|
1537
|
+
"compiledValue": "inset 0 0 0 3px #fff, inset 0 0 0 1px #fff"
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"name": "$focus-ring-dark",
|
|
1541
|
+
"value": "0 0 0 $outline-offset rgba($black, 0.6), 0 0 0 #{$outline-offset + $outline-width} $blue-300",
|
|
1542
|
+
"compiledValue": "0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 3px #63a6e9"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"name": "$focus-ring-outline",
|
|
1546
|
+
"value": "$outline-width solid $blue-400",
|
|
1547
|
+
"compiledValue": "2px solid #428fdc"
|
|
1528
1548
|
},
|
|
1529
1549
|
{
|
|
1530
1550
|
"name": "$toast-max-width",
|
|
@@ -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;
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
&:focus {
|
|
79
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
97
|
+
@include gl-focus($color: $gray-600);
|
|
98
|
+
}
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
100
|
+
&:focus .gl-icon {
|
|
101
|
+
@include gl-text-gray-900;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -149,17 +149,17 @@
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
&:focus {
|
|
152
|
-
@include gl-focus($
|
|
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($
|
|
158
|
+
@include gl-focus($color: $blue-900);
|
|
159
159
|
@include gl-bg-blue-700;
|
|
160
160
|
|
|
161
161
|
&:focus {
|
|
162
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
190
|
+
@include gl-focus($color: $blue-900);
|
|
191
191
|
@include gl-bg-blue-100;
|
|
192
192
|
|
|
193
193
|
&:focus {
|
|
194
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
214
|
+
@include gl-focus($color: $green-900);
|
|
215
215
|
@include gl-bg-green-700;
|
|
216
216
|
|
|
217
217
|
&:focus {
|
|
218
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
244
|
+
@include gl-focus($color: $green-900);
|
|
245
245
|
@include gl-bg-green-100;
|
|
246
246
|
|
|
247
247
|
&:focus {
|
|
248
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
268
|
+
@include gl-focus($color: $orange-900);
|
|
269
269
|
@include gl-bg-orange-700;
|
|
270
270
|
|
|
271
271
|
&:focus {
|
|
272
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
298
|
+
@include gl-focus($color: $orange-900);
|
|
299
299
|
@include gl-bg-orange-100;
|
|
300
300
|
|
|
301
301
|
&:focus {
|
|
302
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
322
|
+
@include gl-focus($color: $red-900);
|
|
323
323
|
@include gl-bg-red-700;
|
|
324
324
|
|
|
325
325
|
&:focus {
|
|
326
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
352
|
+
@include gl-focus($color: $red-900);
|
|
353
353
|
@include gl-bg-red-100;
|
|
354
354
|
|
|
355
355
|
&:focus {
|
|
356
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
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($
|
|
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
|
-
|
|
485
|
+
@include gl-shadow-none;
|
|
486
486
|
|
|
487
487
|
&:hover {
|
|
488
488
|
@include gl-bg-transparent;
|
|
@@ -121,6 +121,10 @@
|
|
|
121
121
|
|
|
122
122
|
&.gl-button {
|
|
123
123
|
@include gl-px-3;
|
|
124
|
+
|
|
125
|
+
&.btn-sm {
|
|
126
|
+
@include gl-px-2;
|
|
127
|
+
}
|
|
124
128
|
}
|
|
125
129
|
}
|
|
126
130
|
|
|
@@ -172,6 +176,10 @@
|
|
|
172
176
|
.dropdown-icon {
|
|
173
177
|
@include gl-mr-0;
|
|
174
178
|
}
|
|
179
|
+
|
|
180
|
+
&.btn-sm .dropdown-chevron {
|
|
181
|
+
@include gl-mx-0;
|
|
182
|
+
}
|
|
175
183
|
}
|
|
176
184
|
|
|
177
185
|
.split-content-button {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&:not(.form-control-plaintext):focus {
|
|
28
|
-
@include gl-focus($
|
|
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($
|
|
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($
|
|
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($
|
|
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($
|
|
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;
|
|
@@ -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
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
modalButtonDefaults,
|
|
7
7
|
modalSizeOptions,
|
|
8
8
|
} from '../../../utils/constants';
|
|
9
|
-
import { focusFirstFocusableElement } from '../../../utils/utils';
|
|
9
|
+
import { focusFirstFocusableElement, logWarning } from '../../../utils/utils';
|
|
10
10
|
import CloseButton from '../../shared_components/close_button/close_button.vue';
|
|
11
11
|
import GlButton from '../button/button.vue';
|
|
12
12
|
|
|
@@ -79,6 +79,11 @@ export default {
|
|
|
79
79
|
required: false,
|
|
80
80
|
default: false,
|
|
81
81
|
},
|
|
82
|
+
ariaLabel: {
|
|
83
|
+
type: String,
|
|
84
|
+
required: false,
|
|
85
|
+
default: '',
|
|
86
|
+
},
|
|
82
87
|
},
|
|
83
88
|
computed: {
|
|
84
89
|
shouldRenderModalOk() {
|
|
@@ -96,6 +101,13 @@ export default {
|
|
|
96
101
|
);
|
|
97
102
|
},
|
|
98
103
|
},
|
|
104
|
+
mounted() {
|
|
105
|
+
if (!this.ariaLabel && !this.title) {
|
|
106
|
+
logWarning(
|
|
107
|
+
'[gl-modal]: Accessible name for modal missing. Please add title prop or aria-label.'
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
},
|
|
99
111
|
methods: {
|
|
100
112
|
show() {
|
|
101
113
|
this.$refs.modal.show();
|
|
@@ -165,6 +177,7 @@ export default {
|
|
|
165
177
|
:title-tag="titleTag"
|
|
166
178
|
:size="size"
|
|
167
179
|
:visible="visible"
|
|
180
|
+
:aria-label="ariaLabel || title"
|
|
168
181
|
v-bind="$attrs"
|
|
169
182
|
lazy
|
|
170
183
|
:modal-class="['gl-modal', modalClass]"
|
|
@@ -19,23 +19,25 @@
|
|
|
19
19
|
|
|
20
20
|
&:not(.active):hover {
|
|
21
21
|
@include gl-text-gray-900;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
box-shadow: inset 0 0 0 1px $gray-400;
|
|
23
|
+
border-color: $gray-400;
|
|
24
|
+
background: $gray-50;
|
|
25
|
+
@include gl-z-index-1;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
&:not(.active):focus {
|
|
27
|
-
@include gl-focus($gl-border-size-2, $gray-400);
|
|
28
29
|
@include gl-bg-gray-50;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
&:not(.active):active,
|
|
32
33
|
&:not(.active).active {
|
|
33
|
-
@include gl-focus($gl-border-size-2, $gray-600);
|
|
34
34
|
@include gl-bg-gray-100;
|
|
35
|
+
}
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
&:not(.active):focus,
|
|
38
|
+
&:not(.active):active,
|
|
39
|
+
&:not(.active).active {
|
|
40
|
+
@include gl-focus();
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -45,6 +47,11 @@
|
|
|
45
47
|
@include gl-border-blue-600;
|
|
46
48
|
@include gl-text-white;
|
|
47
49
|
@include gl-z-index-2;
|
|
50
|
+
@include gl-shadow-none;
|
|
51
|
+
|
|
52
|
+
&:focus {
|
|
53
|
+
@include gl-focus();
|
|
54
|
+
}
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
&.disabled .page-link {
|