@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.
- 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 +6 -13
- package/scss_to_js/scss_variables.js +7 -2
- package/scss_to_js/scss_variables.json +29 -4
- package/src/components/base/avatar_labeled/avatar_labeled.stories.js +2 -1
- package/src/components/base/avatar_link/avatar_link.scss +1 -0
- package/src/components/base/avatar_link/avatar_link.stories.js +2 -3
- package/src/components/base/badge/badge.scss +1 -1
- package/src/components/base/breadcrumb/breadcrumb.md +1 -1
- package/src/components/base/breadcrumb/breadcrumb.scss +1 -1
- package/src/components/base/breadcrumb/breadcrumb.stories.js +2 -1
- package/src/components/base/broadcast_message/broadcast_message.scss +1 -1
- package/src/components/base/button/button.scss +35 -35
- package/src/components/base/carousel/carousel.scss +7 -0
- package/src/components/base/datepicker/datepicker.scss +4 -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 +8 -8
- package/src/scss/utility-mixins/color.scss +4 -0
- package/src/scss/utility-mixins/outline.scss +1 -1
- package/src/scss/variables.scss +9 -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.2
|
|
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.
|
|
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.
|
|
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": [
|
|
@@ -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
|
|
295
|
-
export const
|
|
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 $
|
|
1522
|
-
"compiledValue": "0 0 0 1px
|
|
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 $
|
|
1527
|
-
"compiledValue": "inset 0 0 0 3px
|
|
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 =
|
|
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
|
|
|
@@ -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="
|
|
11
|
+
class="gl-breadcrumb-avatar-tile" src="${avatarPath}"
|
|
11
12
|
width="16"
|
|
12
13
|
height="16" />
|
|
13
14
|
</template>
|
|
@@ -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
|
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
&.btn-success,
|
|
137
137
|
&.btn-danger,
|
|
138
138
|
&.btn-warning {
|
|
139
|
-
@include gl-text-
|
|
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($
|
|
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;
|
|
@@ -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
|
|