@gitlab/ui 128.13.1 → 128.13.3
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/dist/components/base/toast/toast.js +26 -24
- package/dist/components/base/toggle/toggle.js +9 -8
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/build/js/tokens.dark.js +2 -2
- package/dist/tokens/build/js/tokens.js +2 -2
- package/dist/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.js +17 -3
- package/dist/vendor/bootstrap-vue/src/components/toast/toast.js +6 -1
- package/package.json +4 -4
- package/src/components/base/alert/alert.scss +11 -6
- package/src/components/base/animated_icon/animated_icon.scss +31 -20
- package/src/components/base/avatar/avatar.scss +8 -9
- package/src/components/base/avatars_inline/avatars_inline.scss +12 -4
- package/src/components/base/breadcrumb/breadcrumb.scss +2 -2
- package/src/components/base/button/button.scss +16 -14
- package/src/components/base/button_group/button_group.scss +9 -9
- package/src/components/base/datepicker/datepicker.scss +6 -6
- package/src/components/base/drawer/drawer.scss +2 -2
- package/src/components/base/dropdown/dropdown.scss +4 -4
- package/src/components/base/dropdown/dropdown_divider.scss +1 -1
- package/src/components/base/form/form_checkbox/form_checkbox.scss +12 -12
- package/src/components/base/form/form_combobox/form_combobox.scss +3 -2
- package/src/components/base/form/form_input/form_input.scss +3 -1
- package/src/components/base/form/form_select/form_select.scss +2 -2
- package/src/components/base/label/label.scss +5 -2
- package/src/components/base/link/link.scss +1 -1
- package/src/components/base/loading_icon/loading_icon.scss +1 -1
- package/src/components/base/markdown/markdown.scss +1 -1
- package/src/components/base/new_dropdowns/dropdown.scss +15 -3
- package/src/components/base/new_dropdowns/dropdown_item.scss +3 -2
- package/src/components/base/pagination/pagination.scss +5 -4
- package/src/components/base/path/path.scss +8 -3
- package/src/components/base/progress_bar/progress_bar.scss +2 -2
- package/src/components/base/table/table.scss +4 -4
- package/src/components/base/tabs/tabs/tabs.scss +7 -6
- package/src/components/base/toast/toast.js +31 -29
- package/src/components/base/toast/toast.scss +2 -2
- package/src/components/base/toggle/toggle.vue +45 -46
- package/src/components/charts/legend/legend.scss +12 -8
- package/src/components/charts/single_stat/single_stat.scss +2 -2
- package/src/components/dashboards/dashboard_layout/grid_layout/grid_layout.scss +1 -1
- package/src/components/regions/empty_state/empty_state.scss +1 -1
- package/src/components/utilities/truncate/truncate.scss +1 -1
- package/src/scss/bootstrap.scss +34 -34
- package/src/scss/bootstrap_vue.scss +10 -10
- package/src/scss/components.scss +77 -77
- package/src/scss/fonts.scss +10 -10
- package/src/scss/functions.scss +6 -6
- package/src/scss/gitlab_ui.scss +10 -10
- package/src/scss/mixins.scss +23 -23
- package/src/scss/storybook.scss +14 -15
- package/src/scss/tokens.scss +2 -2
- package/src/scss/typescale/_index.scss +1 -1
- package/src/scss/typescale/typescale_demo.scss +4 -4
- package/src/scss/typography.scss +16 -6
- package/src/scss/variables.scss +29 -14
- package/src/tokens/build/css/tokens.css +2 -2
- package/src/tokens/build/css/tokens.dark.css +2 -2
- package/src/tokens/build/docs/tokens-tailwind-docs.dark.json +4 -0
- package/src/tokens/build/docs/tokens-tailwind-docs.json +4 -0
- package/src/tokens/build/figma/constants.dark.json +2 -2
- package/src/tokens/build/figma/constants.json +2 -2
- package/src/tokens/build/js/tokens.dark.js +2 -0
- package/src/tokens/build/js/tokens.js +2 -0
- package/src/tokens/build/json/tokens.dark.json +4 -0
- package/src/tokens/build/json/tokens.json +4 -0
- package/src/tokens/build/scss/_tokens.dark.scss +2 -2
- package/src/tokens/build/scss/_tokens.scss +2 -2
- package/src/tokens/constant/font.tokens.json +2 -0
- package/src/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.js +19 -3
- package/src/vendor/bootstrap-vue/src/components/toast/toast.js +6 -1
|
@@ -11,31 +11,33 @@ const DEFAULT_OPTIONS = {
|
|
|
11
11
|
appendToast: true
|
|
12
12
|
};
|
|
13
13
|
let toastsCount = 0;
|
|
14
|
-
function renderTitle(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
click: toast.hide
|
|
19
|
-
}
|
|
20
|
-
})];
|
|
21
|
-
if (options.action) {
|
|
22
|
-
const {
|
|
23
|
-
onClick,
|
|
24
|
-
text,
|
|
25
|
-
href
|
|
26
|
-
} = options.action;
|
|
27
|
-
nodes.unshift(h('a', {
|
|
28
|
-
attrs: {
|
|
29
|
-
role: href ? undefined : 'button',
|
|
30
|
-
href
|
|
31
|
-
},
|
|
32
|
-
class: ['gl-toast-action'],
|
|
14
|
+
function renderTitle(toast, options) {
|
|
15
|
+
return h => {
|
|
16
|
+
const nodes = [h(CloseButton, {
|
|
17
|
+
class: ['gl-toast-close-button'],
|
|
33
18
|
on: {
|
|
34
|
-
click:
|
|
19
|
+
click: toast.hide
|
|
35
20
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
})];
|
|
22
|
+
if (options.action) {
|
|
23
|
+
const {
|
|
24
|
+
onClick,
|
|
25
|
+
text,
|
|
26
|
+
href
|
|
27
|
+
} = options.action;
|
|
28
|
+
nodes.unshift(h('a', {
|
|
29
|
+
attrs: {
|
|
30
|
+
role: href ? undefined : 'button',
|
|
31
|
+
href
|
|
32
|
+
},
|
|
33
|
+
class: ['gl-toast-action'],
|
|
34
|
+
on: {
|
|
35
|
+
click: e => onClick(e, toast)
|
|
36
|
+
}
|
|
37
|
+
}, text));
|
|
38
|
+
}
|
|
39
|
+
return nodes;
|
|
40
|
+
};
|
|
39
41
|
}
|
|
40
42
|
function showToast(message) {
|
|
41
43
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -65,7 +67,7 @@ function showToast(message) {
|
|
|
65
67
|
...DEFAULT_OPTIONS,
|
|
66
68
|
...updatedAutoHideDelay,
|
|
67
69
|
id,
|
|
68
|
-
title: renderTitle(
|
|
70
|
+
title: renderTitle(toast, options)
|
|
69
71
|
});
|
|
70
72
|
return toast;
|
|
71
73
|
}
|
|
@@ -93,7 +93,7 @@ var script = {
|
|
|
93
93
|
},
|
|
94
94
|
shouldRenderHelp() {
|
|
95
95
|
// eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots
|
|
96
|
-
return Boolean(this.$slots.help || this.help);
|
|
96
|
+
return Boolean(this.$slots.help || this.help) && this.isVerticalLayout;
|
|
97
97
|
},
|
|
98
98
|
toggleClasses() {
|
|
99
99
|
return [{
|
|
@@ -136,13 +136,14 @@ var script = {
|
|
|
136
136
|
const __vue_script__ = script;
|
|
137
137
|
|
|
138
138
|
/* template */
|
|
139
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-toggle-wrapper gl-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
139
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-toggle-wrapper gl-mb-0 gl-flex",class:{
|
|
140
|
+
'gl-flex-col': _vm.isVerticalLayout,
|
|
141
|
+
'gl-toggle-label-inline': !_vm.isVerticalLayout,
|
|
142
|
+
'is-disabled': _vm.disabled,
|
|
143
|
+
},attrs:{"data-testid":"toggle-wrapper"}},[_c('span',{staticClass:"gl-toggle-label gl-shrink-0",class:_vm.toggleClasses,attrs:{"id":_vm.labelId,"data-testid":"toggle-label"}},[_vm._t("label",function(){return [_vm._v(_vm._s(_vm.label))]})],2),_vm._v(" "),(_vm.shouldRenderDescription)?_c('span',{staticClass:"gl-description-label gl-mb-3",attrs:{"data-testid":"toggle-description"}},[_vm._t("description",function(){return [_vm._v(_vm._s(_vm.description))]})],2):_vm._e(),_vm._v(" "),(_vm.name)?_c('input',{attrs:{"name":_vm.name,"type":"hidden"},domProps:{"value":_vm.value}}):_vm._e(),_vm._v(" "),_c('button',{staticClass:"gl-toggle gl-shrink-0",class:{
|
|
144
|
+
'is-checked': _vm.value,
|
|
145
|
+
'is-disabled': _vm.disabled || _vm.isLoading,
|
|
146
|
+
},attrs:{"role":"switch","aria-checked":_vm.isChecked,"aria-labelledby":_vm.labelId,"aria-describedby":_vm.helpId,"aria-disabled":_vm.disabled,"type":"button","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();return _vm.toggleFeature.apply(null, arguments)}}},[(_vm.isLoading)?_c('gl-loading-icon',{staticClass:"toggle-loading",attrs:{"color":"dark"}}):_c('span',{staticClass:"toggle-icon"},[_c('gl-icon',{attrs:{"name":_vm.icon,"size":12}})],1)],1),_vm._v(" "),(_vm.shouldRenderHelp)?_c('span',{staticClass:"gl-help-label",attrs:{"id":_vm.helpId,"data-testid":"toggle-help"}},[_vm._t("help",function(){return [_vm._v(_vm._s(_vm.help))]})],2):_vm._e()])};
|
|
146
147
|
var __vue_staticRenderFns__ = [];
|
|
147
148
|
|
|
148
149
|
/* style */
|