@gitlab/ui 114.3.0 → 114.7.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/README.md +4 -2
- package/bin/migrate_custom_utils_to_tw.bundled.mjs +398 -401
- package/dist/components/base/link/link.js +6 -5
- package/dist/components/base/sorting/sorting.js +10 -1
- package/dist/components/base/table/constants.js +1 -1
- package/dist/components/base/toast/toast.js +1 -1
- package/dist/components/base/toggle/toggle.js +0 -1
- package/dist/config.js +1 -1
- package/dist/directives/safe_link/mock_data.js +1 -1
- package/dist/directives/safe_link/safe_link.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/utils/is_slot_empty.js +0 -2
- package/dist/utils/number_utils.js +3 -3
- package/dist/utils/use_mock_intersection_observer.js +0 -4
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +1 -1
- package/package.json +9 -6
- package/src/components/base/button/button.md +1 -1
- package/src/components/base/drawer/drawer.scss +2 -1
- package/src/components/base/form/form_character_count/form_character_count.md +1 -1
- package/src/components/base/form/form_combobox/form_combobox.md +4 -4
- package/src/components/base/link/link.md +34 -1
- package/src/components/base/link/link.scss +1 -1
- package/src/components/base/link/link.vue +6 -4
- package/src/components/base/sorting/sorting.vue +11 -0
- package/src/components/base/table/constants.js +1 -1
- package/src/components/base/toast/toast.js +1 -1
- package/src/components/base/toggle/toggle.vue +2 -3
- package/src/components/charts/heatmap/heatmap.md +1 -1
- package/src/config.js +1 -1
- package/src/directives/safe_link/mock_data.js +1 -1
- package/src/directives/safe_link/safe_link.js +1 -1
- package/src/utils/is_slot_empty.js +0 -1
- package/src/utils/number_utils.js +3 -3
- package/src/utils/use_mock_intersection_observer.js +1 -3
- package/src/vendor/bootstrap-vue/src/components/table/_table.scss +2 -4
- package/src/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +1 -1
- package/translations.js +1 -0
|
@@ -10,7 +10,7 @@ import { isEvent } from '../../../vendor/bootstrap-vue/src/utils/inspect';
|
|
|
10
10
|
import { stringifyQueryObj } from '../../../vendor/bootstrap-vue/src/utils/router';
|
|
11
11
|
import { safeVueInstance } from '../../../vendor/bootstrap-vue/src/utils/safe-vue-instance';
|
|
12
12
|
import { attemptFocus, attemptBlur } from '../../../vendor/bootstrap-vue/src/utils/dom';
|
|
13
|
-
import { linkVariantOptions, isVue3, linkVariantInline,
|
|
13
|
+
import { linkVariantOptions, isVue3, linkVariantUnstyled, linkVariantInline, linkVariantMeta } from '../../../utils/constants';
|
|
14
14
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
15
15
|
|
|
16
16
|
//
|
|
@@ -124,7 +124,7 @@ var script = {
|
|
|
124
124
|
default: null
|
|
125
125
|
},
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Controls ↗ character visibility for external links
|
|
128
128
|
*/
|
|
129
129
|
showExternalIcon: {
|
|
130
130
|
type: Boolean,
|
|
@@ -161,8 +161,9 @@ var script = {
|
|
|
161
161
|
isVue3RouterLink() {
|
|
162
162
|
return this.tag === VUE_ROUTER_LINK_TAG && isVue3;
|
|
163
163
|
},
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
shouldShowExternalIcon() {
|
|
165
|
+
const allowedVariants = [linkVariantInline, linkVariantMeta, null]; // null represents default/UI variant
|
|
166
|
+
return this.showExternalIcon && allowedVariants.includes(this.variant) && this.href && isExternalURL(this.target, this.href);
|
|
166
167
|
},
|
|
167
168
|
computedHref() {
|
|
168
169
|
const fallback = '#';
|
|
@@ -234,7 +235,7 @@ var script = {
|
|
|
234
235
|
return ['gl-link', linkVariantOptions[this.variant], {
|
|
235
236
|
disabled: this.disabled,
|
|
236
237
|
active: this.active,
|
|
237
|
-
'gl-link-
|
|
238
|
+
'gl-link-external': this.shouldShowExternalIcon
|
|
238
239
|
}];
|
|
239
240
|
}
|
|
240
241
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import uniqueId from 'lodash/uniqueId';
|
|
1
2
|
import { GlTooltipDirective } from '../../../directives/tooltip/tooltip';
|
|
2
3
|
import GlButton from '../button/button';
|
|
3
4
|
import GlButtonGroup from '../button_group/button_group';
|
|
@@ -94,7 +95,15 @@ var script = {
|
|
|
94
95
|
default: false
|
|
95
96
|
}
|
|
96
97
|
},
|
|
98
|
+
data() {
|
|
99
|
+
return {
|
|
100
|
+
sortingListboxId: uniqueId('sorting-listbox-')
|
|
101
|
+
};
|
|
102
|
+
},
|
|
97
103
|
computed: {
|
|
104
|
+
sortingListboxLabel() {
|
|
105
|
+
return translate('GlSorting.sortByLabel', 'Sort by:');
|
|
106
|
+
},
|
|
98
107
|
localSortDirection() {
|
|
99
108
|
return this.isAscending ? 'sort-lowest' : 'sort-highest';
|
|
100
109
|
},
|
|
@@ -136,7 +145,7 @@ var script = {
|
|
|
136
145
|
const __vue_script__ = script;
|
|
137
146
|
|
|
138
147
|
/* template */
|
|
139
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{staticClass:"gl-sorting"},[_c('gl-collapsible-listbox',{class:_vm.dropdownClass,attrs:{"toggle-text":_vm.text,"items":_vm.sortOptions,"selected":_vm.sortBy,"toggle-class":_vm.dropdownToggleClass,"placement":"bottom-end","block":_vm.block},on:{"select":_vm.onSortByChanged}}),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:['sorting-direction-button', _vm.sortDirectionToggleClass],attrs:{"title":_vm.sortDirectionText,"icon":_vm.localSortDirection,"aria-label":_vm.sortDirectionText},on:{"click":_vm.toggleSortDirection}})],1)};
|
|
148
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{staticClass:"gl-sorting"},[_c('gl-collapsible-listbox',{class:_vm.dropdownClass,attrs:{"toggle-text":_vm.text,"items":_vm.sortOptions,"selected":_vm.sortBy,"toggle-class":_vm.dropdownToggleClass,"placement":"bottom-end","block":_vm.block,"toggle-aria-labelled-by":_vm.sortingListboxId},on:{"select":_vm.onSortByChanged}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only",attrs:{"id":_vm.sortingListboxId}},[_vm._v(_vm._s(_vm.sortingListboxLabel))]),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:['sorting-direction-button', _vm.sortDirectionToggleClass],attrs:{"title":_vm.sortDirectionText,"icon":_vm.localSortDirection,"aria-label":_vm.sortDirectionText},on:{"click":_vm.toggleSortDirection}})],1)};
|
|
140
149
|
var __vue_staticRenderFns__ = [];
|
|
141
150
|
|
|
142
151
|
/* style */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const tableFullSlots = ['bottom-row', 'empty', 'emptyfiltered', 'table-busy', 'thead-top', 'top-row'];
|
|
2
2
|
const tableFullProps = ['api-url', 'busy', 'current-page', 'empty-filtered-html', 'empty-filtered-text', 'empty-html', 'empty-text', 'filter', 'filter-debounce', 'filter-function', 'filter-ignored-fields', 'filter-included-fields', 'label-sort-asc', 'label-sort-clear', 'label-sort-desc', 'no-footer-sorting', 'no-local-sorting', 'no-provider-filtering', 'no-provider-paging', 'no-provider-sorting', 'no-select-on-click', 'per-page', 'select-mode', 'selectable', 'selected-variant', 'show-empty', 'sort-by', 'sort-compare', 'sort-compare-locale', 'sort-compare-options', 'sort-desc', 'sort-direction', 'sort-icon-left', 'sort-null-last'];
|
|
3
|
-
const glTableLiteWarning = 'This GlTable could be a GlTableLite component, please consider using GlTableLite instead of GlTable to reduce the page bundlesize more about this here: https://
|
|
3
|
+
const glTableLiteWarning = 'This GlTable could be a GlTableLite component, please consider using GlTableLite instead of GlTable to reduce the page bundlesize more about this here: https://design.gitlab.com/storybook?path=/docs/base-table-table-lite--default';
|
|
4
4
|
|
|
5
5
|
export { glTableLiteWarning, tableFullProps, tableFullSlots };
|
|
@@ -65,7 +65,7 @@ function showToast(message) {
|
|
|
65
65
|
* Note: This is not a typical Vue component and needs to be registered before instantiating a Vue app.
|
|
66
66
|
* Once registered, the toast will be globally available throughout your app.
|
|
67
67
|
*
|
|
68
|
-
* See https://
|
|
68
|
+
* See https://design.gitlab.com/storybook for detailed documentation.
|
|
69
69
|
*/
|
|
70
70
|
var toast = {
|
|
71
71
|
install(Vue) {
|
package/dist/config.js
CHANGED
|
@@ -2,7 +2,7 @@ const absoluteUrls = ['http://example.org', 'http://example.org:8080', 'https://
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-script-url */
|
|
4
4
|
const javascriptUrls = ['javascript:', 'javascript:alert("XSS")', 'jav\tascript:alert("XSS");'];
|
|
5
|
-
/* eslint-
|
|
5
|
+
/* eslint-enable no-script-url */
|
|
6
6
|
|
|
7
7
|
const encodedJavaScriptUrls = ['javascript:alert('XSS')', 'javascript:alert('XSS')', 'javascript:alert('XSS')', '  javascript:alert("XSS");'];
|
|
8
8
|
const relativeUrls = ['./relative/link', '../relative/link', '/relative/link', '/users/sign_in', '#docs/link', '#'];
|